Skip to content

Commit 0c28745

Browse files
committed
Merge pull request #2508 from maxromanovsky/improving_web_server_config
Improving Web server configuration
2 parents 2035ef3 + ff17920 commit 0c28745

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

cookbook/configuration/web_server_configuration.rst

+9-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ are:
2121
.. code-block:: apache
2222
2323
<VirtualHost *:80>
24-
ServerName www.domain.tld
24+
ServerName domain.tld
25+
ServerAlias www.domain.tld
2526
2627
DocumentRoot /var/www/project/web
2728
<Directory /var/www/project/web>
@@ -30,7 +31,7 @@ are:
3031
Order allow,deny
3132
Allow from All
3233
</Directory>
33-
34+
3435
ErrorLog /var/log/apache2/project_error.log
3536
CustomLog /var/log/apache2/project_access.log combined
3637
</VirtualHost>
@@ -51,7 +52,7 @@ are:
5152
.. code-block:: nginx
5253
5354
server {
54-
server_name www.domain.tld;
55+
server_name domain.tld www.domain.tld;
5556
root /var/www/project/web;
5657
5758
location / {
@@ -64,7 +65,7 @@ are:
6465
rewrite ^(.*)$ /app.php/$1 last;
6566
}
6667
67-
location ~ ^/(app|app_dev)\.php(/|$) {
68+
location ~ ^/(app|app_dev|config)\.php(/|$) {
6869
fastcgi_pass unix:/var/run/php5-fpm.sock;
6970
fastcgi_split_path_info ^(.+\.php)(/.*)$;
7071
include fastcgi_params;
@@ -83,10 +84,10 @@ are:
8384

8485
.. tip::
8586

86-
This executes **only** ``app.php`` and ``app_dev.php`` in the web directory.
87-
All other files will be served as text. If you have other PHP files in
88-
your web directory, be sure to include them in the ``location`` block
89-
above.
87+
This executes **only** ``app.php``, ``app_dev.php`` and ``config.php`` in
88+
the web directory. All other files will be served as text. If you have
89+
other PHP files in your web directory, be sure to include them in the
90+
``location`` block above.
9091

9192
.. _`Apache`: http://httpd.apache.org/docs/current/mod/core.html#documentroot
9293
.. _`Nginx`: http://wiki.nginx.org/Symfony

0 commit comments

Comments
 (0)