38 lines
995 B
Plaintext
38 lines
995 B
Plaintext
server {
|
|
listen 80;
|
|
server_name oneapi.stonelan.cn;
|
|
|
|
location / {
|
|
proxy_pass http://oneapi:3000;
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# 添加代理超时配置
|
|
proxy_connect_timeout 60s;
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
|
|
# 支持大文件上传和API请求
|
|
client_max_body_size 100M;
|
|
proxy_buffering off;
|
|
|
|
# 启用gzip压缩
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_types
|
|
text/plain
|
|
text/css
|
|
text/xml
|
|
text/javascript
|
|
application/json
|
|
application/javascript
|
|
application/xml+rss
|
|
application/atom+xml
|
|
image/svg+xml;
|
|
}
|
|
} |