mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 08:01:25 +00:00
70 lines
1.7 KiB
Plaintext
70 lines
1.7 KiB
Plaintext
server {
|
|
|
|
listen 80;
|
|
listen [::]:80;
|
|
listen 8006 default_server;
|
|
listen [::]:8006 default_server;
|
|
|
|
autoindex on;
|
|
tcp_nodelay on;
|
|
server_tokens off;
|
|
absolute_redirect off;
|
|
|
|
error_log /dev/null;
|
|
access_log /dev/null;
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 5;
|
|
gzip_min_length 500;
|
|
gzip_disable "msie6";
|
|
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
|
|
|
|
add_header Cache-Control "no-cache";
|
|
|
|
location / {
|
|
root /var/www;
|
|
}
|
|
|
|
location /novnc {
|
|
index vnc.html;
|
|
alias /usr/share/novnc;
|
|
try_files $uri $uri/ /vnc.html;
|
|
|
|
if ($request_uri = "/novnc/") {
|
|
return 301 ?resize=scale&autoconnect=true&reconnect_delay=2000&reconnect=true;
|
|
}
|
|
}
|
|
|
|
location /websockify {
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_buffering off;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
|
|
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;
|
|
}
|
|
}
|