Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-22-2009, 12:24 PM
Active Member
 
Posts: 26
Default ZCS 6 specify IP address to bind to?

I'm running zcs 6.0.2 on Ubuntu 8.04 - I have two public IP addresses. I'd like Zimbra to only bind port 80 to one of them since I'd also like to run Apache.

I can tell Apache what IP address and port to listen on, i.e. by defining the specific IP and port in ports.conf and httpd.conf.

Can I do the same for Zimbra? I was hoping it would only bind to the address that the hostname is resolving to, instead of all addresses...

For instance:
xxx.xxx.xxx.100 - mail.mydomain. com - Zimbra port 80
xxx.xxx.xxx.101 - www.mydomain. com - Apache port 80

I have the proper IP addresses set up DNS and hosts file...

I know I can use Apache, mod_proxy and virtual hosts to redirect Zimbra to a non-standard port, which has been my standard config.

Thanks
Daniel
Reply With Quote
  #2 (permalink)  
Old 11-22-2009, 10:47 PM
Outstanding Member
 
Posts: 594
Default

Yes it uses based on hostname and not IP address.
Reply With Quote
  #3 (permalink)  
Old 11-23-2009, 07:42 AM
Active Member
 
Posts: 26
Default

That was the impression that I had gotten... however, my experience seems to differ.

The IP address I want assigned to zimbra, is the only one present in my hosts file and is the A record in DNS for both mail.mydomain .com and mydomain .com.

I even went so far as to take down the virtual interface while zimbra installed. Allowed zimbra to install, restarted the network to bring both IPs up - and apache complained about the socket being taken on my second IP.

This is a clean install of Ubuntu, the only thing installed on it is MySQL, Apache, Webmin and Zimbra. Here's the smoking gun:

Code:
root@mail:~# lsof -i :80
COMMAND   PID   USER   FD   TYPE  DEVICE SIZE NODE NAME
java    17002 zimbra   74u  IPv6 1501558       TCP *:www (LISTEN)
It seems regardless of what is set in hosts or DNS, it attempts to bind to all listening addresses, i.e. *:www

Where/How can I change this behavior?

Thanks
Reply With Quote
  #4 (permalink)  
Old 11-24-2009, 08:21 PM
Outstanding Member
 
Posts: 708
Default

Read the Jetty documentation on mortbay.org... with the caveat that you'll have to redo the change after every Zimbra upgrade, and possibly hack the startup scripts because many config files are built on the fly.

There's another way, though. Let Zimbra bind to *:80, move Apache to 8080, and redirect one ip:80 to ip:8080 with iptables. I recall there being a recipe for this in the Jetty FAQ, under "how can I listen on port 80 if running as non-root."
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.