-1

I am running a rails application in AWS cloud9 DEV env, listening on tcp://0.0.0.0:8080. i am able to open app on aws provided url (i.e https://xxxx.xxx.cloud9.us-east-1.amazonaws.com) but unable to open using localhost:8080.

I tried using protocol- tcp, http, https to run localhost:8080, also removed windows firewall defender. but did not work.

When i run the app using localhost, it says this site cant be reached.

Vasu
  • 11
  • 1
  • `0.0.0.0` is not the same as localhost `127.0.0.1` [What's the difference between 127.0.0.1 and 0.0.0.0?](https://superuser.com/questions/949428/whats-the-difference-between-127-0-0-1-and-0-0-0-0) – engineersmnky Jul 15 '19 at 17:12

1 Answers1

0

The application hosted on the Cloud9 server, is running on a remote machine, not your local one. Localhost, and 127.0.0.1, correspond to your local machine, which I assume is not running this application. Should you run this application on your computer, you should be able to connect to it using localhost.

Moreover, if you are inside that Cloud9 machine, and you connect to it using localhost, you should be able to connect to it.

However, if you are connecting to it from a remote machine (i.e., you local device), you must connect to it using https://xxxx.xxx.cloud9.us-east-1.amazonaws.com

Nicolas El Khoury
  • 5,867
  • 4
  • 18
  • 28
  • Is there a way to connect remote machine to ngrok to make my app in DEV expose over Internet or make it available in other computer. – Vasu Jul 17 '19 at 02:22
  • I did not understand what you said – Nicolas El Khoury Jul 17 '19 at 10:01
  • Ngrok is used to expose local web server over internet. - https://ngrok.com/ Since my application is hosted on Cloud9 server and is running on a remote machine. i can access my app only when i run server on my computer. how do i expose this remote machine over internet? i mean how do i access this remote machine from other computer/browser. – Vasu Jul 17 '19 at 17:12
  • using this url: https://xxxx.xxx.cloud9.us-east-1.amazonaws.com that corresponds to the cloud9 server – Nicolas El Khoury Jul 18 '19 at 07:41