Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two debian 6 servers running keepalived 1.1.20 with one server acting as a Master and the other as a Backup. Both servers host apache 2.4 that have a global Listener on all interfaces on port 80 (Listen *:80) how ever I have some sites that require a listener for port 443 (SSL) and that is configured for each VirtualHost in the Apache config since I do not want every VirtualHost to listen on port 443.

The problem is when I try to start Apache on the Backup machine that does not hold the virtual interface the VirtualHost is supposed to be listening on, I get AH00072: make_sock: could not bind to address I know this is expected behavior of Apache.

The real question is are there any known workarounds or solutions to this scenario?

share|improve this question
up vote 1 down vote accepted

You can use the following command as root:

# echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind

This enables your applications to be able to bind to an address which doesn't belong to a device on your system. You can set this in /etc/sysctl.conf to make it permanent.

share|improve this answer
This is certainly a very elegant solution, but I'd like to add that keepalived can also be configured to run scripts when a state transition occurs. This allows for any kind of changes to the services running on a server. See the notify commands in keepalived(5). – Oliver Apr 30 '12 at 16:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.