NGINX proxy_pass URI Calculator: see the upstream URL

Enter the matched static location, incoming request target, and proxy_pass URL. The calculator returns the final upstream URL with a literal replacement trace and optional slash comparison. It runs in this browser, but runtime-dependent cases need verification in NGINX.

Location type
Rewrite before proxy_pass

Use the location NGINX actually matched

Copy the selected literal prefix or exact location, the incoming request target, and the URL written after proxy_pass. This calculator checks that the request fits the supplied location, but it does not choose among a full set of location blocks.

Keep the request arguments after ?. An omitted target URI and a target URI of/ are different inputs, so preserve the directive exactly.

Common static cases

These rows use location /api/ and request /api/users?id=42.

proxy_passRetained requestFinal upstream URL
http://backend/api/users?id=42http://backend/api/users?id=42
http://backend/users?id=42http://backend/users?id=42
http://backend/v2users?id=42http://backend/v2users?id=42
http://backend/v2/users?id=42http://backend/v2/users?id=42

Read the result as one replacement chain

With no target URI, the supported request path is retained. With a target URI, the matched location is removed, its suffix is appended to that URI, and the original request arguments follow the new path.

Concatenation is literal. /v2 plus users becomes/v2users; /v2/ becomes /v2/users. The slash comparison shows both outcomes without recommending either one.

When the answer needs live NGINX

InputWhy no URL is shownWhat to verify
Regex or named locationThere is no literal matched prefix that this page can safely replace.Inspect the effective location and proxy_pass without a URI.
rewrite before proxy_passbreak can change URI handling, while last starts another location search.Trace the rewrite and later location in the running configuration.
Variables or target argumentsRuntime values or argument-merging rules are missing from the static inputs.Resolve the variables and observe the upstream request.
Encoded or normalization-sensitive pathNGINX location processing uses a normalized URI, which this page does not emulate.Compare the normalized URI with an upstream request log.

The official proxy_pass documentation explains the URI replacement boundary. The NGINX rewrite documentation covers the processing flags that need broader state.

Verify the target in the running configuration

A calculated URL does not prove that NGINX selected this location or reached the intended backend. Inspect the effective configuration with nginx -T, then observe$request_uri at a controlled upstream or in its request log. For an unknown result, include the relevant rewrite, variable values, and later location search in that check. Entered calculator values stay in this browser.