wixcs commited on
Commit
cfce562
·
verified ·
1 Parent(s): 0d644cd

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +8 -8
nginx.conf CHANGED
@@ -1,13 +1,13 @@
1
- events { }
2
-
3
  http {
4
  server {
5
- listen 80;
6
- server_name localhost;
7
-
8
  location / {
9
- root /usr/share/nginx/html;
10
- index index.html;
 
 
 
11
  }
12
  }
13
- }
 
1
+ events {}
 
2
  http {
3
  server {
4
+ listen 7860; #Hugging Face Spaces的默认端口为7860
 
 
5
  location / {
6
+ proxy_pass http://localhost:3000; #假设你的应用运行在3000端口
7
+ proxy_set_header Host $host;
8
+ proxy_set_header X-Real-IP $remote_addr;
9
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
10
+ proxy_set_header X-Forwarded-Proto $scheme;
11
  }
12
  }
13
+ }