Last updated October 1, 2014. Created on July 13, 2012.
Edited by wusel, arijits.drush, ludovids, Fohsap. Log in to edit this page.

My setup

  • Windows XP (up to: Windows 7 - 32 or 64 bit)
  • Drupal 7
  • XAMPP 1.8.1, but on Windows XP NOT newer!

XAMPP runs on the same computer as my browser.


  • Important Safety Notice:
    The safe operation of the web server, that can be accessed from the internet, is not guaranteed by XAMPP, which is a development system!
  • The same configuration on another webserver (e.g. apache, but not XAMPP) is ok!


Follow it step by step!

1. Install "XAMPP" ( at 'C:\xampp' (and NOT at 'C:\Program Files\xampp\' or similar!) by unzipping it there.

2. Check for 'httpd.conf' file at 'C:\xampp\apache\conf' and

# Virtual hosts
#Include "conf/extra/httpd-vhosts.conf"

# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"

only, if the "#" was in that row!

3. Now open 'httpd-vhosts.conf' from 'C:\xampp\apache\conf\extra' and add these lines

<VirtualHost *:80>
ServerAdmin postmaster@host.localhost
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
ServerAlias www.localhost
ErrorLog "logs/host.localhost-error.log"
CustomLog "logs/host.localhost-access.log" combined

<VirtualHost *:80>
ServerAdmin postmaster@dummy-host.localhost
DocumentRoot "C:/xampp/htdocs/drupal"
ServerName dummy-host.localhost
ServerAlias www.dummy-host.localhost
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" combined

<VirtualHost *:80>
ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:/xampp/htdocs/drupal"
ServerName dummy-host2.localhost
ServerAlias www.dummy-host2.localhost
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" combined

4. Restart your web server.

5. Now open file '%windir%\system32\drivers\etc\hosts' and add these 4 lines at end of file    dummy-host.localhost    dummy-host2.localhost    www.dummy-host.localhost    www.dummy-host2.localhost

6. Now download the latest "Drupal 7" recommended release (,
create a folder name "drupal" inside 'C:\xampp\htdocs\'
and put all content of this drupal release (including the folder structure and its content) in this folder.
Now you can find e.g. the file 'C:\xampp\htdocs\drupal\sites\default\default.settings.php', you need it.

7. Create 2 folder name
a.) dummy-host.localhost
b.) dummy-host2.localhost
inside of 'C:\xampp\htdocs\drupal\sites\'

8. Create 2 databases for 2 drupal sites (e.g. with name dummyhost and dummyhost2) using

9. Open url
a.) http://dummy-host.localhost/
b.) http://dummy-host2.localhost/
and install them as standard drupal installation process (

10. Now Drupal "multisite installation" is done, you should look at
a.) http://dummy-host.localhost/
b.) http://dummy-host2.localhost/
for further installation.

Looking for support? Visit the forums, or join #drupal-support in IRC.


Fohsap’s picture

Sometimes this method doesn't work.

austin881’s picture

I believe your ## Site 2 ## vhost edits are incorrect. Why is the ServerName the same as Site 1?

nuriu’s picture

By URL http://dummy-host.localhost/ opens dummy-host.localhost/xampp /
Do you know why?

cooldeeponline’s picture

Works perfectly fine for me on:

Windows 7 64 bit
XAMPP 1.8.3

Plain and simple.


reli4nt’s picture

For those having trouble there us a simple step that is missing from these otherwise good instructions.

In 'C:/xampp/apache/conf/extra/httpd-vhosts.conf' you will need to uncomment the following line by removing the hash before it:
NameVirtualHost *:80

soundbyte’s picture

NameVirtualHost *:80

I cannot see this line in this file anywhere.

rCharles’s picture

Quick note: NameVirtualHost *:80 is for Apache 2.2 and lower.
Please confirm/verify for others.

Dstrider’s picture

I was unable to get it to work until I added the following line to my sites php file
$base_url = 'http://drupal' (add semi-colon)
I added this on line 2 and now my two sites work. Without it, the default site kept coming up, even adding install.php to the end of url would not work. However, it works now!
using drupal 7 installed in xampp/htdocs/drupal directory

soundbyte’s picture

I am not using xamp but have the same issue. Taking this literally, I added this to line 2 of sites.php but that didn't solve the 'only localhost default site' loading

$base_url = 'http://drupal';
 * @file
 * Configuration file for Drupal's multi-site directory aliasing feature.

A I missing something?

Dstrider’s picture

I also have the following. Other than that, it is default file
$sites = array('localhost' => 'localhost',
'localhost.drupal' => 'default',
'localhost.testsite' => '',
'mysite' => ''

I am new to drupal and I am still learning. The testsite lines above might not be right, but it appears to work for me. I have confirmed that testsite and myrealsite use the correct databases. Hope this helps you