I'm a newby Paste user and I might be saying rubbish, so in case
please correct me.

I've been having quite a few problems using Pylons behind Apache with
mod_proxy. In the end I figured it depended on PrefixMiddleware
implementation, that was doing the wrong thing for me.

I'm referring to the implementation I found in:
http://svn.pythonpaste.org/Paste/Deploy/trunk/paste/deploy/config.py

My Apache configuration is such that the 2 http headers added by
mod_proxy have a different value. Specifically:

'HTTP_X_FORWARDED_HOST': 'intra.pragma2000.com',
'HTTP_X_FORWARDED_SERVER': 'cedro.pragma2000.com',

PrefixMiddleware implementation takes the latter into account, but in
my case it is the first that I would like to use. After all, I read on
the documentation of mod_proxy (taken from
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers):

X-Forwarded-Host
   The original host requested by the client in the Host HTTP request header.
X-Forwarded-Server
   The hostname of the proxy server.

To me, it makes a lot more sense that X-Forwarded-Host be used,
instead of X-Forwarded-Server, because I would then be sure that the
url doesn't change.
If I access the url foo.bar that is server by server fooserv.bar, I
would like to see all my urls being foo.bar, rather that fooserv.bar,
also because fooserv.bar may not even be resolvable from the outside
world.

I found no discussion about this topic. I'm wondering if I didn't
search properly, or if I'm just the first one to make the point. So
far, I just hacked PasteDeploy to make it work for me, but I'd rather
hear other opinions about it.

Thanks,
stefano

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to