Created
June 9, 2012 05:26
-
-
Save brtriver/2899621 to your computer and use it in GitHub Desktop.
nginx + fastcgi + rewrite
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
server { | |
listen 80; | |
server_name php54.vm.localhost; | |
access_log /var/log/nginx/vm.localhost.access.log; | |
error_log /var/log/nginx/vm.localhost.error.log; | |
location / { | |
root /var/www/localhost/web; | |
index index.html index.htm; | |
} | |
location ~ \.php$ { | |
root /var/www/localhost/web; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass 127.0.0.1:9001; | |
} | |
location /orephp { | |
try_files $uri $uri/ /orephp/web/index.php; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment