By using AWS re:Post, you agree to the Terms of Use
/Numeric IP address reachable, but domain name not reachable/

Numeric IP address reachable, but domain name not reachable

0

I have a domain registered through Route53, and I'm unable use the named address to reach my server.

If I connect using the public numeric IP address of my instance, I get the Apache default page.

If I connect using the domain name (or subdomain) I get "Can't connect to server".

Here's what I have done:

In Route53, my registered domain shows up under Registered Domains In Route53, when I click on Hosted Zones it shows two entries:

mydomain.org ... HostedZone mydomain.org ... main site

I don't recall having created the first one, so I'm not sure why I have two. They are different from each other in the following way: The HostedZone one contains an NS, SOA and two CNAME records. The mainsite entry contains an NS, SOA, and two A records, one for each subdomain and each pointing to the public IP numeric address of my instance.

What am I doing wrong?

1 Answers
0

Hello

I understand that you are not able to reach the Default apache page with domain name, When you register for the domain in registered doamins, AWS will automatically create a Hosted Zone for you , It is simply a Control panel or DNS manager.

So, Now you have a HostedZone Configured let's say mydomain.org and You need to configure like the below. NS and SOA are created by AWS for you.

Record NameRecord TypeRouting PolicyValue
mydomain.orgNSSimplens-bla bla
test.mydomain.orgSOASimplesome entry
mydomain.orgASimpleIP Adress of Server
test.mydomain.orgASimpleIP Adress of Server

Okay, If the above DNS entries are good, Let's look at apache Configuration.

When you install apache, it will have the default configuration file in this location /etc/apache2/sites-available/000-default.conf , Please check ServerName mydomain.org and ServerAlias test.mydomain.org are present in the server

# Begin vhost record on the default HTTP port 80
<VirtualHost *:80>
    # This is the name of the vhost.
    ServerName mydomain.org
    # These are alternative names for this same vhost.
    # We put the other domains here. They will all go to the same place.
    ServerAlias test.mydomain.org
    # Directory where the website code lives.
    DocumentRoot /var/www/html

    <Directory />
    	Options FollowSymLinks
    	AllowOverride All
    </Directory>

</VirtualHost>

If about requirements are met you do not have any issues, If you have any issues please let me know

GK

answered 2 months ago
  • Thanks very much for your answer! It was very helpful. What I was missing was an A record for the domain; I only had A records for the subdomains. I'm using a separate .conf file from the default in Apache, but that file had the correct info. Unfortunately it has stopped working without my having done anything. I'm still confused about why I have two hosted zones. Should I delete the other one that has the CNAME entries?

  • I dot not underatand the "CNAME" records, as far as i understand you have "A" records, So better check the apache is running or not, You can use the command "service apache2 status" to see apache is running, always you check the DNS information by enter the DNS using google https://toolbox.googleapps.com/apps/dig/

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions