blob: 781495d9aff0ca6d49c656cd97b8138cd80f08ba [file] [log] [blame]
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -08001server {
Matteo Scandolof4b85172017-01-11 09:56:02 -08002 listen 4000;
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -08003 server_name localhost;
4
5 #charset koi8-r;
Matteo Scandolof4b85172017-01-11 09:56:02 -08006 access_log /var/log/nginx/log/xos-spa-gui.access.log main;
Matteo Scandolo37d65092017-01-12 12:03:05 -08007 error_log /var/log/nginx/log/xos-spa-gui.error.log debug;
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -08008
9 location / {
Matteo Scandolo37d65092017-01-12 12:03:05 -080010 root /var/www/dist;
11 index index.html index.htm;
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -080012 }
13
Matteo Scandolo220375a2018-01-16 08:53:02 -080014 location /xosapi/ {
15 proxy_pass http://xos-chameleon:9101;
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -080016 }
17
Matteo Scandolo37d65092017-01-12 12:03:05 -080018 location /socket.io {
Matteo Scandolod62ea792016-12-22 14:02:28 -080019 resolver 127.0.0.1 valid=30s;
Matteo Scandolo899b9b82017-04-19 15:49:49 -070020 proxy_pass http://xos-ws:3000;
21 # proxy_redirect http://xos-ws:3000/spa /;
Matteo Scandolo37d65092017-01-12 12:03:05 -080022 proxy_http_version 1.1;
23 proxy_set_header Upgrade $http_upgrade;
24 proxy_set_header Connection "upgrade";
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -080025 }
Matteo Scandolo220375a2018-01-16 08:53:02 -080026}