Skip to content

Instantly share code, notes, and snippets.

@naoyeye
Created August 20, 2012 23:53
Show Gist options
  • Save naoyeye/3409397 to your computer and use it in GitHub Desktop.
Save naoyeye/3409397 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name 9y1p.com www.9y1p.com *.9y1p.com;
index index.html index.htm;
root /home/www/jiuyuyipin;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)?$
{
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 1h;
access_log off;
}
}
server {
listen 80;
server_name 2wen.it www.2wen.it;
root /home/www/rhinoceros;
location / {
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_pass 127.0.0.1:9003;
}
location /static/ {
if (-f $request_filename) {
rewrite ^/static/(.*)$ /static/$1 break;
}
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)?$
{
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 1h;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment