Skip to content

Instantly share code, notes, and snippets.

@davidyell
Last active December 18, 2015 18:59
Show Gist options
  • Save davidyell/5829763 to your computer and use it in GitHub Desktop.
Save davidyell/5829763 to your computer and use it in GitHub Desktop.
CakePHP on Nginx with php-fpm
server {
listen 80;
server_name cakepackages.ukwm157 cakepackages.dev;
# root directive should be global
root /Users/david/Sites/cakepackages/app/webroot;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ \.php(/|$) {
fastcgi_pass 127.0.0.1:9001;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment