reverse proxy does not load webpage data

petrg nginx-forum at
Tue Feb 2 08:43:32 UTC 2021

Hey Francis, 

thanks a lot for your extensive answer.
Now I understand much better. 
But let me discuss one misty point.

> There is no magic; it does what you configure it to do. The browser makes
> a request to nginx; nginx handles that according to its config. Every
> request is independent.
> > How should nginx(PC-proxy) know, where to find the image-file
> > /images/logo.jpg that is asked for by the webpage ?
> You need to configure your nginx to do what you want it to do.

My hope was that the proxy-pass directive creates not magic but some
“context”, wraps the whole handling of the webpage into some linked
“context”, so a bit more than just a straight location directive does. And
so all the following requests from that webpage live in that “context”.
So when you define a proxy-pass to all the following
requests from that webpage starting with should
be directed to at least

If every request is independent, you must know the internal structure of a
webpage when you like to reverse-proxy it. Is that true ?
My feeling is that you should be able to reverse-proxy a webpage without
knowing anything of the internal details, how data are loaded interenally.
So my hope was that the proxy directive wraps the webpage and all the
internal requests and knows where to direct the related requests to.

> When the browser talks to PC-proxy and asks for
> it gets the same html back,
> and it makes five new requests for 
> ...

When I call I hoped that the following not
absolute requests would be proxied to,, …
as the proxy knows that one.jpg belongs to what is proxied to 
And so it can direct the internal request for one.jpg to 

Is that a "slightly" wrong understanding of the proxy functionality ? and
too much of magic ?

Posted at Nginx Forum:,290609,290624#msg-290624

More information about the nginx mailing list