Trying to set up multi-site on a Linux box through localhost. I've been through all of the posts here on groups, the "Creating multiple sites" page (but it's for Windows), and every other link that has to do with multi-site in Getting Started. Also searched the mailing list since BOY.
The "Mult domain/vhosts using diff databases" page (node 278) is what I'm looking for. It appears that I've set things up right, but I'm missing that last all-important step...
-
I have drupal installed in /var/www/html/drupal-6.3, using a mysql database named 'aa'.
http://localhost/drupal-6.3
navigates to the site fine. I can log in, make changes, all sorts of goodness. -
I added two new databases, bb and cc, in mysql, added two new sites, /sites/bb and /sites/cc, next to /sites/default, and have settings.php and /files copied over.
-
I've modified /sites/bb/settings.php and /sites/cc/settings.php to reflect mysql's 'bb' and 'cc' databases: $db_url = 'mysqli://me:secret@localhost/bb', etc.
-
And I modified httpd.conf:
NameVirtualHost *:80
DocumentRoot /var/www/html/drupal-6.3
ServerName bb
OK. So how do I GET to Site B or Site C? http://localhost/drupal-6.3/bb doesn't work, nor does http://locahlost/bb, and so on, through lots of increasingly wild and silly guesses.
(Once I get this working locally, I'll map external domains (www.exampleBB.com and www.exampleCC.com) to bb and cc. I've done THAT before without much trouble. But it'd be nice to be able to get to my work via localhost. :))
r.

Comments
A followup to my original
A followup to my original post:
Went to another box on the same network, and tried to navigate to my drupal install:
http://192.168.1.113/drupal-6.3
I was expecting to get to 'Site A'. Got a "Page not found" instead. Ditto for
http://192.168.1.113/drupal-6.3/aa
and other misguided attempts that show I'm still missing a basic concept.
(I also should have mentioned in my original post that the header for the virtual host section in httpd.conf is
for both site bb and site cc.
file system directory != browser url directory
I didn't have the time to read your post word by word but maybe I can help you enought by pointing out that the "directory bit" of the adress (as described e.g. in settings.php) is for webserver directories not file system directories. I.e. if your drupal base directory is
/var/www/html/drupal-6.3andDocumentRoot /var/www/html/drupal-6.3your adress has to be something likewww.whatever-or-ip/and nothing prepended (apache will point your browser directly to drupal base directory so drupal can do the rest).I don't think you can distinguish multiple drupal sites by a directory name only as drupal searches /sites/* for at least some parts of the domain bit of the adress the browser passes via web server to drupal.
Hope that helps. It is tricky indead.
Cheers.