My /etc/hosts file is configured as following:
127.0.0.1 localhost mysitea.local mysiteb.com www.mysiteb.com www.mysitea.local
And I have my Apache virtual hosts setup accordingly:
<VirtualHost *:80>
ServerName www.mysitea.local
ServerAlias mysitea.local
WSGIScriptAlias / /var/www/mysitea/apache/django.wsgi
<Directory /var/www/mysitea>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.mysiteb.com
ServerAlias mysiteb.com
WSGIScriptAlias / /var/www/mysitea/apache/django.wsgi
<Directory /var/www/mysitea>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
When I type mysitea.local in the browser, the hostname is resolved as expected. However, the hostname is not resolved when I type mysiteb.com in the browser. It does work when I ping to the hostname. I get the same issue every time I try to add a ".com" hostname.
Edit: I highly doubt that this is a cache refresh issue. I have reset my cache several times and tried again and it still doesn't work!