Skip to content

Commit 42888e0

Browse files
xabbuhChristian Flothmann
authored and
Christian Flothmann
committed
tweaks for the web server configuration chapter
1 parent 4ea4dfe commit 42888e0

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

cookbook/configuration/web_server_configuration.rst

+24-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,27 @@
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 PHP's internal
8+
web server. However, when using an older PHP version or when running the
9+
application in the production environment, you'll usually want to use a full-featured
10+
web server. This articles describes several ways to use Symfony with Apache2
11+
or Nginx. Both are very popular full-featured web servers.
1012

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

1429
Apache2 with mod_php/PHP-CGI
1530
----------------------------
@@ -63,6 +78,8 @@ following configuration snippet:
6378
Require all granted
6479
</Directory>
6580
81+
.. _web-server-apache-fpm:
82+
6683
Apache2 with PHP-FPM
6784
--------------------
6885

@@ -164,6 +181,8 @@ instead:
164181
165182
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
166183
184+
.. _web-server-nginx:
185+
167186
Nginx
168187
-----
169188

0 commit comments

Comments
 (0)