Syntax: | proxy_pass |
---|---|
Default: | — |
Context: | server |
Sets the address of a proxied server. The address can be specified as a domain name or IP address, and a port:
1 | proxy_pass localhost:12345; |
or as a UNIX-domain socket path:
1 | proxy_pass unix:/tmp/stream.socket; |
If a domain name resolves to several addresses, all of them will be used in a round-robin fashion. In addition, an address can be specified as a server group.
The address can also be specified using variables (1.11.3):
1 | proxy_pass $upstream; |
In this case, the server name is searched among the described server groups, and, if not found, is determined using a resolver.
Please login to continue.