Any idea about serving up static content? I have not really tried with charts to see, but not 100% sure that
location ~ \.(gif|jpg|png|css)$ { root /var/lib/tomcat6/webapps/; } is correct. Is there any thing generated on the fly (png's, js) which is not static? On Mon, Dec 12, 2011 at 12:43 PM, Bob Jolliffe <bobjolli...@gmail.com>wrote: > 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