Project

General

Profile

Actions

ZopeRecipe » History » Revision 2

« Previous | Revision 2/7 (diff) | Next »
Anonymous, 2006-12-01 21:36
Switch balance method from fair to has because there is only one Zope server.


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:

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

VS.

url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/site1.example.com:80/VirtualHostRoot/site1/$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.

{{{
  1. Proxy to the first Plone site.

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

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

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

  1. Proxy to the second Plone site.

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

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

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

  1. 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 about 18 years ago · 2 revisions