> when i try to run this as myself I get 'EACCES, Permission denied'
> when i try to run this as root I get 'EADDRINUSE, Address already in use'
>
> however, netstat -ntlp confirms this interface is not listening on port 80 (or any port)
> but I do see the interface in ifconfig
Any chance that something is bound to the unspecified interface -- it'll wildcard and block that interface. Look in netstat -lntp for :: or 0.0.0.0 on port 80.
----
Aria Stewart
Only root is allowed to bind to ports below 1024, so the first error is expected.
> however, netstat -ntlp confirms this interface is not listening on port 80 (or any port)
> but I do see the interface in ifconfig
On 2011-04-01, at 1:31 AM, Rob Faraj wrote:
> 0.0.0.0 is listening on port 80. I have apache running on the primary interface which is different than the one I included in my node script. I thought I could have two different interfaces listen on the same port. Is that not correct?
0.0.0.0 is a 'pseudo' interface; binding to that means 'listen on this port on all interfaces'. You *can* have different listeners on the same port on different interfaces, but in this case you have two -- one explicitly, and one implicitly via the 0.0.0.0 listener.
It *is* possible to have two listeners on the same port and interface, if the appropriate socket options are set, but in this case what you want to do is have whatever process is binding to 0.0.0.0:80 bind to a specific interface instead.
HTH,
--
Laurie Harper
http://laurie.holoweb.net/