Difference between revisions of "Hosting other sites with Zimbra"

 
(A slash was missing in ProxyPassReverse)
Line 24: Line 24:
 
         CustomLog      logs/zimbra.foo-access_log common
 
         CustomLog      logs/zimbra.foo-access_log common
 
         ProxyPass      /      <nowiki>http://localhost:8009/</nowiki>
 
         ProxyPass      /      <nowiki>http://localhost:8009/</nowiki>
         ProxyPassReverse       <nowiki>http://localhost:8009/</nowiki>
+
         ProxyPassReverse   /    <nowiki>http://localhost:8009/</nowiki>
 
         </VirtualHost>
 
         </VirtualHost>
 
----   
 
----   

Revision as of 18:38, 6 March 2007

This document applies to Apache 2.0+

To do virtual hosts with zimbra is fairly straight forward. This is particularly relevant if you want to use the normal apache release on redhat.


The first thing to do is to change the mailport (the main listening port for web requests) from 80 to something else (8009 for example)


   /opt/zimbra/zmprov mcf zimbraMailPort 8009
   /opt/zimbra/zmprov gcf zimbraMailPort
   /opt/zimbra/bin/tomcat stop
   /opt/zimbra/bin/tomcat start

Make sure that this is done as the zimbra user. Tomcat doesn't take notice of the changes unless a start + stop is done (ie. not a restart)


Assuming that a standard apache install has been done off RPM then it is just a matter of adding the appropriate lines to the VirtualHosts section of the apache conf file


       <VirtualHost *:80>
       ServerAdmin admin@foo.com
       Servername      zimbra.foo.com
       ErrorLog        logs/zimbra.foo.com-error_log
       CustomLog       logs/zimbra.foo-access_log common
       ProxyPass       /       http://localhost:8009/
       ProxyPassReverse   /     http://localhost:8009/
       </VirtualHost>


The critical lines are the ProxyPass lines. This assumes that zimbra is running on the same host.

With this config, any requests that come to zimbra.foo.com are proxied to http://localhost:8009

For more info check out the following links;

Apache Tomcat Connector Apache Virtual Hosts

Jump to: navigation, search