I am using free tier AWS Linux instance, I had installed NodeJs and started my Express JS
app (sudo node bin/www
) my app is running on port 3000.
When I ssh to the instance and do cURL my app is responding but not from Chrome using Instance Public IP.
I have added Ports 80, 22, 3000 in Security Groups
to access the app from anywhere. [Attached ScreenShot]
The instance is running in N. Virginia region
.
Following are the cases I tried to make it work:
- Started my app using
Public IP
with port 3000 - Started my app using
Private IP
with port 3000 - Started my app using
0.0.0.0
with port 3000 - Started my app using
localhost
with port 3000
All the above cases failed, when I ssh to the instance and do cURL my app is responding.
Could someone give me more insights on this? or
I am missing anything. I have been blocked by this.
I am able to access app when I set the port to 80
but I need to use port 3000
because I am running Frontend Framework on port 80
.
Softwares install on the server using yum:
- yum update
- gcc-c++ make
- openssl-devel
- nodejs from official website
- npm install -g npm // update npm
- mongodb
AWS Security Group Screenshot
P.S: I have read all the StackOverflow questions regarding the app not accessible from the internet, but in my case, my app is accessible from port 80
not from 3000
.