nginx
upstream backend {
server ip1:80;
server ip2:80;
}
server {
resolver 10.10.235.22;
resolver_timeout 5s;
listen 0.0.0.0:80;
#access_log /home/reistlin/logs/proxy.access.log;
#error_log /home/reistlin/logs/proxy.error.log;
location / {
#proxy_pass $scheme://$host$request_uri;
proxy_pass http://backend;
proxy_set_header Host $http_host;
proxy_buffers 256 4k;
proxy_max_temp_file_size 0;
proxy_connect_timeout 30;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 301 1h;
proxy_cache_valid any 1m;
}
}
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步