lljz66 commited on
Commit
ee779db
·
verified ·
1 Parent(s): 6ba9cd3

preserve: noVNC build -> novnc/nginx.conf

Browse files
Files changed (1) hide show
  1. novnc/nginx.conf +52 -0
novnc/nginx.conf ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ worker_processes 1;
2
+ error_log /dev/stderr warn;
3
+ pid /tmp/nginx.pid;
4
+
5
+ events { worker_connections 1024; }
6
+
7
+ http {
8
+ include /etc/nginx/mime.types;
9
+ default_type application/octet-stream;
10
+ access_log off;
11
+
12
+ client_body_temp_path /tmp/nginx-body;
13
+ proxy_temp_path /tmp/nginx-proxy;
14
+ fastcgi_temp_path /tmp/nginx-fastcgi;
15
+ uwsgi_temp_path /tmp/nginx-uwsgi;
16
+ scgi_temp_path /tmp/nginx-scgi;
17
+
18
+ map $http_upgrade $connection_upgrade {
19
+ default upgrade;
20
+ '' close;
21
+ }
22
+
23
+ server {
24
+ listen 7860;
25
+ server_name _;
26
+ root /usr/share/novnc;
27
+
28
+ location = /healthz {
29
+ add_header Content-Type text/plain;
30
+ return 200 'ok';
31
+ }
32
+
33
+ location = / {
34
+ return 302 /vnc.html?autoconnect=1&resize=scale&path=websockify;
35
+ }
36
+
37
+ location /websockify {
38
+ proxy_pass http://127.0.0.1:5901/;
39
+ proxy_http_version 1.1;
40
+ proxy_set_header Upgrade $http_upgrade;
41
+ proxy_set_header Connection $connection_upgrade;
42
+ proxy_set_header Host $host;
43
+ proxy_buffering off;
44
+ proxy_read_timeout 3600s;
45
+ proxy_send_timeout 3600s;
46
+ }
47
+
48
+ location / {
49
+ try_files $uri $uri/ =404;
50
+ }
51
+ }
52
+ }