On a single server many ZMS clients are hosted; clients are addressed via different domain names. A solution based on zope.cgi is presented.
Solution: Apache provides the option to use virtual hosts in order to have different servers for different IP addresses, different computer names or different ports on the same computer. The virtual hosts are entered into the file httpd.conf, the configuration file of the Apache web server.
The ZMS clients are configured as virtual hosts of the Apache web server.
For this first a new directory zope-cgi-bin under /usr/local/httpd is to be applied. Now copy the file $ZOPE_HOME/Zope.cgi in this directory /usr/local/httpd/zope-cgi-bin.
Then enter the virtual host entry analog to the example (see below) into the file /etc/httpd/conf/httpd.conf.
Please note that the paths may vary depending on the local installation.
<VirtualHost IP_ADRESS>
ServerName www.myzms.com
ServerAdmin webmaster@myzms.com
ErrorLog /home/www/web3/log/error
CustomLog /home/www/web3/log/access combined
RewriteEngine On
RewriteRule ^/myzms/content/(.*) /$1
RewriteRule /myzms/content/(.*) /$1
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) /usr/local/httpd/zope-cgi-
bin/Zope.cgi/myzms/content$1 \
[e=HTTP_CGI_AUTHORIZATION:%1,
t=application/x-httpd-cgi,l]
</VirtualHost>Comment: In case that at first the secondary language shall be addressed by a domain, e.g. for the English variant the following Apache rule is used that redirects the entry request to index_eng.html:
RewriteRule ^/$ /content/index_eng.html