- Newest
- Most votes
- Most comments
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 Name | Record Type | Routing Policy | Value | --- | --- | --- | | mydomain.org | NS| Simple | ns-bla bla | test.mydomain.org | SOA | Simple | some entry | mydomain.org | A | Simple | IP Adress of Server | test.mydomain.org | A | Simple | IP 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
Relevant content
- Accepted Answerasked 7 months ago
- asked 2 years ago
- "This site can’t be reached " -> Using Lightsail with a wordpress instance and a Route53 Domain NameAccepted Answerasked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 7 days 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/