February 11, 2013 04:13PM
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 (http://nginx.org/r/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 "/media/myimage.jpg"
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 serverIP/media/myimage.jpg
Subject Author Posted

Nginx seems to ignore proxy_set_header Host directive

jeangouytch February 11, 2013 10:44AM

Re: Nginx seems to ignore proxy_set_header Host directive

Francis Daly February 11, 2013 02:10PM

Re: Nginx seems to ignore proxy_set_header Host directive

jeangouytch February 11, 2013 04:13PM

Re: Nginx seems to ignore proxy_set_header Host directive

Francis Daly February 11, 2013 04:44PM

Re: Nginx seems to ignore proxy_set_header Host directive

jeangouytch February 12, 2013 02:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready