可运行
This commit is contained in:
43
nginx_order.conf
Normal file
43
nginx_order.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name 101.43.95.130;
|
||||
|
||||
# 访问日志
|
||||
access_log /var/log/nginx/order_access.log;
|
||||
error_log /var/log/nginx/order_error.log;
|
||||
|
||||
# 客户端最大上传文件大小
|
||||
client_max_body_size 20M;
|
||||
|
||||
# 静态文件直接由nginx提供
|
||||
location /static/ {
|
||||
alias /home/renjianbo/saars/order/web/static/;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# 所有其他请求转发到Flask应用
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8032;
|
||||
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;
|
||||
|
||||
# WebSocket支持(如果需要)
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# 超时设置
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
# 错误页面
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user