darkfire514 commited on
Commit
387cece
·
verified ·
1 Parent(s): 88d1ad2

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +5 -4
nginx.conf CHANGED
@@ -6,7 +6,7 @@ events {
6
  }
7
 
8
  http {
9
- # 解决 WebSocket 握手问题的关键配置
10
  map $http_upgrade $connection_upgrade {
11
  default upgrade;
12
  '' close;
@@ -14,6 +14,9 @@ http {
14
 
15
  client_body_temp_path /tmp/client_temp;
16
  proxy_temp_path /tmp/proxy_temp;
 
 
 
17
 
18
  include /etc/nginx/mime.types;
19
  default_type application/octet-stream;
@@ -22,7 +25,7 @@ http {
22
  listen 7860;
23
  server_name localhost;
24
 
25
- # OpenClaw UI
26
  location /gateway/ {
27
  proxy_pass http://127.0.0.1:18789/;
28
  proxy_http_version 1.1;
@@ -39,12 +42,10 @@ http {
39
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
40
  proxy_set_header X-Forwarded-Proto https;
41
 
42
- # WebSocket 支持
43
  proxy_http_version 1.1;
44
  proxy_set_header Upgrade $http_upgrade;
45
  proxy_set_header Connection $connection_upgrade;
46
 
47
- # 延长超时,防止终端断连
48
  proxy_read_timeout 7d;
49
  proxy_send_timeout 7d;
50
  proxy_buffering off;
 
6
  }
7
 
8
  http {
9
+ # WebSocket 映射必须在 http 块内
10
  map $http_upgrade $connection_upgrade {
11
  default upgrade;
12
  '' close;
 
14
 
15
  client_body_temp_path /tmp/client_temp;
16
  proxy_temp_path /tmp/proxy_temp;
17
+ fastcgi_temp_path /tmp/fastcgi_temp;
18
+ uwsgi_temp_path /tmp/uwsgi_temp;
19
+ scgi_temp_path /tmp/scgi_temp;
20
 
21
  include /etc/nginx/mime.types;
22
  default_type application/octet-stream;
 
25
  listen 7860;
26
  server_name localhost;
27
 
28
+ # OpenClaw UI 路径
29
  location /gateway/ {
30
  proxy_pass http://127.0.0.1:18789/;
31
  proxy_http_version 1.1;
 
42
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
43
  proxy_set_header X-Forwarded-Proto https;
44
 
 
45
  proxy_http_version 1.1;
46
  proxy_set_header Upgrade $http_upgrade;
47
  proxy_set_header Connection $connection_upgrade;
48
 
 
49
  proxy_read_timeout 7d;
50
  proxy_send_timeout 7d;
51
  proxy_buffering off;