Forum Moderators: phranque
### Section 3: Virtual Hosts
#
......
NameVirtualHost 127.0.0.1:80 #replace '127.0.0.1' with your IP address
##LOCALHOST##
<VirtualHost 127.0.0.1:80>
ServerName localhost
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/program files/apache group/apache2/htdocs"
</VirtualHost>
## site1.com ##
<VirtualHost yourIPaddress:80>
ServerName site1.com
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/site1"
<Directory "c:/site1">
AllowOverride None
</Directory>
php_value include_path ".;c:/site1/includes" #assuming you have php running
DirectoryIndex index.php index.html index.htm
</VirtualHost>
## site2.com ##
<VirtualHost yourIPaddress:80>
ServerName site2.com
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/site2"
<Directory "c:/site2">
AllowOverride None
</Directory>
php_value include_path ".;c:/site2/includes" #assuming you have php running
DirectoryIndex index.html index.htm
</VirtualHost>
Once you've changed the file, you have to stop and restart apache for these changes to register.
You can have the site folders anywhere you want although of course it makes sense to put them all in the same place, as long as the path is correct.
I believe allowoverride none refers to whether or not the site is allowed to use .htaccess files, these are set to not use htaccess files.
There may be some other unix things you have to do to get this working, but try it and see.
As I said, I'm not very good at apache, but maybe this will help you get started, and if I've made any mistakes in this explanation maybe someone can correct them.