I know this is a very popular question that has been asked several times over in these forums but nothing so far that i have read has solved my problem. So ill post my own Vhosts question
my problem is this:
i set up name based virtual hosts in apache 2 (running on Fedora Core 3) and all seemed to be working well. but when i came back to visit my site 30 mins later both domains default to the first site in the vhost list.
this problem is very intermittent. about 50% of the time i get the proper web site for the domain i enter into the browser and 50% of the time i get the first site no mater what name i enter.
here is a look at my vhost set up:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName
www.mydomain1.com
ServerAlias mydomain1.com *.mydomain1.com
DocumentRoot /var/www/mydomain1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/mydomain1">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html
</VirtualHost>
<VirtualHost *:80>
ServerName
www.mydomain2.com
ServerAlias mydomain2.com *.mydomain2.com
DocumentRoot /var/www/mydomain2
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/mydomain2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html
</VirtualHost>
I'm not sure what is causing this problem, i have changed my vhost configuration a million different ways to match that of others who solved their problems but i always end up with the same symptoms. any help would be great.