Code:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
# catch-all
<VirtualHost *:80>
ServerAdmin a@b.c
DocumentRoot /srv/httpd/htdocs
ServerName btd-techweb02
</VirtualHost>
# site 1
<VirtualHost *:80>
ServerAdmin a@b.c
DocumentRoot /home/wim/www/site1/web
ServerName site1.btd-techweb02
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log common
#WimS
# this is required to prevent message 403 "Forbidden"
<Directory "/home/wim/www/site1/web">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# site2
<VirtualHost *:80>
ServerAdmin a@b.c
DocumentRoot /home/wim/www/site2/web
ServerName site2.btd-techweb02
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log common
#WimS
# this is required to prevent message 403 "Forbidden"
<Directory "/home/wim/www/site2/web">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
This is how they are in my
httpd-vhosts.conf. The documentation in my
httpd.conf states that 'we start with a very restrictive setting'. I think that it's always good to start conservative and open up according to your needs.
PS Taken from a standard Slackware 12 install