I have a NodeJs/Express project in Alibaba cloud based Ubuntu server.

When I run project and access with curl localhost:3000 and curl it works!

When I access with IP public, e.g. curl 192.x.x.x:3000 it doesn't work, even though I have edited config in Express project in some code to : server.listen(3000,"") OR server.listen("3000","192.x.x.x").

FYI I have Apache on this server. When I access on Internet with IP public no problem. What can I do to solve this problem? Thanks beforehand.

PS: the 192.x.x.x is my IP public and it works access with Apache project

2 Answers

Janith Kasun On Best Solutions

You have to configure your security ground and create a inbound rule to allow port 3000. Follow this guideline.


Make sure you allow TCP traffic or all traffic from all sources to the port 3000 as the inbound rule.

Charlie H On

The fact that you can access your service locally - but not publicly could mean 2 possible configurations:

  1. The server running your application has blocked the port 3000

  2. You have not configured your server to map the port 80 of a specific route to the port 3000

It is highly possible that a most essential part of your server configuration has not been done.