|
@@ -17,17 +17,26 @@ server {
|
|
|
expires max;
|
|
|
}
|
|
|
|
|
|
+ # proxy all to app server
|
|
|
+ location / {
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
+ proxy_set_header CLIENT_IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_pass http://localhost:3000;
|
|
|
+
|
|
|
+ gzip on;
|
|
|
+ gzip_types text/html text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
|
|
|
+ gzip_proxied any;
|
|
|
+ }
|
|
|
+
|
|
|
+ # proxy web sockets to app server
|
|
|
location /ws {
|
|
|
proxy_http_version 1.1;
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
- proxy_pass http://localhost:6042;
|
|
|
- proxy_read_timeout 86400;
|
|
|
- }
|
|
|
-
|
|
|
- location / {
|
|
|
- proxy_set_header Host $host;
|
|
|
+ proxy_set_header CLIENT_IP $remote_addr;
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
- proxy_pass http://localhost:3000;
|
|
|
+ proxy_read_timeout 86400;
|
|
|
+ proxy_pass http://localhost:6042;
|
|
|
}
|
|
|
}
|