Make relative paths in proxy go to the right server

AussieSusan nginx-forum at
Tue May 24 05:25:05 UTC 2022

I am a total newbie to this and I don't even know if what I want to do is

I have a web server that locally serves some of the files but in one case
needs to  pass the web requests on to another server.

For example: "" needs to be handled locally, but
"" needs to go to a different server on the
network. To do this I have:

       location /whatever {

This works OK but the pages served by the other server have relative paths
to files that are relative to THAT server. The user's browser converts the
relative paths from "other_base/file_path.css" to

I could add another 'location' entry to my configuration for "/other_base"
but there is no guarantee that the 'other_base" name will always be the

What do I need to put in the Nginx configuration so that the files relative
to the other server are correctly redirected (e.g.")


Posted at Nginx Forum:,294234,294234#msg-294234

More information about the nginx mailing list