I'm trying to set up Drupal 6 multisite in a shared hosting environment. The main site's lo开发者_如何学Pythoncation 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?
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.
Probably You need to set the $base_url
to http://www.mysite.com/foo/bar/drupal2 in settings.php in the ".../drupal2" installation.
精彩评论