ZimbraApache
Q: How to run Apache + Zimbra on the same host without having to use wird port to access any of them ? A: Use mod_proxy ;)
[You must have several hostname for your server (for example zimbra.mydom.com and www.mydom.com)] [I am using a Debian Sarge.]
First of all, change zimbraMailPort and restart zimbra so our apache can listen on 80, do it like this :
zmprov ms zimbra.mydom.com zimbraMailPort 81 /etc/init.d/zimbra restart
Then, install your prefered apache version (1.3 / 2) and add the proxy module :
for apache 1.3 : echo "LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so" >> /etc/apache/modules.conf apachectl restart
for apache 2 : ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf /etc/init.d/apache2 restart
Now we can add our virtualhosts.
for apache 1.3, go into /etc/apache/conf.d/ and create/edit vhosts.conf : [for apache 2 go into /etc/apache2/conf.d/] NameVirtualHost *:80
<VirtualHost *:80> ServerAdmin dz@mydom.com DocumentRoot /var/www/myweb ServerName www.mydom.com ErrorLog /var/log/apache/www-error.log CustomLog /var/log/apache/www-access.log common </VirtualHost>
<VirtualHost *:80> ServerName zimbra.mydom.com ServerAdmin dz@mydom.com ProxyPass / http://zimbra.mydom.com:81/ ProxyPassReverse / http://zimbra.mydom.com:81/ ErrorLog /var/log/apache/zimbra-error.log CustomLog /var/log/apache/zimbra-access.log common </VirtualHost>
Almost done. Restart everythings. Test your new hosts. Enjoy Zimbra ;)