Matteo Scandolo | 3b3b3b4 | 2016-12-15 17:31:53 -0800 | [diff] [blame] | 1 | server { |
Matteo Scandolo | f4b8517 | 2017-01-11 09:56:02 -0800 | [diff] [blame] | 2 | listen 4000; |
Matteo Scandolo | 3b3b3b4 | 2016-12-15 17:31:53 -0800 | [diff] [blame] | 3 | server_name localhost; |
4 | |||||
5 | #charset koi8-r; | ||||
Matteo Scandolo | f4b8517 | 2017-01-11 09:56:02 -0800 | [diff] [blame] | 6 | access_log /var/log/nginx/log/xos-spa-gui.access.log main; |
Matteo Scandolo | 37d6509 | 2017-01-12 12:03:05 -0800 | [diff] [blame] | 7 | error_log /var/log/nginx/log/xos-spa-gui.error.log debug; |
Matteo Scandolo | 3b3b3b4 | 2016-12-15 17:31:53 -0800 | [diff] [blame] | 8 | |
9 | location / { | ||||
Matteo Scandolo | 37d6509 | 2017-01-12 12:03:05 -0800 | [diff] [blame] | 10 | root /var/www/dist; |
11 | index index.html index.htm; | ||||
Matteo Scandolo | 3b3b3b4 | 2016-12-15 17:31:53 -0800 | [diff] [blame] | 12 | } |
13 | |||||
Matteo Scandolo | f4b8517 | 2017-01-11 09:56:02 -0800 | [diff] [blame] | 14 | # Redirect for FE config |
Matteo Scandolo | 37d6509 | 2017-01-12 12:03:05 -0800 | [diff] [blame] | 15 | |
Matteo Scandolo | 220375a | 2018-01-16 08:53:02 -0800 | [diff] [blame^] | 16 | location /xos/ { |
17 | rewrite ^/xos/(.*)$ /$1; | ||||
Matteo Scandolo | f4b8517 | 2017-01-11 09:56:02 -0800 | [diff] [blame] | 18 | } |
19 | |||||
Matteo Scandolo | 220375a | 2018-01-16 08:53:02 -0800 | [diff] [blame^] | 20 | location /xosapi/ { |
21 | proxy_pass http://xos-chameleon:9101; | ||||
Matteo Scandolo | 3b3b3b4 | 2016-12-15 17:31:53 -0800 | [diff] [blame] | 22 | } |
23 | |||||
Matteo Scandolo | 37d6509 | 2017-01-12 12:03:05 -0800 | [diff] [blame] | 24 | location /socket.io { |
Matteo Scandolo | d62ea79 | 2016-12-22 14:02:28 -0800 | [diff] [blame] | 25 | resolver 127.0.0.1 valid=30s; |
Matteo Scandolo | 899b9b8 | 2017-04-19 15:49:49 -0700 | [diff] [blame] | 26 | proxy_pass http://xos-ws:3000; |
27 | # proxy_redirect http://xos-ws:3000/spa /; | ||||
Matteo Scandolo | 37d6509 | 2017-01-12 12:03:05 -0800 | [diff] [blame] | 28 | proxy_http_version 1.1; |
29 | proxy_set_header Upgrade $http_upgrade; | ||||
30 | proxy_set_header Connection "upgrade"; | ||||
Matteo Scandolo | 3b3b3b4 | 2016-12-15 17:31:53 -0800 | [diff] [blame] | 31 | } |
Matteo Scandolo | 220375a | 2018-01-16 08:53:02 -0800 | [diff] [blame^] | 32 | } |