Project

General

Profile

Actions

ZopeRecipe » History » Revision 6

« Previous | Revision 6/7 (diff) | Next »
Anonymous, 2012-08-11 10:42


Zope & Plone Configurations

This example configuration is used to proxy to a Zope instance that is providing two Plone sites, and an ITracker site on one server. This example assumes that there is only one Zope server running on the same host, and the sites are all in the root folder. If your site is in another folder you need to adjust the configuration to reflect that. For example:

Please review the Virtual Host Monster entry http://plone.org/documentation/tutorial/plone-apache/vhm on Plone.org for a more thorough explaination on how to order the URL rewrite.


url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/site1.example.com:80/the_folder_name/site1/VirtualHostRoot/$1" )

VS.

url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/site1.example.com:80/site1/VirtualHostRoot/$1" )

Note: I'm using the hash balance method because there is only one Zope server running. You may want to change this if you are running more than one Zope server. Please check out the proxy module docs for more information.


# Proxy to the first Plone site.

$HTTP["host"] == "site1.example.com" {

url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/site1.example.com:80/site1/VirtualHostRoot/$1" )

proxy.balance = "hash" 
proxy.server  = ( "/VirtualHostBase" =>
     (
       ( "host" => "127.0.0.1", "port" => 8080 ) ) )
}

# Proxy to the second Plone site.

$HTTP["host"] == "site2.example.com" {

url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/site2.example.com:80/site2/VirtualHostRoot/$1" )

proxy.balance = "hash" 
proxy.server  = ( "/VirtualHostBase" =>
     (
       ( "host" => "127.0.0.1", "port" => 8080 ) ) )
}

# Proxy to an ITracker instance.

$HTTP["host"] == "sitebugs.example.com" {

url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/sitebugs.example.com:80/VirtualHostRoot/sitebugs/$1" )

proxy.balance = "hash" 
proxy.server  = ( "/VirtualHostBase" =>
     (
       ( "host" => "127.0.0.1", "port" => 8080 ) ) )
}

Updated by Anonymous over 11 years ago · 6 revisions