3 messages in com.googlegroups.pylons-discussRe: apache reverse proxy + wsgi cherr...
FromSent OnAttachments
Max Ischenko16 Mar 2007 08:04 
Alberto Valverde16 Mar 2007 08:25 
Max Ischenko17 Mar 2007 02:30 
Subject:Re: apache reverse proxy + wsgi cherrypy server + supervisor2
From:Alberto Valverde (albe@public.gmane.org)
Date:03/16/2007 08:25:47 AM
List:com.googlegroups.pylons-discuss

On Mar 16, 2007, at 4:04 PM, Max Ischenko wrote:

Hi,

I have created a document on wiki that tries to capture my experience trying to get this setup running: http://pylonshq.com/project/pylonshq/wiki/ApacheReverseProxy

Comments are appreciated, as are adjustments and corrections.

Btw, there is some overlap between this document, FastCGI and DaemonTools wiki pages. Any ideas how to refactor?

Be sure to mention the use of PrefixMiddleware if using reverse- proxying. I've found out that AuthKit with form authentication (for example) won't generate correct urls if it's not present above the app in the WSGI stack. I have something like this in my staging config:

[filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /beta

[app:main] use = egg:N50CPanel filter-with = proxy-prefix

BTW, I also had to write a short piece of middleware to mangle environ ['wsgi.url_scheme'] if the upfront server is using https so paste.request.construct_url generates correct urls. Maybe url_scheme mangling could be integrated into PrefixMiddleware?

Regards, Alberto