When I run the following command:
lsof -i:8080
This is the result:
node 32419 root 6u IPv4 122865 TCP localhost.localdomain:webcache (LISTEN)
That result is different from that of the following command:
lsof -i:80
Result:
nginx 32029 root 6u IPv4 121546 TCP *:http (LISTEN)
nginx 32030 nginx 6u IPv4 121546 TCP *:http (LISTEN)
Nginx is : "TCP *", but node's process "localhost.localdomain". What does it mean, localhost.localdomain
?
Does it means the process can access from localhost
only?
I have trouble accessing the node process from another server via 8080 port.
Best Answer
in the first case nginx listens only on the loopback interface; 127.0.0.1 is resolved to localhost.localdomain thru /etc/hosts in the second case nginx listens on all the available interfaces (notice *:http)
so the answer is yes, it can be accessed from the local host only;
you can add "-n" flag to lsof to see ip addresses instead of the names those may be resolved to.