Commit 63f61ce5 authored by Fabien Potencier's avatar Fabien Potencier

Merge remote-tracking branch 'mvrhov/nginx'

* mvrhov/nginx:
  improved nginx config. It's secure by default now.

Conflicts:
	doc/web_servers.rst
parents 986c03b4 5f94b0df
......@@ -44,15 +44,26 @@ resources to ``index.php``:
.. code-block:: nginx
server {
index index.php
#site root is redirected to the app boot script
location = / {
try_files @site @site;
}
#all other locations try other files first and go to our front controller if none of them exists
location / {
try_files $uri $uri/ /index.php;
try_files $uri $uri/ @site;
}
#return 404 for all php files as we do have a front controller
location ~ \.php$ {
return 404;
}
location ~ index\.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
location @site {
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
#uncomment when running via https
#fastcgi_param HTTPS on;
include fastcgi_params;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment