A search in the
Xampp for Windows forum, category
Apache Friends in English, using the keyword
vhost or
virtualhost will give some clues and example solutions - you can also add
Izzy in the
Search for Author field if you wish to narrow the search a little.
Read the related Apache documentation.
http://httpd.apache.org/docs/2.3/vhosts/
http://httpd.apache.org/docs/2.3/vhosts/examples.html
http://httpd.apache.org/docs/2.3/mod/core.html
In this example we will use a wild card IP, name based VirtualHost first but you can experiment with using an IP based VirtualHost (
check the Apache documentation) for how to.
Change the relevant path information to reflect your own paths as this is only an example.
- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName domain1.com
ServerAlias www.domain1.com
ServerAdmin serveradmin@domain1.com
DocumentRoot "C:/xampp/htdocs/map1"
<Directory "C:/xampp/htdocs/map1" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
CustomLog logs/domain1.access.log combined
ErrorLog logs/domain1.error.log
</VirtualHost>
<VirtualHost *:80>
ServerName domain2.com
ServerAlias www.domain2.com
ServerAdmin serveradmin@domain2.com
DocumentRoot "C:/xampp/htdocs/map2"
<Directory "C:/xampp/htdocs/map2" >
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
CustomLog logs/domain2.access.log combined
ErrorLog logs/domain2.error.log
</VirtualHost>
Check the syntax if you get errors by opening a command console (cmd.exe) in the
xampp\apache\bin directory and typing
apache -S at the command prompt.
===========================================
1. The new
DeskTopXampp Launch Control for
XAMPP / XAMPPlite
Posted by
Ridgewood available from Ridgewood's
DTX web site
2. Build Rich
AJAX Applications - Faster
TIBCO General Interface Pro Edition but
FREE and
Open Source
Fully working with
NO donations required to get a user/password
===========================================