diff --git a/web/index.html b/web/index.html index 4ee2602..06fed54 100644 --- a/web/index.html +++ b/web/index.html @@ -4,15 +4,14 @@ - - + +
- - + +
- diff --git a/web/nginx.conf.u-os-app b/web/nginx.conf.u-os-app index 8c638f3..07cff3d 100644 --- a/web/nginx.conf.u-os-app +++ b/web/nginx.conf.u-os-app @@ -26,25 +26,17 @@ server { add_header Cache-Control "no-cache"; location / { - - root /run/shm; - - if ( -f /run/shm/index.html) { - break; - } - - try_files /index.html @vnc; + root /var/www; } - location @vnc { - - root /usr/share/novnc; + location /novnc { index vnc.html; + alias /usr/share/novnc; + try_files $uri $uri/ /vnc.html; - if ($request_uri = "/") { - return 301 ?resize=scale&autoconnect=true&path=u-os-app-openwrt/websockify; + if ($request_uri = "/novnc/") { + return 301 ?resize=scale&autoconnect=true&reconnect_delay=2000&reconnect=true&path=u-os-app-openwrt/websockify; } - } location /websockify { @@ -61,4 +53,17 @@ server { proxy_pass http://127.0.0.1:5700/; } + location /script-server/ { + proxy_pass_header Server; + proxy_set_header Host $proxy_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://127.0.0.1:5000/; + + # needed for websockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Origin http://$proxy_host; + } }