1
I'm using a node.js app on port 80 of 127.0.0.2:80
server.listen(80, '127.0.0.2', function() {...
And I want to use Apache on port 80 of another ip address, say 127.0.0.3:80
, so I have this in my httpd.conf
Listen 127.0.0.3:80
ServerName 127.0.0.3:80
But it gives me the error
Why does Apache care about a random port 80 regardless of which IP's port 80 it itself is programmed to listen at? As far as it should be concerned port 80 on 127.0.0.3:80
is still free.
I've even gone ahead and tried this with other IP series (192.xxx, 122.xxx) but Apache wants port 80 free, full stop.
Weird thing is, if I start Apache first, it launches with no problem, and then I can even start node.js all with same configuration above and they both work fine. But precious Apache for some reason doesn't like anybody listening on port 80 of any IP address before its highness has had the chance to start first.
Am I misunderstanding things that if an application is listening on 127.0.0.2:80
then only that IP's port 80 should be busy, other IP's port 80 should still be free 127.0.0.3:80
? Or is it Apache that's misbehaving?