[documentation] Sharing content/users between Drupal sites (was Re: multi site docs)

Larry Garfield larry at garfieldtech.com
Sat Oct 7 01:21:28 UTC 2006


On Friday 06 October 2006 19:36, Boris Mann wrote:
> On 10/6/06, Anisa <mystavash at animecards.org> wrote:
> > Perhaps we can turn this sage advice into:
> > Caution: Symlinks may mess up clean urls
>
> You're free to do it in a way NOT supported by Drupal....but lots of
> things won't work. The fact that it sort of works is a fact of the way
> web servers work, and nothing to do with Drupal.
>
> > Or perhaps I am reading this wrong, and actually, if you have a multi
> > site in a sub directory, Boris is suggesting that actually, Step 3 (the
> > pointing of domains) is not needed at all?
>
> You've already pointed example.com at your server. Larry was asking
> about a *sub-folder* not a domain. My instructions (taken directly
> from documentation embedded in settings.php) are how to do multisite
> with a sub-folder.
>
> Would love to hear back from Larry whether this worked for him....

Using Drupal 4.7.3 on my Apache2/PHP5 Linux desktop:

Code installed in:
/var/www/mysite/

Main url: 
http://myserver/mysite

Intended location of sub-site:
http://myserver/mysite/foo

.htaccess file's RewriteBase set to:
/mysite

sites directory has the following entries:
default (used for the main site)
myserver.mysite.foo

Both sites exist and have basic configuration done.  They are using different 
themes so that I can tell them apart.  I do not have a base url set for 
either one.

With no symlinking at all:
http://myserver/mysite/ - Main site correctly.
http://myserver/mysite/foo - Page not found from the main site.
http://myserver/mysite/?q=admin/settings - Main site settings page.
http://myserver/mysite/admin/settings - Main site settings page.
http://myserver.mysite/foo/?q=admin/settings - Main site settings page.
http://myserver.mysite/foo/admin/settings - Page not found from the main site.

If I symlink /var/www/mysite/foo to /var/www/mysite:
http://myserver/mysite/ - Main site correctly.
http://myserver/mysite/foo - Subsite correctly.
http://myserver/mysite/?q=admin/settings - Main site settings page.
http://myserver/mysite/admin/settings - Main site settings page.
http://myserver.mysite/foo/?q=admin/settings - Subsite settings page.
http://myserver.mysite/foo/admin/settings - Main site settings page. (WRONG)

The symlink was suggested by someone in #Drupal-Support a few weeks ago.  I 
forget who.

Anisa, thank you for trying to get this documented better.  A tutorial like 
you're writing would probably have saved me a few hours last month. :-)

-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the documentation mailing list