Created
March 13, 2017 07:42
-
-
Save b3rew/2e0785bb7ba0f5359dc82fe4df9229e0 to your computer and use it in GitHub Desktop.
nginx sites-available
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen *:9999; | |
server_name localhost; | |
location / { | |
root /path/to/folder/; | |
index index.html index.htm; | |
} | |
location /api { | |
proxy_pass http://localhost:3000/api; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
proxy_connect_timeout 600000; | |
proxy_send_timeout 600000; | |
proxy_read_timeout 600000; | |
send_timeout 600000; | |
gzip on; | |
gzip_proxied any; | |
gzip_types | |
text/css | |
text/javascript | |
text/xml | |
text/plain | |
application/javascript | |
application/x-javascript | |
application/json; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment