blob: d2d7f78e2d05adb8cc0f9f48c1ca7032dd20ee32 [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 Scandolof4b85172017-01-11 09:56:02 -080014 # Redirect for FE config
Matteo Scandolo37d65092017-01-12 12:03:05 -080015
Matteo Scandolo220375a2018-01-16 08:53:02 -080016 location /xos/ {
17 rewrite ^/xos/(.*)$ /$1;
Matteo Scandolof4b85172017-01-11 09:56:02 -080018 }
19
Matteo Scandolo220375a2018-01-16 08:53:02 -080020 location /xosapi/ {
21 proxy_pass http://xos-chameleon:9101;
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -080022 }
23
Matteo Scandolo37d65092017-01-12 12:03:05 -080024 location /socket.io {
Matteo Scandolod62ea792016-12-22 14:02:28 -080025 resolver 127.0.0.1 valid=30s;
Matteo Scandolo899b9b82017-04-19 15:49:49 -070026 proxy_pass http://xos-ws:3000;
27 # proxy_redirect http://xos-ws:3000/spa /;
Matteo Scandolo37d65092017-01-12 12:03:05 -080028 proxy_http_version 1.1;
29 proxy_set_header Upgrade $http_upgrade;
30 proxy_set_header Connection "upgrade";
Matteo Scandolo3b3b3b42016-12-15 17:31:53 -080031 }
Matteo Scandolo220375a2018-01-16 08:53:02 -080032}