nginx超时配置

#项目
server {
listen 81;
server_name X.XXX.XXX.XX;
location / {
root /gds/xxx/dist/;
try_files $uri $uri/ @router;
index index.html index.htm;
}
location ~ ^/(images|img|javascript|js|css|flash|media|static|cdn)/ {
root /gds/nmg/dist/;
}
location ^~/api/ {
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
proxy_pass http://172.0.0.1:8080/;
proxy_set_header x-forwarded-for $remote_addr;
}
location @router {
rewrite ^.*$ /index.html last;
}
}

posted @   全琪俊  阅读(196)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
点击右上角即可分享
微信分享提示