Skip to content

Instantly share code, notes, and snippets.

@brtriver
Created June 9, 2012 05:26
Show Gist options
  • Save brtriver/2899621 to your computer and use it in GitHub Desktop.
Save brtriver/2899621 to your computer and use it in GitHub Desktop.
nginx + fastcgi + rewrite
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