sfun commited on
Commit
80beaad
1 Parent(s): 639996a

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +32 -0
nginx.conf ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ user nginx;
2
+
3
+ events {
4
+ worker_connections 1024;
5
+ }
6
+
7
+ http {
8
+ # 禁用 admin 接口和日志输出
9
+ server {
10
+ listen 3001;
11
+
12
+ location /ai/v1/ {
13
+ rewrite ^/api/v1/(.*)$ /v1/$1 break;
14
+ proxy_pass http://127.0.0.1:3000;
15
+ proxy_set_header Host $host;
16
+ proxy_set_header X-Real-IP $remote_addr;
17
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
18
+ proxy_set_header X-Forwarded-Proto $scheme;
19
+ }
20
+
21
+ location / {
22
+ proxy_pass http://127.0.0.1:3000;
23
+ proxy_set_header Host $host;
24
+ proxy_set_header X-Real-IP $remote_addr;
25
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26
+ proxy_set_header X-Forwarded-Proto $scheme;
27
+ }
28
+ }
29
+
30
+ # 禁用错误日志输出
31
+ error_log /dev/null crit;
32
+ }