Skip to content

Instantly share code, notes, and snippets.

@yoxyue
Created September 11, 2013 11:30
Show Gist options
  • Save yoxyue/6522338 to your computer and use it in GitHub Desktop.
Save yoxyue/6522338 to your computer and use it in GitHub Desktop.
log_format palmyin '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80;
server_name palmyin.com www.palmyin.com ;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/palmyin;
location / {
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:8000;
}
}
location /static/ {
if (-f $request_filename) {
rewrite ^/static/(.*)$ /static/$1 break;
}
}
# include none.conf;
access_log /home/wwwlogs/palmyin.log palmyin;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment