Skip to content

Instantly share code, notes, and snippets.

@cxfksword
Created August 18, 2014 07:16
Show Gist options
  • Save cxfksword/0b09b3de112961c1b5ec to your computer and use it in GitHub Desktop.
Save cxfksword/0b09b3de112961c1b5ec to your computer and use it in GitHub Desktop.
server
{
listen 8000;
index index.html index.htm index.php;
root /data/wwwroot/XuanAdmin/current;
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi.conf;
}
location / {
try_files $uri uri/ /index.php?_url=$uri&$args;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /data/nginx/logs/XuanAdmin.log main;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment