Spaces:
Paused
Paused
Update nginx.conf
Browse files- nginx.conf +49 -49
nginx.conf
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
events {
|
2 |
-
worker_connections 1024;
|
3 |
-
}
|
4 |
-
|
5 |
-
http {
|
6 |
-
include /etc/nginx/mime.types;
|
7 |
-
access_log /tmp/nginx_access.log;
|
8 |
-
error_log /tmp/nginx_error.log;
|
9 |
-
keepalive_timeout 65;
|
10 |
-
|
11 |
-
server {
|
12 |
-
listen 7860;
|
13 |
-
server_name localhost;
|
14 |
-
|
15 |
-
location /hf/ {
|
16 |
-
# 删除 /hf
|
17 |
-
rewrite ^/hf/(.*)$ /$1 break;
|
18 |
-
|
19 |
-
# 代理设置
|
20 |
-
proxy_pass http://127.0.0.1:3000;
|
21 |
-
proxy_http_version 1.1;
|
22 |
-
proxy_set_header Upgrade $http_upgrade;
|
23 |
-
proxy_set_header Connection "upgrade";
|
24 |
-
proxy_set_header Host $host;
|
25 |
-
proxy_set_header X-Real-IP
|
26 |
-
proxy_set_header X-Forwarded-For
|
27 |
-
proxy_set_header X-Forwarded-Proto $scheme;
|
28 |
-
|
29 |
-
# 支持流式输出
|
30 |
-
proxy_buffering off;
|
31 |
-
proxy_cache off;
|
32 |
-
}
|
33 |
-
|
34 |
-
location / {
|
35 |
-
# 默认的代理设置
|
36 |
-
proxy_pass http://127.0.0.1:3000;
|
37 |
-
proxy_http_version 1.1;
|
38 |
-
proxy_set_header Upgrade $http_upgrade;
|
39 |
-
proxy_set_header Connection "upgrade";
|
40 |
-
proxy_set_header Host $host;
|
41 |
-
proxy_set_header X-Real-IP
|
42 |
-
proxy_set_header X-Forwarded-For
|
43 |
-
proxy_set_header X-Forwarded-Proto $scheme;
|
44 |
-
|
45 |
-
proxy_buffering off;
|
46 |
-
proxy_cache off;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
}
|
|
|
1 |
+
events {
|
2 |
+
worker_connections 1024;
|
3 |
+
}
|
4 |
+
|
5 |
+
http {
|
6 |
+
include /etc/nginx/mime.types;
|
7 |
+
access_log /tmp/nginx_access.log;
|
8 |
+
error_log /tmp/nginx_error.log;
|
9 |
+
keepalive_timeout 65;
|
10 |
+
|
11 |
+
server {
|
12 |
+
listen 7860;
|
13 |
+
server_name localhost;
|
14 |
+
|
15 |
+
location /hf/ {
|
16 |
+
# 删除 /hf
|
17 |
+
rewrite ^/hf/(.*)$ /$1 break;
|
18 |
+
|
19 |
+
# 代理设置
|
20 |
+
proxy_pass http://127.0.0.1:3000;
|
21 |
+
proxy_http_version 1.1;
|
22 |
+
proxy_set_header Upgrade $http_upgrade;
|
23 |
+
proxy_set_header Connection "upgrade";
|
24 |
+
proxy_set_header Host $host;
|
25 |
+
proxy_set_header X-Real-IP 8.8.8.8;
|
26 |
+
proxy_set_header X-Forwarded-For 8.8.8.8;
|
27 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
28 |
+
|
29 |
+
# 支持流式输出
|
30 |
+
proxy_buffering off;
|
31 |
+
proxy_cache off;
|
32 |
+
}
|
33 |
+
|
34 |
+
location / {
|
35 |
+
# 默认的代理设置
|
36 |
+
proxy_pass http://127.0.0.1:3000;
|
37 |
+
proxy_http_version 1.1;
|
38 |
+
proxy_set_header Upgrade $http_upgrade;
|
39 |
+
proxy_set_header Connection "upgrade";
|
40 |
+
proxy_set_header Host $host;
|
41 |
+
proxy_set_header X-Real-IP 8.8.8.8;
|
42 |
+
proxy_set_header X-Forwarded-For 8.8.8.8;
|
43 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
44 |
+
|
45 |
+
proxy_buffering off;
|
46 |
+
proxy_cache off;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|