I have an AWS EC2 Instance running Ubuntu.
I have a Parse server on it, running on localhost, port 1337. I've enabled that port in the instance's security group.
I've tried to check if and how can I access to the instance's localhost
using the wget
command and check if there is a connection or the connection has been refused, and these are the results:
$ wget http://<Public IP>:1337/parse
Connecting to <Public IP>:1337... failed: Connection refused.
$ wget http://<Private IP>:1337/parse
Connecting to <Private IP>:1337... failed: Connection refused.
$ wget http://localhost:1337/parse
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:1337... failed: Connection refused.
$ wget http://<Public DNS>:1337/parse
Resolving <Public DNS> (<Public DNS>)... <Private IP>
Connecting to <Public DNS> (<Public DNS>)|<Private IP>|:1337... failed: Connection refused.
As you can see above, I checked the Public IP, Public DNS and Private IP.
It always said it failed because that the connection refused
, and for some reason, even localhost is refused by the server.
How can I make the localhost
accessable from outside the internal network of it and access the Parse server?
I solved it by using the public IP of the EC2 instance and the I was able to access the Parse server running on it.