My question is basically a reflection of the question found here (which unfortunately does not have a clear answer): http://groups.drupal.org/node/20604
Please note that this is not a question about multi-site setup, but it is rather a question about a complicated edge-case; please read through before jumping to suggestions. Also, take a look at the link above if you need more info.
Note also multi-site works generally fine, just not this case.
- I am using symbolic links (on RHEL5 to be exact)
- I am using Drupal 6.20
- I am using Apache
- I am using subdirectories (NOT subdomains, switching to subdomains is not an acceptable answer)
- My Drupal site directories are nested two levels deep (e.g.
- The Drupal sites all use the same code base in the
- The Drupal sites all use different (their own) databases
In my case, there are dozens of sites, but the first conflict I noticed was as follows. There are two sites at urls such as the below structure:
sites/[foldername] the respective folders are:
The campus folder in the web root contains the Drupal install, and also the symbolic links, so in
/var/www/campus there are e.g.,
news -> ./,
bus -> ./.
On the 'bus' subsite, attempting to go to
https://drupalsite.com/campus/bus/news makes Drupal confused. It seems to drop everything in the request after the last directory. e.g.,
drupalsite.com/campus/bus/news will instead resolve to
drupalsite.com/campus/bus/news/headlines will return a
404 not found.
For another data point, I put a
$dir in the
conf_path() function to see how many directories were being looked at for each request. For a non-conflicting URL, such as bus/undergraduate-programs I got the following:
However for a conflicting URL such as bus/news/headlines I get
drupal.drupalsite.com.campus.bus.news drupalsite.com.campus.bus.news com.campus.bus.news drupal.drupalsite.com.campus.bus
There is a patch which could allow the multi-site setup to be done via sites.php instead of via the method of using symbolic links, however it would involve hacking core, and thus I am not willing to entertain it, though for reference it is here: http://drupal.org/node/231298#comment-3769752
To note, I also tried most of the suggestions in the original groups.drupal.org. thread as well as numerous hacks in .htaccess and my
httpd.conf file, all to no avail. Please comment if you need further information to answer the question.