Results 1 to 3 of 3
Hi all
Quick question - here is my virtual hosts entry list:
<VirtualHost www.domain1.com>
DocumentRoot /var/www/html/domain1folder/
ServerName www.domain1.com
ServerAdmin webmaster@domain1.com
ServerAlias domain1.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
<VirtualHost www.domain2.net>
...
- 05-25-2005 #1Just Joined!
- Join Date
- May 2005
- Location
- Nottingham, UK
- Posts
- 2
Apache virual servers
Hi all
Quick question - here is my virtual hosts entry list:
People - as far as I can see this is ok - but it is only responding to ONE of the domains - the first in the list.<VirtualHost www.domain1.com>
DocumentRoot /var/www/html/domain1folder/
ServerName www.domain1.com
ServerAdmin webmaster@domain1.com
ServerAlias domain1.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
<VirtualHost www.domain2.net>
DocumentRoot /home/domain2/domain2folder/
ServerName www.domain2.net
ServerAdmin webmaster@domain2.com
ServerAlias domain2.net
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
<VirtualHost www.domain3.com>
DocumentRoot /var/www/html/domain3folder/
ServerName www.domain3.com
ServerAdmin webmaster@domain3.com
ServerAlias domain3.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
I have 2 nw cards with different ip's - do I need to bind each site to a specific ip address?
Apache is not my thing really
, but I have done the RTFM thing as much as I *can* but I think I have missed summat.
Any help appreciated
- 05-26-2005 #2Just Joined!
- Join Date
- May 2005
- Posts
- 17
if they are all being hosted on the same machine dont the machine names all need to be identical also which file did you write them in is it the virtualhosts file etc
- 05-26-2005 #3
do you have the namedbased host line? you might be missing a line above that
http://httpd.apache.org/docs/vhosts/name-based.html


Reply With Quote