View Full Version : Help with Multiple virtual hosts
jpaulb
05-26-2006, 05:20 PM
In the libranet forum I had a howto about seting up the Apache server
http://forum.libranet.com/viewtopic.php?t=7211&highlight=apache
Now I need help to configure the server to server a second website.
This is for testing only, there is no Ip address other than 192.168.0.100 I have tried the Apache readne no luck.
Any experts out there
Paul
danieldk
05-27-2006, 04:41 AM
Just add a bunch of <VirtualHost> tags, for instance:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName terrapin.example.org
DocumentRoot /some/path
</VirtualHost>
<VirtualHost *:80>
ServerName sugaree.example.org
DocumentRoot /some/path
</VirtualHost>
jpaulb
05-27-2006, 01:02 PM
I did something like that and it didn't work
<VirtualHost 192.168.0.100>
DocumentRoot "/home/jpb/public_html/www"
ServerName maple
<Directory "/home/jpb/public_html/www">
allow from all
Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
</Directory>
</VirtualHost>
<VirtualHost 192.168.0.100>
DocumentRoot "/home/jpb/gasperaux/www"
ServerName gaspo
<Directory "/home/jpb/gasperaux/www">
allow from all
Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
</Directory>
</VirtualHost>
Then I did something I usually do not do RTFM and came up with a line in /etc/hosts
192.168.0.100 gasp.canadian-dream.com gaspo
192.168.0.100 maple.canadian-dream.com maple
Well blow me down it worked. :D
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.