been trying to set up a vhost for 2 domains to 1 computer, one of the domains use the correct vhost, but the second uses the default, can't to see what is wrong. This is an example of what the config is setup like NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost ServerAdmin [email protected] DocumentRoot /srv/www/htdocs </VirtualHost> <VirtualHost *:80> ServerName www.example.com ServerAlias www.example.com *.example.com ServerAdmin [email protected] DocumentRoot /srv/www/htdocs/example </VirtualHost> <VirtualHost *:80> ServerName www.andrew.test.com ServerAlias www.andrew.test.com *.andrew.test.com ServerAdmin [email protected] DocumentRoot /srv/www/htdocs/test </VirtualHost> the example one will go to the correct dir, where the test one always goes to the default dir, any indea on what is wrong I'm using open suse 10.2 with the apache that is installed in it, all of the L.A.M.P is install.
Are you really using www.andrew.test.com in your browser's address bar? If you type in something else which the server doesn't know, it will show you the default site. Or is the server's default name www.andrew.test.com? In that case it would override your vhost.
the default is set to local host, these are a example only but almost a direct copy of the real site.