I have been having a really weird problem with Apache's virtual host config. I have 2 domain names (domain1.com domain2.com) . The problem is when someone goes to domain2.com, once in a while they will suddenly see the index.html page from domain1.com but without all the css (just html links). The issue is driving me nuts! Any help would be appreciated.
Here is my virtual host for domain1
<VirtualHost *:80>
ServerAdmin me@domain1.com
DocumentRoot /var/www
ServerName www.domain1.com
ServerAlias domain1.com *.domain1.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
and here is the config file for domain2.com is the same thing except the following
ServerAdmin me@domian1.com
DocumentRoot /var/www/domain2
ServerName www.domain2.com
ServerAlias domain2.com *.domain2.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/domain2r>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>