RE: [Zope] problems with SiteRoot in Zope 2.5.1- Workaround/Repla cement sollution
Hi Evan, Thanks for your reply. The VHM sollution works for me. I used the SiteRoot because the only documentation I could find on using Apache and Zserver with SSL suggested SiteRoot. I agree with the comments that SiteRoot can be tricky to use, so with the same functionality I prefer VHM. Perhaps, when I've finished the project I'm working on, I should write some howto's to help others to find some sollutions easier. But at this moment I haven't got time for it so I'll just post this on the list. To be complete for those who want to do the same thing as I did: Use http://www.zope.org/Members/unfo/apache_zserver_ssl with the following changes: ProxyVia as mentioned in http://www.zope.org/Members/unfo/apache_zserver_ssl corrupts things (pages can't be found) but when using VHM you can find the IP-number of the client in the REQUEST (HTTP_X_FORWARDED_FOR). With SiteRoot you needed a patched ProxyVia to get the hostname of the client. So skip the portion of patching ProxyVia in the apache source and don't include "ProxyVia on" in the httpd.conf of apache. In the Apache VirtualHost section for port 80, replace the ProxyPass and ProxyPassReverse lines with the single line: ProxyPass / http://zope_server:8080/VirtualHostBase/http/www.domain.com:80/site_path/Vir tualHostRoot/ In the Apache VirtualHost section for port 443 (https), replace the ProxyPass and ProxyPassReverse lines with the single line: ProxyPass / http://zope_server:8080/VirtualHostBase/https/www.domain.com:443/site_path/V irtualHostRoot/ And: You can determine whether a particular request uses SSL by checking "REQUEST['URL'].startswith('https')". Greetings, Ria Marinussen
----Original Message----- From: Evan Simpson [mailto:evan@4-am.com] Sent: maandag 29 juli 2002 19:04 To: Chris Withers Cc: Ria Marinussen; 'zope@zope.org' Subject: Re: [Zope] problems with SiteRoot in Zope 2.5.1
Chris Withers wrote:
Yes, SiteRoots are no longer in favour with the powers that be. I still think they have their uses ;-)
Citizen Withers, your statement violates the Happy Voluntary Product Guidelines. Please report to the nearest PTB Help Station for assistance. ;-)
Does anybody know whether it is possible to have a configuration with both http and https directing to the same pages like the example in the above mentioned document (apache_zserver_ssl)?
Ria, we'll need more info on the problem you're having in order to help. If you do decide to try VHM, you should be able to get what you want with the following steps:
1. Create a VHM in your Zope root. Call it whatever you like, as long as the name doesn't clash with other objects ids, perhaps "vhm".
2. In the Apache VirtualHost section for port 80, replace the ProxyPass and ProxyPassReverse lines with the single line:
ProxyPass / http://zope_server:8080/VirtualHostBase/http/www.domain.com:80 /site_path/VirtualHostRoot/
3. In the Apache VirtualHost section for port 443 (https), replace the ProxyPass and ProxyPassReverse lines with the single line: ProxyPass / http://zope_server:8080/VirtualHostBase/https/www.domain.com:80/site_path/Vi rtualHostRoot/ In the examples above, "zope_server:8080" is the host/port on which your Zope is listening, "www.domain.com" is your site's domain name, and "site_path" is the path from the root of your Zope to the Folder which contains this site (leave it out if your site lives in the Zope root). You can determine whether a particular request uses SSL by checking "REQUEST['URL'].startswith('https')". Cheers, Evan @ 4-am
participants (1)
-
Ria Marinussen