proxy_pass
proxy_pass URL;proxy_pass http://www.myweb.name/uri;
proxy_pass http://localhost:8000/uri/;
proxy_pass http://unix:/tmp/backend.socket:/uri/;upstream
…
upstream proxy_svrs #配置后端服务器组
{
server http://192.168.1.1:8001/uri/;
server http://192.168.1.2:8001/uri/;
server http://192.168.1.3:8001/uri/;
}
server
{
…
listen 80;
server_name www.myweb.name;
location /
{
proxy_pass proxy_svrs; #使用服务器组的名称
}
}URL中是否包含有URI,Nginx服务器的处理方式是不同的
Last updated