Skip to content

Instantly share code, notes, and snippets.

@anhtuank7c
Last active February 26, 2016 09:34
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 anhtuank7c/fa03b1dae5bc71a246af to your computer and use it in GitHub Desktop.
Save anhtuank7c/fa03b1dae5bc71a246af to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name cakephp.org www.cakephp.org;
# root directive should be global
root /var/www/cakephp.org/webroot/;
index index.php;
access_log /var/www/cakephp.org/logs/nginx_access.log;
error_log /var/www/cakephp.org/logs/nginx_error.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 7d;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment