Hello,

I have tried to set up the mentioned subdirectory-based Drupal multisite installation, e.g.

http://example.com - codebase, all Drupal files go to the Web root of the site, single copy for all the site (and the site-specific components go to the relevant sites/ subdirectory.

In sites/:

example.com.a/ directory with settings.php etc
example.com.b/ directory with settings.php etc
example.com.c/ directory with settings.php etc

to have the following separate sites with their own DB tables sets:

http://example.com/a
http://example.com/b
http://example.com/c
etc

The problem is, I can't set those up. No way doing that by straightforward unpacking the distribution, calling install.php to have these sites set up properly.

Also, if I create those sites DB content elsewhere and import it into the example.com's actual DB, I can't access them, either. The root installation will intercept the URLs and either display the corresponding existing document in root installation, or redirect me to '404' document.

I was recommended this workaround: to create symlinks first, i.e. in Web root

ln -s . a
ln -s . b
ln -s . c
etc

Then run installation like this

http://example.com/a/install.php
and so on.

But:

- this won't work in systems without symlinks
- this is not reflected in installation manual - not a hint how to actually create such kind of multisiting

Perhaps it would be a good idea either to implement this in regular way (if possible) or at least add to INSTALL.txt the necessary explanations/directions.

Until then, it seems that the only working approach is to copy codebase/modules/themes/etc to the respective subdirectories and correct RedirectBase in their .htaccess to allow such multisiting on any platform.

Thanks.

Comments

maartenvg’s picture

Version: 6.4 » 7.x-dev

Feature requests go in HEAD.

Anonymous’s picture

Version: 7.x-dev » 6.8
Category: feature » bug

I think it's not a feature request for 7.x but a bug report for 6.x, since INSTALL.txt clearly describes this feature as already existing - but it doesn't work. I ran into the same issue just now.

7.x is still a long way to go - by 'fixing' it for 6.x we could also get some feedback before it goes into 7.x ...

damien tournoud’s picture

Version: 6.8 » 7.x-dev
Component: install system » documentation
Category: bug » task

The relevant paragraph in INSTALL.txt

NOTE: for more information about multiple virtual hosts or the configuration
settings, consult the Drupal handbook at drupal.org.

The documentation is ample, but confusing in http://drupal.org/node/43816

In a nutshell you need to make sure that requests to http://example.com/{a,b,c} will all be handled by the index.php in your multisite drupal folder. This involves either setting up symlinks, or using apache aliases. Most shared hosting have some kind of interface to define apache aliases.

I agree this should be a little bit better documented in INSTALL.txt. Let's change this for D7, then backport for D6.

jhodgdon’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #285053: Improve INSTALL.txt description of multi-site installation with subdirectories, which has more information on how to actually fix the problem rather than fixing the doc.