I am currently trying to configure a new subdomain via route53 and ec2, but I get timeout errors whenever I try to access it through my browser. The Amazon Security Group is configured to allow all traffic through port 80.
I wrote the following vhosts file and saved it under sites available as "new.mysite.com.conf":
<VirtualHost *:80> ServerName new.mysite.com RewriteEngine On #RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] DocumentRoot /var/www/newmysite <Directory /var/www/newmysite> DirectoryIndex index.php AllowOverride All </Directory> </VirtualHost>
I have included this launch;
a2ensite new.mysite.com.conf service apache2 reload
Finally, under route53, I configured a new A record, set a non-alias, and pointed to the public IP address of the EC2 server, as indicated in my running instances.
I made sure that the test page is available in the var / www / newmysite / index.php file and also backs up var / www / newmysite / index.html for access.
The subdomain itself gives a timeout. Clicking on the public IP address of the server gives apache2 the default "it works!" page
Anyone have any ideas on what I can do wrong here?
source share