This commit is contained in:
zhangkai
2024-06-05 14:27:06 +08:00
commit b825dcd4d5
730 changed files with 100244 additions and 0 deletions

38
nginx.conf Normal file
View File

@@ -0,0 +1,38 @@
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
gzip on;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_types text/xml text/css;
gzip_http_version 1.1;
gzip_vary on;
gzip_disable "MSIE [4-6] \.";
listen 80;
location / {
root /data/webroot/bisheng;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
add_header X-Frame-Options SAMEORIGIN;
}
location /api {
proxy_pass http://192.168.106.116:7860;
proxy_read_timeout 300s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
client_max_body_size 200m;
add_header Access-Control-Allow-Origin "http://192.168.106.120:3002";
add_header X-Frame-Options SAMEORIGIN;
# proxy_set_header Connection "Upgrade";
}
}