Hosting other sites with Zimbra

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 4.5 Article ZCS 4.5

Apache over http (port 80) and Zimbra over https (port 443)

If you don't need to have non-SSL (http/port 80) access to zimbra webmail and you don't need to have SSL (https/port 443) access to apache, configure zimbra to only listen on https port 443.

su - zimbra
zmtlsctl https
tomcat restart

That's it! Now apache will serve websites (presumably over port 80), and zimbra will serve webmail (over port 443).

Using Apache to host other websites and proxy webmail connections to Zimbra

Note: This topic is covered for both Apache 1.3 and 2 at ZimbraApache; mod_jk is covered at Zimbra_with_Apache_using_mod_jk and Using_Tomcat_with_Apache_(mod_jk).

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/bin/zmprov mcf zimbraMailPort 8009
   /opt/zimbra/bin/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>
       ErrorLog        logs/
       CustomLog       logs/ common
       ProxyPass       /       http://localhost:8009/
       ProxyPassReverse   /     http://localhost:8009/

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 are proxied to http://localhost:8009

For more info check out the following links;

Apache Tomcat Connector Apache Virtual Hosts

Verified Against: Unknown Date Created: 9/26/2006
Article ID: Date Modified: 2015-03-24

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search