Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 24c18c7

Browse filesBrowse files
committed
tweaks for the web server configuration chapter
1 parent 041105c commit 24c18c7
Copy full SHA for 24c18c7

File tree

Expand file treeCollapse file tree

1 file changed

+25
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-5
lines changed

‎cookbook/configuration/web_server_configuration.rst

Copy file name to clipboardExpand all lines: cookbook/configuration/web_server_configuration.rst
+25-5Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,28 @@
44
Configuring a Web Server
55
========================
66

7-
The web directory is the home of all of your application's public and static
8-
files. Including images, stylesheets and JavaScript files. It is also where the
9-
front controllers live. For more details, see the :ref:`the-web-directory`.
7+
The preferred way to test your Symfony2 application is to use
8+
:doc:`PHP's internal web server </cookbook/web_server/built_in>`. However,
9+
when using an older PHP version or when running the application in the production
10+
environment, you'll usually want to use a full-featured web server. This articles
11+
describes several ways to use Symfony with Apache2 or Nginx. Both are very
12+
popular full-featured web servers.
1013

11-
The web directory services as the document root when configuring your web
12-
server. In the examples below, this directory is in ``/var/www/project/web/``.
14+
When using Apache2, you have two possibilities to configure PHP, as an
15+
:ref:`Apache module <web-server-apache-mod-php>` or with FastCGI using
16+
:ref:`PHP FPM <web-server-apache-fpm>`. FastCGI also is the preferred way
17+
to use PHP :ref:`with Nginx <web-server-nginx>`.
18+
19+
.. sidebar:: The Web Directory
20+
21+
The web directory is the home of all of your application's public and
22+
static files. Including images, stylesheets and JavaScript files. It is
23+
also where the front controllers live. For more details, see the :ref:`the-web-directory`.
24+
25+
The web directory services as the document root when configuring your
26+
web server. In the examples below, this directory is in ``/var/www/project/web/``.
27+
28+
.. _web-server-apache-mod-php:
1329

1430
Apache2 with mod_php/PHP-CGI
1531
----------------------------
@@ -63,6 +79,8 @@ following configuration snippet:
6379
Require all granted
6480
</Directory>
6581
82+
.. _web-server-apache-fpm:
83+
6684
Apache2 with PHP-FPM
6785
--------------------
6886

@@ -164,6 +182,8 @@ instead:
164182
165183
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
166184
185+
.. _web-server-nginx:
186+
167187
Nginx
168188
-----
169189

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.