[Zope] httpd.conf Zope on Apache-based ISP FINAL DRAFT

Patrick Kirk patrick at kirks.net
Fri Feb 27 04:17:42 EST 2004


Hi guys,

Thanks for the feedback.  The hosting company has kindly installed Zope 
in /opt so I just have to choose where to put my Zope instance.  Based 
on your advice, I'll put it in /websites/enterpri

I'm sorry if I seem to be asking basic questions - I had assimed that a 
hosting company with python expertise would also have Zope expertise and 
expected all this would be done for me.  I guess its a useful learning 
experience.

cd /websites/enterpri
/opt/zope/bin/mkzopeinstance.py

Edit /etc/zope.conf to set port to 8081
then simply
./zope/bin/zopectl start

Within zope, I create a folder called www where I have my public site. 
The basic site is essentially ready on my Win2k box at home.

I add a VHM to the root folder.

For the hosting company they then need to add this line to httpd.conf

RewriteRule ^/(.*) 
http://64.5.48.153:8081/VirtualHostBase/http/enterprise-hr.com:80/VirtualHostRoot/$1

Are we sure of this?  My reading of the text of the VHM says I should 
have the folder name of the site's files.  There will be 2 other 
subdomains of enterprise-hr.com in 2 other folders so I don't understand 
how zope can guess which folder to use.  Perhaps I ought have made that 
clear in my first email.

My guess was that if the suddomains were called staff.enterprise-hr.com 
and projects.enterprise-hr.com in folders called staff and projects the 
rules would be as follows.

RewriteRule ^/(.*) 
http://64.5.48.153:8081/VirtualHostBase/http/www.enterprise-hr.com:80/www/VirtualHostRoot/$1

RewriteRule ^/(.*) 
http://64.5.48.153:8081/VirtualHostBase/http/staff.enterprise-hr.com:80/staff/VirtualHostRoot/$1

RewriteRule ^/(.*) 
http://64.5.48.153:8081/VirtualHostBase/http/projects.enterprise-hr.com:80/projects/VirtualHostRoot/$1

Thanks for taking the time to read this lot!  Look forward to your 
comments.


Best regards,


Patrick Kirk
Mobile: 07876 560 646




Troy Farrell wrote:
> Chris, I'm glad you noticed that.  In my example, my zope installation 
> directory (/home/troy/zopehome/studyshare/) is not publically served.
> 
> Patrick, I want to be sure you understand with which path you need to be 
> concerned.  /websites/enterpri/public_html is irrelevant as far as Zope 
> is concerened.  I would install zope to /websites/enterpri/zope/.  My 
> rewrite rule:
> 
> RewriteRule ^/(.*)
> http://127.0.0.1:8085/VirtualHostBase/http/studyshare.net:80/sites/studyshare_net/VirtualHostRoot/$1 
> 
> [L,P]
> 
> It looks like this because what you see at http://studyshare.net:80/ is 
> exactly the same was what you would see if you visited 
> http://127.0.0.1:8085/sites/studyshare_net/ on the server.  If you want 
> to serve your website from the root folder of Zope, your rule should 
> change from:
> 
> RewriteRule ^/(.*)
> http://64.5.48.153:8081/VirtualHostBase/http/enterprise-hr.com:80/websites/enterpri/public_html/zope/VirtualHostRoot/$1 
> 
> [L,P]
> 
> to
> 
> RewriteRule ^/(.*) 
> http://64.5.48.153:8081/VirtualHostBase/http/enterprise-hr.com:80/VirtualHostRoot/$1 
> 
> 
> When you use Apache to proxy for Zope, Apache doesn't care in what 
> directory Zope lives.  It only cares about the IP and port.  Don't 
> forget to add a VirtualHostMonster to your Zope root folder.
> 
> Troy
> 
> Chris Withers wrote:
> 
>> Patrick Kirk wrote:
>>
>>> Zope will be untarred to a folder called 
>>> /websites/enterpri/public_html/zope and configured to run on port 8081
>>
>>
>>
>> Won't this mean your Zope installation's code will be publicly 
>> abailable on the web?



More information about the Zope mailing list