mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 08:01:25 +00:00
Try to add u-os-app support (WIP)
This commit is contained in:
+4
-5
@@ -4,15 +4,14 @@
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css" />
|
||||
<link rel="icon" href="/img/favicon.svg" type="image/x-icon">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
||||
<link rel="icon" href="img/favicon.svg" type="image/x-icon">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<iframe src="/script-server" width="27%"></iframe>
|
||||
<iframe src="/novnc" width="70%"></iframe>
|
||||
<iframe src="script-server/" width="27%"></iframe>
|
||||
<iframe src="novnc/" width="70%"></iframe>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
+19
-14
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user