Archive for the ‘drupal’ Category

drupal multisite xampp single vhosts entry

November 7, 2009 2 comments

Ah, finally.  It took a while to get my head around the drupal multi-site thing.  Here was the goal, to create a dev environment with as little setup as possible each time I create a new site.  I could have used the acquia install stack or look more into aegir, but I wanted to get it on my own.  The goal was to create a single vhosts entry in httpd-vhosts.conf.  I tried to see if the hosts file could handle wildcard entries, but unfortunately it does not.  Then I started looking into setting up BIND and running my own local dns to avoid having to deal with the hosts file, but that started getting complex and involved too much effort (i.e. got lazy and didn’t feel like blowing up my current stable setup).

So the steps are actually pretty simple:

Step 1.
Decide on a dev domain.  I usually pick an easy to type / remember domain. I also check to see if there is a real website out there before I lose it by changing the hosts file.  Since I was using the acquia distro, I decided on *  In this case all my drupal instances would be So when I’m developing with ubercart, I can create, or or

Step 2.
You’ll need a VirtualHost setting in your httpd-vhosts.conf file.  I run my server on port 8090 for testing, my entry looks like this:

#acquia settings
<VirtualHost *:8090>
 ServerAlias *
 ErrorLog "O:/www/"
 LogLevel notice
 RewriteEngine On
 RewriteOptions inherit

 DocumentRoot "O:/www/"
 <Directory "O:/www/">
 Options Indexes FollowSymLinks MultiViews ExecCGI
 AllowOverride All
 Order allow,deny
 allow from all


A few things to note:

  1. The server is running on port 8090, so to get to a site in the browser I’ll need to access:
  2. – I create all my project folders with this suffix (OpenStep Media)
  3. document root is where acquia is setup, in this folder you’ll see the main drupal index.php file

Step 3.
You’ll need to update your hosts file in c:\windows\system32\drivers\etc   here’s an example.  You’ll need to do this for every site.  I’d like to add a plugin to the xampp control panel to either add entries, or at least create a shortcut to the file (nudge, nudge apachefriends)

#aquia sites

Step 4.
Restart apache.

Step 5.
This is the most important step, and the one that was driving me nuts, but yet so simple.  You will have to go into your drupal install, to the sites folder.  In there you’ll see a folder called “default”.  You’ll need to copy this folder to a new folder name that matches what you put into the hosts file.  So your new folders should be: “” and “”

When you navigate to  – you should get the install screen, the same with

Good Luck!

Categories: drupal