Skip to content

Instantly share code, notes, and snippets.

@b3rew
Created March 13, 2017 07:42
Show Gist options
  • Save b3rew/2e0785bb7ba0f5359dc82fe4df9229e0 to your computer and use it in GitHub Desktop.
Save b3rew/2e0785bb7ba0f5359dc82fe4df9229e0 to your computer and use it in GitHub Desktop.
nginx sites-available
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