onlyrickroll commited on
Commit
330a9be
·
verified ·
1 Parent(s): ea22105

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +32 -0
nginx.conf ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ worker_processes auto;
2
+ pid /tmp/nginx.pid; # 非特权用户可写
3
+
4
+ events {
5
+ worker_connections 1024;
6
+ }
7
+
8
+ http {
9
+ # 设置非特权用户可写的临时路径
10
+ client_body_temp_path /tmp/client_body;
11
+ proxy_temp_path /tmp/proxy_temp;
12
+ fastcgi_temp_path /tmp/fastcgi_temp;
13
+
14
+ server {
15
+ listen 7860;
16
+ server_name localhost;
17
+
18
+ # 根目录反代 8080 (C/C++ 服务)
19
+ location / {
20
+ proxy_pass http://127.0.0.1:8080;
21
+ proxy_set_header Host $host;
22
+ proxy_set_header X-Real-IP $remote_addr;
23
+ }
24
+
25
+ # /bot 路径反代 8888 (Python 服务)
26
+ location /bot {
27
+ proxy_pass http://127.0.0.1:8888;
28
+ proxy_set_header Host $host;
29
+ proxy_set_header X-Real-IP $remote_addr;
30
+ }
31
+ }
32
+ }