Stormfire
26th May 2007, 05:41
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 andrew@test.com
DocumentRoot /srv/www/htdocs
</VirtualHost>
<VirtualHost *:80>
ServerName www.example.com
ServerAlias www.example.com *.example.com
ServerAdmin andrew@test.com
DocumentRoot /srv/www/htdocs/example
</VirtualHost>
<VirtualHost *:80>
ServerName www.andrew.test.com
ServerAlias www.andrew.test.com *.andrew.test.com
ServerAdmin andrew@test.com
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. :confused:
This is an example of what the config is setup like
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
ServerAdmin andrew@test.com
DocumentRoot /srv/www/htdocs
</VirtualHost>
<VirtualHost *:80>
ServerName www.example.com
ServerAlias www.example.com *.example.com
ServerAdmin andrew@test.com
DocumentRoot /srv/www/htdocs/example
</VirtualHost>
<VirtualHost *:80>
ServerName www.andrew.test.com
ServerAlias www.andrew.test.com *.andrew.test.com
ServerAdmin andrew@test.com
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. :confused: