I bought a domain name, e.g. www.mydomain.com. Also I have the Amazon EC2 instance. I uploaded the folder with website files to /var/www/html/mywebsite
.
What I want to do is to link a public DNS of the EC2 instance to www.mydomain.com
. When a user opens www.mydomain.com
, he/she should see what I have in /var/www/html/mywebsite
of the EC2 instance.
To reach this goal, I changed the configuration of the server in EC2 instance (httpd.conf
):
DocumentRoot /var/www/html/mywebsite
ServerName www.mydomain.com:80
And restarted the server sudo service httpd restart
.
When I go to www.mydomain.com
, I do not see the content of /var/www/html/mywebsite
. Which steps have I missed?
P.S. I found many articles explaining how to deploy static websites on Amazon S3. However, I don't want to use S3.
Did you setup DNS so that your domains/subdomains point/connect to your AWS EC2 instance?