On 12 December 2011 10:19, Jo Størset <stor...@gmail.com> wrote: > > Den 12. des. 2011 kl. 10.16 skrev Jason Pickering: > >> It is using straight HTTP, and in this example, serves up the static >> content, bypassing the Tomcat server. I have not tried with the web-api, but >> everything else seems to work (and is much faster than Apache with much >> lower memory consumption). Would be good to know if it actually works >> however. :) > > Haven't looked at it, but I would guess that these are used by tomcat for > creating the request object: > > + proxy_set_header X-Real-IP $remote_addr; > + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > + proxy_set_header Host $http_host; > > > Seems to be a de facto standard [1], so it should be fine. It's probably > worth it to verify this, though.. > > [1] http://en.wikipedia.org/wiki/X-Forwarded-For
Not sure if X-Forwaded-For is really relevant to this side of the problem. This is to make sure the server has access to information about the "real" client rather than just the proxy. Mind you it looks like the 3rd line above deals with the issue of whether the client sees the "real" host name in the request. From http://wiki.nginx.org/HttpProxyModule#proxy_pass : "By default, the Host header from the request is not forwarded, but is set based on the proxy_pass statement. To forward the requested Host header, it is necessary to use: proxy_set_header Host $host;" So looks ok indeed :-) Bob > > Jo _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp