Last updated March 24, 2014. Created by Fohsap on July 13, 2012.
Edited by wusel, riju.srk, ludovids. 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 NOT newer!

Xampp runs on the same computer as my browser.

ToDo-List

Follow it step by step!

1. Install "Xampp" (http://www.apachefriends.org/en/xampp-windows.html) 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
change

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

to
# 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>

<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>

<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
</VirtualHost>

4. Restart your web server.

5. Now open file '%windir%\system32\drivers\etc\hosts' and add these 4 lines at end of file

127.0.0.1    dummy-host.localhost
127.0.0.1    dummy-host2.localhost
127.0.0.1    www.dummy-host.localhost
127.0.0.1    www.dummy-host2.localhost

6. Now download the latest "Drupal 7" recommended release (https://drupal.org/project/drupal),
create a folder name "drupal" inside 'C:\xampp\htdocs\'
and put all content of this drupal release in this folder.

7. Create 2 folder name
a.) dummy-host.localhost
and
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 http://127.0.0.1/phpmyadmin/.

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

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

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

Comments

Sometimes this method doesn't work.

--

Man, this takes forever... Just forget it.

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

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