Created
July 15, 2015 22:15
Revisions
-
pokap created this gist
Jul 15, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ server { server_name localhost; listen 8080; root /my/relative/project/web; access_log /var/log/nginx/my_project.access.log; error_log /var/log/nginx/my_project.error.log; include /etc/nginx/symfony_default.conf; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ listen 80; server_tokens off; location ~ \.php$ { if ($uri ~ "^(.+\.php)($|/$)") { set $script $1; } if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; } include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; fastcgi_param SERVER_PORT 80; fastcgi_next_upstream off; } location / { try_files $uri @php; port_in_redirect off; } location @php { set $script "/app.php"; if ($uri ~ "^(.+\.php)($|/$)") { set $script $1; } if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; } include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; fastcgi_param SERVER_PORT 80; fastcgi_next_upstream off; }