Nginx seems to ignore proxy_set_header Host directive

jeangouytch nginx-forum at
Mon Feb 11 21:13:28 UTC 2013

Hi Francis. Thank you for your help.

> Which relative paths?  How do you want them to be rewritten?
> What part of the nginx config do you expect will do the rewriting?
> And how does that match the subject of this mail?
> proxy_redirect ( can do rewriting of
> http headers, except you've turned it off here.
> proxy_set_header doesn't do rewriting of anything. Neither does
> proxy_pass.
> > I would be very grateful if someone had a clue to help me
> understanding what
> > I am doing wrong.
> Can you give an example of what you do, what you see, and what you
> expect to see? "curl -i" is usually a good way of showing the headers
> and content returned.
Ok, I think i'm not using the right words, maybe "rewriting" is not the
exact term. My problem is :
relative path for images are normal in the html files, looking like
I understand that the proxy_set_header directive would make the relative
path to be treated as serverIP/pyload/media/myimage.jpg, but the chrome
console shows that the relative path are treated as

Posted at Nginx Forum:,236099,236115#msg-236115

More information about the nginx mailing list