Welcome! Log In Create A New Profile

Advanced

Re: Nginx seems to ignore proxy_set_header Host directive

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
SubjectAuthorPosted

Nginx seems to ignore proxy_set_header Host directive

jeangouytchFebruary 11, 2013 10:44AM

Re: Nginx seems to ignore proxy_set_header Host directive

Francis DalyFebruary 11, 2013 02:10PM

Re: Nginx seems to ignore proxy_set_header Host directive

jeangouytchFebruary 11, 2013 04:13PM

Re: Nginx seems to ignore proxy_set_header Host directive

Francis DalyFebruary 11, 2013 04:44PM

Re: Nginx seems to ignore proxy_set_header Host directive

jeangouytchFebruary 12, 2013 02:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 62
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready