By Konstantin Boyandin on
Hello,
I need to install Drupal in multisite mode, so that every site I host was in its subdirectory, e.g. so that
http://example.com/a
http://example.com/b
http://example.com/c
etc.
be separate sites with their own DB tables.
Documenttaion on installation says it can be done by creating the following directories in sites/
example.com.a
example.com.b
example.com.c
to store the respective settings.php files.However, I can't see the easy way to set up such subdirectory sites. Could someone direct me to exact instructions? How install.php should be invoked to set up subdirectory sites?
Also, shall any changes be made to the default .htaccess to handle such sites setup and functioning?
Thanks.
Comments
Any chance you would
Any chance you would consider a setup like
a.example.com
b.example.com
c.example.com ?
If not, this might help you:
http://drupal.org/node/117658
----------------------------------------------------------------------
http://music.bwv810.com
http://classicvinyl.biz
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
No, I need the
No, I need the subdirectories, that's the main problem.
And, although the installation guide says this is supported, there's no way to install subdirectory-based multisite without tricks such as symlinks.
That means it's unlikley this can be done under, say, Windows.
Of course I can copy the codebase to every subdirectory and adjust .htaccess files, but that ruins the very idea of multisiting.
My conslusion is: the subdirectory-based multisiting is rather a 'hack' than the actually supported feature, since it can't be done by simply unpacking the distribution and running install script in regular way.
Thanks for the reference.
yes, you will need create
yes, you will need create symlinks to make sure all the domain points to the same directory.
It doesn't matter you use the subdirectories or not. All sites point to the same folder and have Drupal to manage web request is the key element in multi-site support.
It works
Using subsite folders in the "sites" directory instead of subsite folders in the root directory (thus sharing all or part of the database) works fine with Drupal multisite. You do need symlinks, but that's no big deal unless you're on a Windows server. The one problem I've found is that you cannot use install.php to set up separate databases or multisite tables within your database (unless you use the shared/separate tables solution mentioned elsewhere). In that regard, the only big issue is that you do not have a separate "variable" table for each subsite. It's not especially hard to get around this, though. Hard-code each subsite's variables into its settings.php file. For example:
$conf = array(
'site_name' => 'New Site',
'theme_default' => 'x_newsite',
'anonymous' => 'Guest',
'site_frontpage ' => 'newfrontpage',
'site_mail' => 'newemail@newemail.com',
[if text] 'newsite mission text',
'uc_store_name' => 'newname',
'uc_store_owner' => 'newowner',
);
Or go through the shared/separate setup, but I haven't tried that because it seems to clunk up the database. The above solution doesn't require messing with the db.
And if you prefer the look of subsite.domain.com instead of domain.com/subsite, just use a redirect. Point subsite.domain.com at domain.com/subsite, and you're there.