I'm attempting to have domainname.com and www.domainname.com go to my virtual host instead of the 000-default host. While going to www.domainname.com works as intended and returns the virtual host site, domainname.com still returns the apache2 "It works!" page.
(Actual domain name was replaced with domainname.com)
Contents of /etc/apache2/sites-available/domainname.com.conf:
<VirtualHost *:80>
ServerName domainname.com
ServerAlias www.domainname.com
DocumentRoot /var/www/domainname.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
DirectoryIndex index.html
<Directory /var/www/domainname.com>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
Allow from all
AllowOverride All
</Directory>
RewriteEngine on
</VirtualHost>
Any ideas as to what may be causing this?
It appears my browser had cached the result of domainname.com and continued to serve the cached copy. Other browsers display the correct result.
This seriously had me stumped for over an hour and clearing my cache was the fix.