Skip to content

Instantly share code, notes, and snippets.

@leafsummer
Created July 15, 2015 04:55
Show Gist options
  • Save leafsummer/ecf9fc9d69226d66f3cc to your computer and use it in GitHub Desktop.
Save leafsummer/ecf9fc9d69226d66f3cc to your computer and use it in GitHub Desktop.
a simple nginx conf file
server {
listen 8001;
server_name localhost;
charset utf-8;
root /opt/celery_web;
location / {
root /opt/celery_web;
}
location ^~ /choi_wan_api/ {
#add_header 'Access-Control-Allow-Origin' '*';
#add_header 'Access-Control-Allow-Credentials' 'true';
#add_header 'Access-Control-Allow-Methods' 'OPTION, POST, GET, PUT, DELETE';
#add_header 'Access-Control-Allow-Headers' 'X-Requested-With, Content-Type';
proxy_pass http://localhost:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
#location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
#{
# root /opt/choi-wan/management_web;
#}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment