Mutlisite setup on Windows 2003/IIS6 with Drupal 5

Shadow's picture

Hello everyone,

I've found plenty an article on setting up multiple sites with Drupal and windows but they all deal with Apache being the web server. What I need is how to do it with IIS6. My sites are going to use one data base but have different tables associated with the sites. If anyone has any insight on how to do this that would be great. If not then I will keep plugging away and if I come to a solution I will write it up for all to see.

Comments

What difficulties are you having?

pcorbett's picture

I have mine setup on 2003/IIS6 with D 5.1. Are you using MySQL or MSSQL? There are a few things you need to keep track of - I'll post my install instructions below for you:

IIS

  1. Home: root is your drupal folder.
  2. Documents: add index.php and remove all others.
  3. ISAPI Filters: add php - c:\php\php5isapi.dll (or wherever your php install is located and make sure it get to a "loaded" status, probably by restarting IIS)
  4. Home Directory>Configuration: add .php extension c:\php\php5isapi.dll. All verbs, script engine checked.
  5. Add php5isapi.dll "service extension" if using iis 6.

Windows
1. Add c:\php to PATH via "Environment Variables" in My Computer > Properties
2. IUSR read & execute, List Folder Contents, Read, write access to c:\windows\temp or which ever upload folder you want.
3. IUSR read, write & execute for files directory for downloads as well (public)

This is very good thank you.

Shadow's picture

This is very good thank you. We actually have both MySQL and MSSQL. Right now we have the inital Drupal DB on MySQL. Would the steps be the same? I would imagine slightly different.

I would advise against MSSQL

pcorbett's picture

Stick with MySQL unless you have time to debug and re-write installs to work with MSSQL-specific commands. I'm helping get MSSQL into core Drupal, but that won't be online for a while...

Thanks again..

Shadow's picture

But looking over your install instructions it looks like how to install Drupal on IIS6. I have Drupal already installed and working fine for a single site setup. What I don't know exactly is how to add multisite capabilities to that install. I am aware that I have to create folders and subfolders in the sites folder and copy and paste the setup.php file from the default folder into each new folder and leave the $db_url option alone and to add the prefix exstension to the $db_prefix option to use separate tables for each site. From there I'm not sure on how to proceede. Do I need to manually create each individual site table to resemble the default table setup or is there a way Drupal can do it for me?

I also know that to make the sites "avaliable" or accessable in Apache you have to create symbolic links to them but I'm not to sure if Windows has the same option or is there a specific way of doing it.

Thanks again for all your help.

You should be all set...

pcorbett's picture

Just make sure your folders are named correctly and have a settings.php file in them for each of your sites. Drupal will look at your url, (e.g., site2.abc.com) and look for the folder sites/site2.abc.com and automaically install based on the instructions in the settings.php (i.e., install new tables with the prefix based on your settings.php). So you should only have to load up site2.abc.com/install.php and it will install everything autmoatically. Make sense?

Hmmm I've got to be missing

Shadow's picture

Hmmm I've got to be missing something then. I have all that setup but everytime I try and navigate to the site...example.com/test... I get "404-page not found". I even tried navigating to example.com/test/install.php and I get "no input file specified". I know it has to be something really stupid or small that I am missing. Any other idea's?

It is something simple...

pcorbett's picture

I'm just trying to remember what caused this for me since I have run into this before. I'm quite sure it has to do with either your folder name or possibly how you have IIS pointing to the Drupal folder. The issue I see is with the "/test" folder. I have always done it with assigning a new DNS rather than a folder, so: site-test.example.com rather than site.example.com/test. Make sense? And you have IIS point to the root drupal folder. From there, Drupal searches for the folder "sites/site-test.example.com"

That is how I have mine running... I never quite figured out how to get it to work the way you do (although I'd like to so that I don't need to create new DNS entries each time I want another site). Let me know how that works for you.

You know..

Shadow's picture

You know I don't think Drupal is searching the sites folder. If I put in the actual path to the sites folder in the URL my test files works fine. For example if I put in http://example.com/drupal/sites/drupal.test/test.php...it comes up. But if I just go http://example.com/drupal/test/test.php...I get "no input file specified". Maybe this can shed some light on it. I'm still thinking I'm missing something or something just isn't right with my IIS setup.

similiar problem

pbarr's picture

I'm trying to get multi-site working on multiple databases.
The single site is working fine after finally getting clean url working.

How do I get IIS to call drupal on the new site?

I tried setting a virtual directory of the new site to point to the drupal site but that wasn't it.

Any help is appeciated.

Phil

win2003;IIS 6.0; mysql 5.0.24, php 5.2.4

Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
RewriteEngine on
RewriteBase /drupal-5.3/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

added to sites/drupal-5.3/settings.php:
if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
}
$conf['clean_url'] = 1;

There isn't much IIS needs

pcorbett's picture

There isn't much IIS needs to do to make multi-sites to work - It's more with how you name your folders and have your settings.php file. You need to point IIS to the drupal/sites folder and that's it on that end. But then you need to name you sites folders appropriately such that they are the same as what you have your IIS host header. If you provide some more specific info on your issue, we can probably help more too.

Similar problem, trying multisite in subDIRECTORIES

zbricoleur's picture

I really wish there were some documentation on this that was aimed at those of us who aren't so experienced, with Drupal and with Web server administration. If I ever get a handle on this myself, I volunteer to write it.

Currently, I have a 5.6 site set up and running nicely on IIS6.0. I am trying to add a second site as a SUBDIRECTORY (pardon the caps, but this seems to be important and people keep ignoring it). I.e., such that www.example.com/second is the URL (rather than, say, second.example.com, which seems to call for a different approach). Unfortunately, for reasons over which I have no control, this is how it has to be.

Steps I have taken:

  1. Moved the default settings.php file to /sites/www.example.com
  2. Created /sites/www.example.com.second, and put a fresh settings.php file in there, in which the database connection string points to the same database, but specifying a different table prefix.
  3. Now, the instructions in install.txt make it sound like that's ALL YOU NEED TO DO, but we know better. So I have also used Winbolic to create a "symlink" from www.example.com/second to the root directory (I hope that's clear; if not, I can try to explain it better), as this post directs (http://drupal.org/node/107347).

Now I am at the point (I think) where I should be able to point my browser to www.example.com/second/install.php and get the installation wizard page. But I get exactly the same thing as Shadow describes above: "No input file specified." A little Googling reveals that this is just a PHP bug, in which PHP as CGI will return that message (instead of a more appropriate 404), for any .php file it doesn't find.

So the upshot seems to be that Drupal is not seeing what it needs to see in order to redirect the browser request appropriately. Has ANYONE got multisite with subdirectories working on IIS? If so, please hear this call...

Found the way to do it

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: