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

David Marceau uticdmarceau2007 at yahoo.ca
Thu Apr 8 20:02:55 EDT 2010


Hi there,

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.

For the moment, I have turned off https, but here are all the things
I've tried, but to no avail:
taken out of the appache2 siteconfig
RewriteEngine on
RewriteCond %{HTTP_HOST} !^omac.darktech.org [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://omac.darktech.org/$1 [L,R=301]
RewriteRule ^(.*)$ https://omac.darktech.org/$1 [L,R=301]
RewriteRule ^/(.*)

School Tool mentioned this approach,
http://source.schooltool.org/svn/branches/schoolbell-1.2.x/README.txt
but it didn't seem to work for me:
http://localhost:16003/++vh++https:omac.darktech.org:443/++/$1 [P]

SetEnv HTTP_X_VHM_HOST https://omac.darktech.org/todo/
SetEnv HTTPS On
SSLEngine On
RewriteEngine on
RewriteRule ^(.*)
http://localhost:16003/++vh++https:omac.darktech.org:443/++/$1 [P]
SetEnv HTTP_X_VHM_HOST https://omac.darktech.org/todo/
SetEnv HTTPS On

taken out of grok todo deploy.ini
scheme = https
HTTPS = on
HTTP_X_FORWARDED_FOR = omac.darktech.org
HTTP_X_FORWARDED_SCHEME = https
HTTP_X_FORWARDED_PROTO = https

RewriteEngine on
RewriteRule ^(.*)
https://localhost:16003/++vh++https:omac.darktech.org:443/++/$1 [P]
RewriteLog "/var/log/apache2/rewrite.log"
RewriteLogLevel 1
ProxyRequests off

Thanks in advance




More information about the Grok-dev mailing list