Skip to content

Instantly share code, notes, and snippets.

@kaz29
Created September 24, 2012 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaz29/3776212 to your computer and use it in GitHub Desktop.
Save kaz29/3776212 to your computer and use it in GitHub Desktop.
CakePHP nginx.conf sample
location / {
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?url=$1 last;
break;
}
}
location ~ .php(/|$) {
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
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_param SERVER_ADDR ${server_addr};
fastcgi_pass unix:${socket_root}/${fpm_id};
fastcgi_intercept_errors off;
fastcgi_ignore_client_abort off;
fastcgi_read_timeout 60;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment