Skip to content

Instantly share code, notes, and snippets.

@ollym
Created February 25, 2011 00:05
Show Gist options
  • Save ollym/843173 to your computer and use it in GitHub Desktop.
Save ollym/843173 to your computer and use it in GitHub Desktop.
location / {
index index.php index.html index.htm;
try_files $uri index.php$uri?$args;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ ^.+\.php {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment