Having Apache NOT listen on specific IP

2 posts / 0 new
Last post
#1 Wed, 08/14/2013 - 11:50
andre@andregarz...

Having Apache NOT listen on specific IP

Hi Guys,

I have virtualmin installed with a bunch of IPs and domains, mostly simple apache + PHP websites. I am now trying to deploy a nodejs application and got myself an extra IP just for it. Unfortunately Apache listens on all IPs. I want Apache to ignore that IP so that bind the nodejs server to it but I don't really know how to do it except by going into apache configuration file and rewriting all the * to specific IPs. Is there an easier way?

Thanks for any feedback, help or advise!

Andre

Wed, 08/14/2013 - 13:07
andreychek

Howdy,

You may just need to tweak your Apache "Listen" parameter(s).

That usually reads something like "Listen 80", which causes it to listen on port 80 of all interfaces.

You can give it specific IP's to listen on though, rather than having it listen on all of them.

Some details on how to do that are here:

https://httpd.apache.org/docs/2.0/bind.html

You'd then make that change in your httpd.conf/apache2.conf file.

-Eric

Topic locked