the more I try to get this to work, the less I understand. Sorry to bug these groups again, but I still need a little help. I would like my zope content (and plone) available to both http adn https urls. I went to betabug/zope/witch and was able to generate the following rule sets. # see http://betabug.ch/zope/witch RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P] RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P] RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ http/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P] RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P] The rules listed above only work to serve content from http://servername/z2.. They refuse to work for https://servername/z2 (that generates a not found error) Any other advice on make both urls work? I also found the following rule from scanning through zope-list postings, to force any logon authentication requests to go over https. However, since the above rules fail, the following does nothing. RewriteRule ^/login_form(.*) https://%{SERVER_NAME}/login_form$1 [NE,L] -- David Bear What's the difference between private knowledge and public knowledge?
Hi David, I'm suffering from a coffee underflow error, so am not 100% (yet!), but... David Bear wrote:
RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]
RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]
RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ http/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]
RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]
The rules listed above only work to serve content from http://servername/z2 .. They refuse to work for https://servername/z2 (that generates a not found error)
Any other advice on make both urls work?
Yes! Your rewrite rules are all rewriting to port 80, but for SSL you need port 443, so you should have something like: - RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ https/%SERVER_NAME}:443/VirtualHostRoot/_vh_z2/ [L,P] ^^^ ...for the SSL versions. HTH! -- Regards, PhilK 'I must create my own system or be enslaved by another man's.' - William Blake
David Bear wrote:
# see http://betabug.ch/zope/witch RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]
RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]
These rules need to appear in the virtual host that's listening on port 443, my suspicion is that it's being applied to the virtual host listening on port 80, and so doing nothing.
RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\ http/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]
RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]
In both cases, I see no need for two rules, just the one should suffice: RewriteRule ^/z2(.*) http://127.0.0.1:9080/VirtualHostBase/\ http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2$1 [L,P] cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Chris Withers -
David Bear -
Philip Kilner