首页 > 代码库 > nginx 配置备忘
nginx 配置备忘
upstream webgamelogin {
keepalive 32;
server 10.20.100.40:8072 max_fails=2 fail_timeout=10s;
server 10.20.100.25:8072 backup;
}
upstream api {
keepalive 32;
server 10.20.100.40:8073 max_fails=2 fail_timeout=10s;
server 10.20.100.25:8073 backup;
}
server {
listen 80;
server_name gameapi.doutest.com;
charset utf8;
location /webgamelogin {
proxy_pass http://webgamelogin;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api {
proxy_pass http://api;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /crossdomain.xml {
alias /data/webapps/crossdomain.xml;
expires 30d;
}
}
本文出自 “漫漫长路” 博客,请务必保留此出处http://ithelp.blog.51cto.com/4501237/1545194
nginx 配置备忘