Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using multi-site, if one of your sites appears to be in a subdirectory of your domain, you will need to add a symlink to that directory from the Drupal installation directory. Like this:
ln -s . subdir
where subdir is the name of your subdirectory.
This is mentioned in e.g. http://groups.drupal.org/node/12553, and in a lot of forum postings.
I may have overlooked something, but I couldn't find this in either the Drupal INSTALL.TXT, settings.php or the multi-site handbook pages.
I propose adding this to all three. (handbook page being http://drupal.org/getting-started/5/install/multi-site)
Comments
Comment #1
gaele CreditAttribution: gaele commentedAlso this handbook page: http://drupal.org/node/53705
Comment #2
james.nadeau CreditAttribution: james.nadeau commentedI second this. The layout of the sites directory is very clear in the documentation, but not this last step. A simple note relating to symbolic linking would have tipped me off to this, instead of wasting the last 2 hours of my life looking for some kind of hint and trying endless configurations. After the fact though it's really obvious.
Comment #3
zeta ζ CreditAttribution: zeta ζ commentedThis is just one way to achieve this, and not easy on a hosted server. Even more difficult if the site is hosted (or developed :shudders:) on windows.
I think it is easier to configure the server to direct requests for the subdirectory to the base installation, by defining a virtual host or addressing record. An ISP will usually provide a tool to do this.
Comment #4
james.nadeau CreditAttribution: james.nadeau commentedThis is also a good solution to the problem. It would just be "nicer" to mention these methods in the documentation so it's obvious for new users.
Comment #5
Noyz CreditAttribution: Noyz commentedChanged the component to reflect the new component categorization. See http://drupal.org/node/301443
Comment #6
MGParisi CreditAttribution: MGParisi commentedIncluded link to how-to first page http://drupal.org/getting-started/5/install/multi-site
#1 is done... anyone else knows a place to put it?
Comment #8
CJBrew CreditAttribution: CJBrew commentedIt's not that hard on Windows. I'm using Windows 7 but I believe the same method would be used on Vista (not sure about XP)
C:\My\Web\Root\DrupalSite> mklink /D subdirectorySite .
Where the sites you'd see on the dev box are
localhost\DrupalSite
localhost\DrupalSite\subdirectorySite
I guess this would be impossible on a Windows-hosted site where you didn't have access to the shell. And it would not necessarily be possible on a linux-hosted site either, without access to the ln command.
Comment #9
froboyCheck out Junction Link Magic. I know it sounds like crapware, but I've been using it for a while and it works just fine.