chb2024 commited on
Commit
4a01dd0
·
verified ·
1 Parent(s): d8a423b

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +27 -0
nginx.conf ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ events {
2
+ worker_connections 1024;
3
+ }
4
+
5
+ http {
6
+ include /etc/nginx/mime.types;
7
+ default_type application/octet-stream;
8
+
9
+ server {
10
+ listen 7860;
11
+
12
+ # 前端文件
13
+ location / {
14
+ root /usr/share/nginx/html;
15
+ index index.html index.htm;
16
+ try_files $uri $uri/ /index.html;
17
+ }
18
+
19
+ # 后端 API
20
+ location /api/ {
21
+ proxy_pass http://localhost:8080;
22
+ proxy_set_header Host $host;
23
+ proxy_set_header X-Real-IP $remote_addr;
24
+ }
25
+ }
26
+ }
27
+