Skip to content

Instantly share code, notes, and snippets.

@flug
Created February 15, 2014 17:53
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 flug/9022713 to your computer and use it in GitHub Desktop.
Save flug/9022713 to your computer and use it in GitHub Desktop.
Configuration for Cakephp Framework
server {
listen 80;
server_name example.com;
access_log /var/log/nginx/example.access.log;
error_log /var/log/nginx/example.error.log;
root /home/me/workspace/example/app/webroot/;
charset utf-8;
index index.php index.html index.htm;
location ~* \.(js|css|html?|xml|gz|jpe?g|gif|png|swf|wmv|flv|ico)$ {
expires 7d;
}
location / {
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ \.php$ {
try_files $uri = 404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
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