3 messages in ru.sysoev.nginxRe: upstream doesn't rewrite the host...
FromSent OnAttachments
Mark SwansonDec 12, 2008 2:43 pm 
Mark SwansonDec 12, 2008 3:09 pm 
mikeDec 12, 2008 4:24 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: upstream doesn't rewrite the host name?Actions...
From:mike (mike@gmail.com)
Date:Dec 12, 2008 4:24:35 pm
List:ru.sysoev.nginx

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 <ma@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.