nodejsNovice, bought an Ali cloud server with the lowest matching. I want to deploy my own nodejs project, and the node version is 6.10.0.
But it’s wrong to start.
Port number: 3000
ipIt’s Ali cloud’s public network IP.
Port usage 3000 was not used:
Baidu has done many things but can not solve it. Seek the bull’s advice.
The code is as follows:
It is not possible to access the node server directly from the public network address of the lowest allocation server bought by oneself. It is recommended that the nginx proxy localhost be reused.
Ali cloud official explanation.
Or change the hostname to: 127.0.0.1 and then visit the public network address.
hostnameThe router IP cannot be specified. IP or 0.0.0.0 can only be specified as NIC.
Remove hostname, app.listen method.
Do you specify listen on this network card?
So, ifconfig determines that this IP is the IP of a local NIC.