xin

Directive reference

proxy_pass

Forwards a request to an HTTP or HTTPS upstream.

Syntaxproxy_pass http://address[/uri]; | proxy_pass https://address[/uri];
Contextslocationif in locationlimit_except
Defaultnone

Behavior

The presence of a URI part controls whether the matched location prefix is replaced. The address may name an upstream block or use variables with a configured resolver.

Example

location /api/ {
    proxy_pass http://backend/;
}

Related directives

upstream · proxy_set_header · proxy_http_version