upstream doesn't rewrite the host name?

mike mike503 at gmail.com
Sat Dec 13 03:24:58 MSK 2008


Yeah I think that is a common point of confusion. You have to pass
along some of the headers explicitly you want, and one of the most
important is Host.

The X-Real-IP and X-Forwarded-For may be redundant, depending on your
application and how it uses it.


On Fri, Dec 12, 2008 at 3:10 PM, Mark Swanson <mark at scheduleworld.com> wrote:
> Ok, after quite a bit of searching and reading I found I needed
> something like this:
>
>    location = / {
>        proxy_pass http://tomcatcluster;
>        proxy_redirect off;
>        proxy_set_header Host $host ;
>        proxy_set_header X-Real-IP $remote_addr ;
>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
>    }
>
> From a newb perspective, the documentation should have contained an
> example like this.
>
> nginx looks amazing.
>
>





More information about the nginx mailing list