Home > OS >  Questions about proxy_pass nginx's generation and upstream
Questions about proxy_pass nginx's generation and upstream

Time:10-04

Nginx proxy_pass can specify the domain name, you can also specify the name of the upstream, if is single, upstream is convenient in the case of multiple machine works, but if you are single agent in proxy_pass directly specify the domain name and specify the name of the upstream have what distinction, I found that using the generation of bypass beian, not with the name of the upstream, upstream of the domain name is written in, is the default port 80, see the code directly,

Outside www.abc.com domain name is not put on record, DNS, XXX. Cn domain names have been put on record, and IP parsing in domestic server

1, use the following ways do agent, you don't succeed, jump to not record page
Upstream SVR {
Server IP. XXX. Cn;
}

Server {
listen 80;
Server_name www.abc.com;
The location/{
Proxy_pass http://svr;
}

2, do not use the upstream module, direct domain name can be specified in the proxy_pass success, someone know what reason not
# upstream SVR {
# server IP. XXX. Cn;
#}

Server {
listen 80;
Server_name www.abc.com;
The location/{
Proxy_pass http://ip.xxx.cn;
}

CodePudding user response:

Upstream of the domain name to add port

CodePudding user response:

Could you tell me how to handle the original poster to solve the problem,, I also encountered this problem now

CodePudding user response:

After add the upstream, the page jump agent may redirect once, so can't access, if you do not use the back-end load balancing, with proxy_pass directly
  • Related