[Grok-dev] grok problems using https behind apache using mod_wsgi
alex.garel at tarentis.com
Thu Oct 25 07:36:55 UTC 2012
Le 09/10/2012 10:19, Päivi Rosenström a écrit :
> I'm beginner with grok and I try to set grok to run behind apache
> using wsgi. I run into following problems.
> Application developed using grok runs smoothly with paster server. I
> also managed to get it run behind Apache with mod_wsgi while
> connecting the application using http. But while attempting to
> connect with https, the next click sets the protocol back to http.
> This was with the configuration where application could have been used
> either by http or https.
I'm very late but I run in a similar problem yesterday. I am using
mod_proxy but the trick may do with WSGI.
I simply wanted to deploy my application using Apache as a frontend to
proxy paster. I also want Apache to handle https.
At my first attempt, server was responding but links and form actions
were in http:// instead of https://
Finally I found PrefixMiddleware
I add it as a filter to my application in paster deploy.ini and then ask
Apache to add an |X-Forwarded-Scheme = https in request header.
the PrefixMiddleware in deploy.ini looks like :
use = egg:PasteDeploy#prefix
next = myapp
and the Apache configuration (with mod_proxy, mod_headers and mod_ssl):
RequestHeader set X-Forwarded-Scheme https
ProxyPass / http://127.0.0.1:8083/
I think you can use same technique of |PrefixMiddleware +
||X-Forwarded-Scheme| header in your mod_wsgi conifguration.
Hope this helps,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Grok-dev