Using Apache rewrite to server Zope/Plone - VirtualHostMonster and / or SiteAccess?
Hi, I'm running Debian 3.0, Python 2.3.3, Zope 2.7 and Plone 2.0.3. I have Apache 1.3.27 running, and I am attempting to serve a Plone site via Apache's rewrite rules. Here's how things are set up: Apache DocumentRoot at /usr/local/apache/htdocs, contains a folder zope Within Zope, I have a folder, zope, which contains a Plone site (erebus_plone) and a Virtual host monster. Apache is running on the institute's internal network (only) at erebus.ait.ie (port 80), and Zope is on erebus.ait.ie:8080 I want the Plone site to appear in response to http://erebus.ait.ie (I need to retain Apache for cgi-bin and other legacy content). Here's what I have in httpd.conf: DocumentRoot /usr/local/apache/htdocs/zope RewriteEngine On RewriteLog "/usr/local/apache/logs/rewrite_log" RewriteLogLevel 1 RewriteRule ^/local/ - [L] RewriteRule ^/icons/ - [L] RewriteRule ^/~(.*) - [L] RewriteRule ^/cgi-bin/ - [L] RewriteRule / http://erebus.ait.ie:8080/zope/VirtualHostBase/http/erebus.ait.ie/VirtualHos... [P] This gives me access to the Plone site in response to the URL http://erebus.ait.ie, but it doesn't display correctly: I get a very basic html page, not Plone in all its glory. As an alternative approach, I tried RewriteRule / http://erebus.ait.ie:8080/zope/erebus_plone/VirtualHostBase/ [P] This gives me Plone in all its glory, but with a 404 error message: not found. I've been reading any relevant material I could find (searched zope.org, read the relvant section of the Zope Book) and I have to admit I'm not sure how to correct this problem - in fact, I'll admit I don't fully understand the syntax in the RewriteRules. Possible options: 1. Put the Virtual Host Monster into Zope's Root folder? The reason I'm not doing this is that on a previous attempt I lost access to the ZMI. 2. Add a SiteRoot object into the Root folder? zope folder? Again, I've tried this, and have had problems getting access to the ZMI. I'd appreciate it if someone could point me in the direction. Zope.org content I have read include: Using Apache with ZServer (NOT Zope.cgi) Apache As A Front End To ZServer Debian: Zope and Apache with Mod-Rewrite Thanks in advance, Cormac. The information contained in this email is confidential and is designated solely for the attention of the intended recipient(s). If you have received this email in error, please do not use or transmit it for any purpose but rather notify us immediately and delete all copies of this email from your computer system(s). Unless otherwise specifically agreed by our authorised representative, the views expressed in this email are those of the author only and shall not represent the view of or otherwise bind Athlone Institute of Technology. Contact administrator@ait.ie or telephone 090 6471858. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
On 17 Jun 2004, at 11:12, Cormac McClean wrote:
Using Apache with ZServer (NOT Zope.cgi)
FWIW, I used the instructions found at <http://zope.org/Members/anser/apache_zserver> to configure the proxy pass module for an Apache virtual host. I have not touched the virtual host monster and don't have any great plans to ever use it. In your case, you'd configure Apache so that erebus.ait.ie just maps through to the appropriate folder in Zope. <VirtualHost *> ServerName erebus.ait.ie ProxyPass / http://erebus.ait.ie:8080/pathToRootForSite/ ProxyPassReverse / http://erebus.ait.ie:8080/pathToRootForSite/ </VirtualHost> You do need to setup the proxypass module in Apache of course. I've read a post or two about how this is all a security concern but reading mod_proxy's docs <http://httpd.apache.org/docs/mod/mod_proxy.html>, the worry seems to be with the ProxyRequests directive which is off by default. If you allow ProxyPass and the sister ProxyPassReverse directives on a per (virtual) host basis, you should to be OK - even more so as your server is an internal one. HTH Simon Forster _____________________________________________________ LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247 _____________________________________________________
Many thanks for your response, Simon. I'll try that. Regards, Cormac. Simon Forster wrote:
On 17 Jun 2004, at 11:12, Cormac McClean wrote:
Using Apache with ZServer (NOT Zope.cgi)
FWIW, I used the instructions found at <http://zope.org/Members/anser/apache_zserver> to configure the proxy pass module for an Apache virtual host. I have not touched the virtual host monster and don't have any great plans to ever use it. In your case, you'd configure Apache so that erebus.ait.ie just maps through to the appropriate folder in Zope.
<VirtualHost *> ServerName erebus.ait.ie
ProxyPass / http://erebus.ait.ie:8080/pathToRootForSite/ ProxyPassReverse / http://erebus.ait.ie:8080/pathToRootForSite/
</VirtualHost>
You do need to setup the proxypass module in Apache of course.
I've read a post or two about how this is all a security concern but reading mod_proxy's docs <http://httpd.apache.org/docs/mod/mod_proxy.html>, the worry seems to be with the ProxyRequests directive which is off by default. If you allow ProxyPass and the sister ProxyPassReverse directives on a per (virtual) host basis, you should to be OK - even more so as your server is an internal one.
HTH
Simon Forster _____________________________________________________ LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247 _____________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
The information contained in this email is confidential and is designated solely for the attention of the intended recipient(s). If you have received this email in error, please do not use or transmit it for any purpose but rather notify us immediately and delete all copies of this email from your computer system(s). Unless otherwise specifically agreed by our authorised representative, the views expressed in this email are those of the author only and shall not represent the view of or otherwise bind Athlone Institute of Technology. Contact administrator@ait.ie or telephone 090 6471858. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
Hi, I now have access to Plone using ProxyPass. I needed to add a SiteObject into the zope folder to allow the Plone site to be displayed properly. Thanks, Cormac. Simon Forster wrote:
On 17 Jun 2004, at 11:12, Cormac McClean wrote:
Using Apache with ZServer (NOT Zope.cgi)
FWIW, I used the instructions found at <http://zope.org/Members/anser/apache_zserver> to configure the proxy pass module for an Apache virtual host. I have not touched the virtual host monster and don't have any great plans to ever use it. In your case, you'd configure Apache so that erebus.ait.ie just maps through to the appropriate folder in Zope.
<VirtualHost *> ServerName erebus.ait.ie
ProxyPass / http://erebus.ait.ie:8080/pathToRootForSite/ ProxyPassReverse / http://erebus.ait.ie:8080/pathToRootForSite/
</VirtualHost>
You do need to setup the proxypass module in Apache of course.
I've read a post or two about how this is all a security concern but reading mod_proxy's docs <http://httpd.apache.org/docs/mod/mod_proxy.html>, the worry seems to be with the ProxyRequests directive which is off by default. If you allow ProxyPass and the sister ProxyPassReverse directives on a per (virtual) host basis, you should to be OK - even more so as your server is an internal one.
HTH
Simon Forster _____________________________________________________ LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247 _____________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
The information contained in this email is confidential and is designated solely for the attention of the intended recipient(s). If you have received this email in error, please do not use or transmit it for any purpose but rather notify us immediately and delete all copies of this email from your computer system(s). Unless otherwise specifically agreed by our authorised representative, the views expressed in this email are those of the author only and shall not represent the view of or otherwise bind Athlone Institute of Technology. Contact administrator@ait.ie or telephone 090 6471858. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
participants (2)
-
Cormac McClean -
Simon Forster