Skip to content

Commit c6a5a08

Browse files
committed
minor #7658 Added a note about the .htaccess files included by Symfony apps (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #7658). Discussion ---------- Added a note about the .htaccess files included by Symfony apps This fixes #7625. Commits ------- 60658aa Added a note about the .htaccess files included by Symfony apps
2 parents dcad7f1 + 60658aa commit c6a5a08

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

setup/web_server_configuration.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ The **minimum configuration** to get your application running under Nginx is:
306306
# Remove the internal directive to allow URIs like this
307307
internal;
308308
}
309-
309+
310310
# return 404 for all other php files not matching the front controller
311311
# this prevents access to other php files you don't want to be accessible.
312312
location ~ \.php$ {
@@ -336,6 +336,13 @@ The **minimum configuration** to get your application running under Nginx is:
336336
or ``config.php`` scripts (i.e. ``http://example.com/app_dev.php`` and ``http://example.com/config.php``).
337337
If you *can* access these, be sure to remove the ``DEV`` section from the above configuration.
338338

339+
.. note::
340+
341+
By default, Symfony applications include several ``.htaccess`` files to
342+
configure redirections and to prevent unauthorized access to some sensitive
343+
directories. Those files are only useful when using Apache, so you can
344+
safely remove them when using Nginx.
345+
339346
For advanced Nginx configuration options, read the official `Nginx documentation`_.
340347

341348
.. _`Apache documentation`: http://httpd.apache.org/docs/

0 commit comments

Comments
 (0)