All the post and documentation I on multiple site setups seem to use DNS. I am wondering how to do this with paths on my machine (localhost). The closest answer I've found is this comment: http://drupal.org/node/20663#comment-56221
but here he is very creatively using virtual hosts and the hosts file to "fake" dns. I want to use just paths if I can or symlinks if necessary
The second part of the question is does each subsite get it's own admin settings? If not how do I choose themes and modules for the subsite.
Basically here is what I am looking for (I'm running OS X with Apache 1.3.x, PHP 5 and Mysql 4):
/Library/Webserver/Documents -- apache document root or http://localhost
------/Library/Webserver/Documents/pages -- Drupal 4.6.4 root or http://localhost/pages - default site will be here
------ ------ /Library/Webserver/Documents/pages /subsite1 -- subsite 1 root at http://localhost/pages/subsite1
------ ------ /Library/Webserver/Documents/pages /subsite2 -- subsite 2 root at http://localhost/pages/subsite2
etc ......
My latest attempt is set up the sites folder as follows:
sites/default -- settings.php set up with own db and base_url of http://localhost/pages
sites/localhost.subsite1 -- settings.php set up with own db and base_url of http://localhost/pages/subsite1 - has its own theme folder
sites/localhost.subsite2 -- settings.php set up with own db and base_url of http://localhost/pages/subsite2 - has its own theme folder
navigiating to http://localhost/pages works for default site.
Navigiating to http://localhost/pages/subsite1 gives a 404 error
Navigiating to http://localhost/pages/subsite2 gives a 404 error
What else do I need to do? Thanks much
Comments
Same problem
I am having the same problem except I am getting a 403 error, forbidden access.
Old subject, but maybe it
Old subject, but maybe it will help somebody.
To configure my local apache server for multi-sites i add this lines in httpd.conf
Alias /site1 D:/server/www/drupal
Alias /site2 D:/server/www/drupal
Alias /site3 D:/server/www/drupal
and then create folders
D:/server/www/drupal/sites/localhost.site1
D:/server/www/drupal/sites/localhost.site2
D:/server/www/drupal/sites/localhost.site3
and copy there settings.php file and change db settings.
Yes, this worked from me on Mac OS X 10.5.6
Thanks, still useful. I had tried symlinks and it failed. This seems to work.
Webel IT Australia, "Elements of the Web", Scientific IT Consultancy,
For PHP-driven Drupal CMS web sites, Enterprise Java, graphical UML, UML Parsing Analysis, SysML, XML.