OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Linux ec2 instance not accessible from browser

  • Thread starter Thread starter Raj Raj
  • Start date Start date
R

Raj Raj

Guest
I have a simple http service hosted in AWS ec2(linux). It is accessible from the browser using public IP. However, I want to make it accessible using a domain name. I updated the /etc/hosts file with the domain details but unfortunately, it is not working from the browser at all. Below are the relevant details

Code:
[ec2-user@ip-172-31-35-217 ~]$ cat /etc/hosts
13.201.125.33 sdg123.int.thrs11.com
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 ip-172-31-35-217.ap-south-1.compute.internal
::1         localhost6 localhost6.localdomain6

Here, 13.201.125.33 is the public IP accessible from browser

Ping works fine

Code:
[ec2-user@ip-172-31-35-217 ~]$ ping sdg123.int.thrs11.com
PING sdg123.int.thrs11.com (13.201.125.33) 56(84) bytes of data.
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=1 ttl=126 time=0.446 ms
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=2 ttl=126 time=0.366 ms
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=3 ttl=126 time=0.425 ms
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=4 ttl=126 time=0.359 ms

Curl works fine

Code:
[ec2-user@ip-172-31-35-217 ~]$ curl http://sdg123.int.thrs11.com
<html><body><h1>It works!</h1></body></html>

Kindly suggest how to get this working from browser with domain : sdg123.int.thrs11.com
<p>I have a simple http service hosted in AWS ec2(linux). It is accessible from the browser using public IP. However, I want to make it accessible using a domain name. I updated the /etc/hosts file with the domain details but unfortunately, it is not working from the browser at all. Below are the relevant details</p>
<pre><code>[ec2-user@ip-172-31-35-217 ~]$ cat /etc/hosts
13.201.125.33 sdg123.int.thrs11.com
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ip-172-31-35-217.ap-south-1.compute.internal
::1 localhost6 localhost6.localdomain6

Here, 13.201.125.33 is the public IP accessible from browser
</code></pre>
<p>Ping works fine</p>
<pre><code>[ec2-user@ip-172-31-35-217 ~]$ ping sdg123.int.thrs11.com
PING sdg123.int.thrs11.com (13.201.125.33) 56(84) bytes of data.
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=1 ttl=126 time=0.446 ms
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=2 ttl=126 time=0.366 ms
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=3 ttl=126 time=0.425 ms
64 bytes from sdg123.int.thrs11.com (13.201.125.33): icmp_seq=4 ttl=126 time=0.359 ms
</code></pre>
<p>Curl works fine</p>
<pre><code>[ec2-user@ip-172-31-35-217 ~]$ curl http://sdg123.int.thrs11.com
<html><body><h1>It works!</h1></body></html>
</code></pre>
<p>Kindly suggest how to get this working from browser with domain : sdg123.int.thrs11.com</p>
Continue reading...
 

Latest posts

S
Replies
0
Views
1
Safwan Aipuram
S
Top