ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-List
zope-List
Re: Fwd: [Zope] Server Spontaneously Quitting
by Troy Farrell other posts by this author
Mar 1 2004 5:54AM messages near this date
Re: [Zope] Server Spontaneously Quitting | Re: Fwd: [Zope] Server Spontaneously Quitting
Looks good.  I'd make one change.  In my setups, I'm adamant that Zope 
is not accessed, except by via apache.  I edit my zope setup to listen 
only on localhost (127.0.0.1) and change my Apache RewriteRules to use 
that instead of the server ip (111.111.111.111.)  I also like my 
managing to be done via https so passwords are not passed cleartext. 
For that to work, I have an additional domain (or sub-domain.)

Zope looks like this:

Zope root (zope.domain.com)
  + buystuff (buystuff.com)
  + mycause (mycause.com)

Apache listens on 443 and 80, then I use the following rewrite rules

buystuff.com:
     # Zope management rule
     RewriteRule ^(.*)/manage(.*) 
https://zope.domain.com/buystuff$1/manage$2 [R]
     # Zope VHM rule
     RewriteRule ^/(.*) 
http://127.0.0.1:8081/VirtualHostBase/http/www.buystuff.com:80/buystuff/VirtualHostRoot/$1 
[L,P]

mycause.org:
     # Zope management rule
     RewriteRule ^(.*)/manage(.*) 
https://zope.domain.com/mycause$1/manage$2 [R]
     # Zope VHM rule
     RewriteRule ^/(.*) 
http://127.0.0.1:8081/VirtualHostBase/http/www.mycause.org:80/mycause/VirtualHostRoot/$1 
[L,P]

This way, you only have one IP and one SSL cert - saves money.  BTW, 
'buystuff$1' is not a typo.  It's needed because the pattern match 
includes the forward-slash.

Troy

Patrick Kirk wrote:
>  OK.  I'd be grateful if others on the list would read this as well to 
>  provide a sanity check.
>  
>  Step 1: Put a Virtual Host Monster in your Zope root folder.  Give it a 
>  unique id but it really doesn't matter what you call it.
>  
>  Step 2: Let us assume you have a site called http://www.buystuff.com 
>  served from a folder called "buystuff" in your root directory and a site 
>  called http://www.mycause.org is served from "mycause" folder.  Lets 
>  also assume your IP is 111.111.111.111 and Zope is on port 8081 with 
>  Apache on port 80.
>  
>  Step 3: The virtual hosts section for www.buystuff.com will read:
>  <VirtualHost *:80>
>      ServerAdmin you@[...].com
>      DocumentRoot /this/does/not/matter
>      ServerName www.buystuff.com
>      ErrorLog logs/www.buystuff.com-error_log
>      CustomLog logs/www.buystuff.com-access_log common
>      RewriteEngine on
>      RewriteRule ^/(.*) 
>  http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/buystuff/VirtualHostR
oot/$1 
>  [NC,L,P]
>  
>  </VirtualHost>
>  
>  Step 4: The virtual hosts section for www.mycause.org will read:
>  <VirtualHost *:80>
>      ServerAdmin you@[...].com
>      DocumentRoot /this/does/not/matter
>      ServerName www.mycause.org
>      ErrorLog logs/www.mycause.org-error_log
>      CustomLog logs/www.mycause.org-access_log common
>      RewriteEngine on
>      RewriteRule ^/(.*) 
>  http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/mycause/VirtualHostRoo
t/$1 
>  [NC,L,P]
>  
>  </VirtualHost>
>  
>  Apart from the [NC,L,P] this is from the virtual host monster 
>  documentation.  And others on this list gave me them!
>  
>  Step 5: Run the command "apachectl configtest" and it will tell you if 
>  there are any syntax errors without requiring you to restart apache and 
>  find out the hard way you've put a comma in the wrong place.
>  
>  Step 6: Run "apachectl restart" and your sites should now be served from 
>  Zope through Apache.  And the beauty of it is that it just works.
>  
>  If you have any problems, let us know.
>  
>  Best regards,
>  
>  Patrick Kirk

_______________________________________________
Zope maillist  -  Zope@[...].org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
Thread:
Murray Pearson
Patrick Kirk
Murray Pearson
Troy Farrell
Patrick Kirk
Patrick Kirk
Troy Farrell

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved