Skip to content

Instantly share code, notes, and snippets.

@liveashish
Last active September 20, 2017 18:35
Show Gist options
  • Save liveashish/d8c480f80f5276039ce0fa3f924b8306 to your computer and use it in GitHub Desktop.
Save liveashish/d8c480f80f5276039ce0fa3f924b8306 to your computer and use it in GitHub Desktop.
events{}
http{
server {
listen 80;
server_name $SERVER_NAME;
client_body_timeout 24s;
client_header_timeout 24s;
keepalive_timeout 30s;
#access_log off;
proxy_connect_timeout 1000s;
proxy_send_timeout 1000s;
proxy_read_timeout 1000s;
send_timeout 1000s;
#location /static {
# alias $STATIC_PATH;
# autoindex on;
# }
location / {
proxy_set_header X-Real-IP $http_x_forwarded_for;
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;
break;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment