[Grok-dev] how to change url scheme from http to https

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Apr 16 06:09:41 EDT 2010

David Marceau <uticdmarceau2007 at yahoo.ca> wrote:
> I have a grok test page that works in the url scheme http.  The todo
> app.py/app_templates/index.pt function correctly to generate the
> appropriate form and proper http://omac.darktech.org/todo/ base urls.
> I have made several attempts to move the entire site to https.
> The good news is that the https connections to the server are
> successful.  The other good news is that the actual binary files served
> at certain https urls are served correctly.
> When deploy.ini has scheme = https and HTTPS = on, I can access:
> https://omac.darktech.org/todo/files/mp3tests.atorrent
> The only issue is the index.pt is not generating the proper page output.
>  It still generates and sends a response containing http urls.
> (i.e. http://omac.darktech.org/todo/files/mp3tests.atorrent)
> HOW DO I MAKE GROK/ZOPE CHANGE THE url scheme to https?
> When deploy.ini has scheme = https and HTTPS = on, it's not enough.
> I'm missing something, but I don't know what it is.

You raise an interesting point: you apparently can run the paster "server" 
in https, but zope itself does not know about that and will happily 
generate http URLs.

I can only help by telling you what we do:

We use apache as a frontend server and use proxying rewrite rules to direct 
traffic to the zope/grok backend. The rewrite rules apply zope's virtual 
host syntax to instruct zope how to generate URLs including the protocol-
part of the URL.

I hope this helps,

More information about the Grok-dev mailing list