On Mon, Aug 8, 2011 at 6:49 AM, Chris McDonough <chr...@plope.com> wrote: > On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: >> >> Right. I'd rather apply this: "don't generate fully-qualified URLs in >> >> your web apps, or you may have trouble running them behind proxies". >> > >> > You're eventually going to run into situations with middleware that >> > unconditionally generates fully qualified URLs where I believe you're >> > going to need to modify that to "always set ProxyPreserveHost On". But >> > until then, you can try to ignore it by generating only paths, although >> > I don't think that makes much sense given that it's so easy to turn on. >> >> Got you. >> >> Also, FWIW, when relying on ProxyPreserveHost the backend must be >> aware of the proxy, as it needs a ServerName or ServerAlias >> referencing the proxy. This might be a management hassle in some >> situations. > > I don't think so, unless you're defining "backend" differently than I > am. The point of passing along the Host header is so that things behind > the proxy don't need to know or care about the proxy.
Here's what I have for the Apache config of the backend: # file managed by puppet <VirtualHost *:80> ServerName foo ServerAlias foo.dmz.camptocamp.com ServerAlias foo.camptocamp.com # <- proxy hostname ... </VirtualHost> Without the second ServerAlias statement incoming requests with Host:foo.camptocamp.com lead to 404's from Apache. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.