location

location /
{
# 如果后端服务器返回502 504 执行超时等错误,自动将请求转发到upstream 负载均衡池中另一台服务器。实现故障转移。
proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_pass http://php_server_pool;
proxy_set_header Host www.yourdomain.com;
proxy_set_header X-Forwarded-For $remote_addr;

}

location /download {
root /opt ;
autoindex on;
}

posted @ 2023-12-25 10:04  mingtian是吧  阅读(3)  评论(0编辑  收藏  举报