Skip to content

Instantly share code, notes, and snippets.

@2no
Created February 26, 2012 15:49
Show Gist options
  • Save 2no/1917433 to your computer and use it in GitHub Desktop.
Save 2no/1917433 to your computer and use it in GitHub Desktop.
dotCloud & PHP で、PATH_INFO を考慮した nginx.conf
try_files $uri $uri/ /index.php$uri;
location ~ ".+\.php($|/.*)" {
if ( -f /home/dotcloud/current/maintenance) {
return 503;
}
fastcgi_pass unix:/var/dotcloud/php5-fpm.sock;
include fastcgi_params;
include /home/dotcloud/current/*fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment