Created
November 21, 2013 17:52
-
-
Save ivan1911/7586284 to your computer and use it in GitHub Desktop.
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 characters
upstream phpfcgi { | |
server 127.0.0.1:9000; | |
} | |
server { | |
listen 80; | |
server_name lostepisode.ru www.lostepisode.ru; | |
root /www/lostepisode.ru/web; | |
error_log /www/logs/lostepisode.ru/error.log; | |
access_log /www/logs/lostepisode.ru/access.log; | |
# strip app.php/ prefix if it is present | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
location / { | |
index app.php; | |
try_files $uri @rewriteapp; | |
} | |
location @rewriteapp { | |
rewrite ^(.*)$ /app.php/$1 last; | |
} | |
# pass the PHP scripts to FastCGI server from upstream phpfcgi | |
location ~ ^/(app|app_dev|config)\.php(/|$) { | |
fastcgi_pass phpfcgi; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment