Forum OpenACS Q&A: virtual IPs, apache reverse proxy and aolserver...

I just got more IP addresses for my server and want to move apache to my 4th IP address, while using my 3 instances of aolserver on the first 3 IP addresses. I can easily access my server via putty over the 3 new IP addresses so that I figured that they are set up correctly with my server...

But whenever I want to bind aolserver to port 80 of one of the new IP addresses the aolserver error log tells me that port 80 is already in use. I can only bind aolserver to the new IP address whenever I stop apache, but then apache won't start anymore...

Any experienced network admins??? 😊


Posted by Jeff Davis on
You probably have something listening on port 80 for all IPs. eg:
$ netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0    *               LISTEN
in this case ssh is listening on port 22 for all IPs. if you see that probably means apache has taken port 80...
Posted by Malte Sussdorff on
Well, if you can do it when Apache is down, then it shows that apache is grabing all IP addresses it can lay it's hand on (as is the default btw.).

You have to configure a virtual server and make apache listen only on that specific address.

Take a look at the "Listen" directive.

A virtual host can look like this

    ScriptAlias /cgi/ /usr/local/httpd/cgi-bin/
    DocumentRoot /web/apache/www/

Posted by Mark Aufflick on
As Malte said, you also need to look at the Listen directive. If you have:

Listen 80

it will bind to port 80 everywhere. If you want to bind to just a specific address, use the following format:


See the apache docs - they are actually very nice to use. eg:

Posted by Mark Aufflick on
further to the above, note that VirtualHost directives only tell apache what to do with the addresses/ports it is listening on, they do not affect what addresses/ports apache will bind to.
Posted by David Kuczek on
Mille gracie Jeff, Malte and Mark... I feel like an apache crack 😉 Everything works smoothly now!


Posted by David Kuczek on
Another quick question:

As most DNS servers still have the old IPs registered I am currently using apache to rewrite all connections from to MyNewIP. While Mozilla is presenting me the IP address in the URL input field at the top, IE is still showing! Weird?

How could I make Mozilla also show and not the IP address?