Create nginx.conf
Browse files- nginx.conf +32 -0
nginx.conf
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
worker_processes auto;
|
2 |
+
pid /tmp/nginx.pid;
|
3 |
+
events {
|
4 |
+
worker_connections 1024;
|
5 |
+
}
|
6 |
+
http {
|
7 |
+
client_body_temp_path /tmp/nginx/body;
|
8 |
+
fastcgi_temp_path /tmp/nginx/fastcgi;
|
9 |
+
proxy_temp_path /tmp/nginx/proxy;
|
10 |
+
scgi_temp_path /tmp/nginx/scgi;
|
11 |
+
uwsgi_temp_path /tmp/nginx/uwsgi;
|
12 |
+
server {
|
13 |
+
listen 7860;
|
14 |
+
location /ai/v1/ {
|
15 |
+
rewrite ^/ai/v1/(.*)$ /v1/$1 break;
|
16 |
+
proxy_pass http://127.0.0.1:10000;
|
17 |
+
proxy_set_header Host $host;
|
18 |
+
proxy_set_header X-Real-IP $remote_addr;
|
19 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
20 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
21 |
+
}
|
22 |
+
location / {
|
23 |
+
proxy_pass http://127.0.0.1:10000;
|
24 |
+
proxy_set_header Host $host;
|
25 |
+
proxy_set_header X-Real-IP $remote_addr;
|
26 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
27 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
access_log /dev/stdout;
|
31 |
+
error_log /dev/stderr warn;
|
32 |
+
}
|