cheyman commited on
Commit
3c5eba6
·
verified ·
1 Parent(s): ff2ed1f

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +53 -0
nginx.conf ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pid /tmp/nginx.pid;
2
+ events {
3
+ worker_connections 1024;
4
+ }
5
+
6
+ http {
7
+ include /etc/nginx/mime.types;
8
+ default_type application/octet-stream;
9
+
10
+ access_log /tmp/access.log;
11
+ error_log /tmp/error.log;
12
+
13
+ server {
14
+ listen 7860;
15
+
16
+ # ===== SnowLuma WebUI =====
17
+ location / {
18
+ proxy_pass http://127.0.0.1:7860;
19
+ proxy_http_version 1.1;
20
+ proxy_set_header Host $host;
21
+ proxy_set_header X-Real-IP $remote_addr;
22
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
23
+ proxy_set_header X-Forwarded-Proto $scheme;
24
+ }
25
+
26
+ # ===== noVNC =====
27
+ location /novnc/ {
28
+ proxy_pass http://127.0.0.1:6081/;
29
+ proxy_http_version 1.1;
30
+ proxy_set_header Host $host;
31
+ proxy_set_header Upgrade $http_upgrade;
32
+ proxy_set_header Connection "upgrade";
33
+ proxy_read_timeout 86400s;
34
+ }
35
+
36
+ # ===== OneBot HTTP =====
37
+ location /http/ {
38
+ proxy_pass http://127.0.0.1:3000/;
39
+ proxy_http_version 1.1;
40
+ proxy_set_header Host $host;
41
+ }
42
+
43
+ # ===== OneBot WebSocket =====
44
+ location /ws/ {
45
+ proxy_pass http://127.0.0.1:3001/;
46
+ proxy_http_version 1.1;
47
+ proxy_set_header Host $host;
48
+ proxy_set_header Upgrade $http_upgrade;
49
+ proxy_set_header Connection "upgrade";
50
+ proxy_read_timeout 86400s;
51
+ }
52
+ }
53
+ }