views:

231

answers:

2

I'm trying to set up Drupal 6 multisite in a shared hosting environment. The main site's location looks like http://www.mysite.com/foo/bar/ and my goal is to create another site using the same database at http://www.mysite.com/foo/bar/drupal2.

I've created a new folder in the sites directory called www.mysite.com.foo.bar.drupal2 and added the default.settings.php and settings.php files, configured correctly for the environment, and I've set up a symlink from the main site's root to the subdirectory, with this command:

ln -s . drupal2

The problem is that when I go to http://www.mysite.com/foo/bar/drupal2, I just get the main site at http://www.mysite.com without triggering the installer.

What do I need to change to get the multisite working?

A: 

There's a whole section on Multu-site how-tos on drupal.org.

The reason what you did is not working is that you symlinked the entire site, so there wont be a difference, you'll get the same settings.php file with the same db settings etc.

The magic happens in the sites folder, take a look at this handbook page, it looks like this is what you are after.

googletorp
I've been through all that information, and it hasn't helped. I just get a 404 error when I try to visit the second site's url without the symlink.
derekerdmann
A: 

Probably You need to set the $base_url to http://www.mysite.com/foo/bar/drupal2 in settings.php in the ".../drupal2" installation.

Michał Pękała
The base url is already set to the subdirectory.
derekerdmann
Are You 100% sure that the `$baseurl` is set correctly (i.e. settings.php could be set in the wrong subdirectory of sites/ - http://drupal.org/node/53705) and known by Drupal? Try to output this variable within site content or block to see if it points to .../drupal2.I used to have a similar setup with 1 installation in a main directory, and a few following in the subdirectories. Every time, setting correctly the `$base_url` did the thing.
Michał Pękała