I'm trying to get Apache virtual hosting to work with an Amazon EC2 instance. My httpd.conf looks like the following
ServerName <elastic_ip>:80 Listen 80 NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/sites/site1 ServerName www.site1.com </VirtualHost>
Where the elastic_ip is roughly like a static IP in Amazon-land. My problem is that the site is not loading properly. For example when I type the following in the browser address bar:
EC2-public-dns .... this works and loads the virtual host site www.EC2-public-dns .... this doesn't load and gives "The requested URL could not be retrieved", i.e. not any default page elastic-ip .... same as above www.elastic-ip .... same as above
I don't have anything in the /etc/hosts file, perhaps I should? Any thoughts on what I'm doing wrong?
Update: these are my setting in Godaddy now.
DNS Manager: Available A @ el.as.tic.ip CNAME www site1.com CNAME ec2-XX-XX-XX-XX.eu-west-1.compute.amazonaws.com @