zhangtaihao / hosting_subsite

Hostmaster-managed Drupal sites hosted under subfolders.
GNU General Public License v2.0
1 stars 0 forks source link

provision_subsite component missing? #1

Open mig5 opened 12 years ago

mig5 commented 12 years ago

Hi there,

Your README mentions the backend component 'provision_subsite', however I can't find this on Github or anywhere else. Are you able to share it? I'm particularly interested in how you handle Apache config so that two sites can exist as 'subfolders' on the one codebase - without requiring RewriteBase, which can't be set multiple times in the top-level of the Drupal codebase.

Thanks!

zhangtaihao commented 12 years ago

Ah! I created this project a long time ago (when I just started out using Git). It's actually in a different branch (called provision_subsite). I know it's bad, but I've never actually polished it enough to get feedback.

Regarding RewriteBase, I think at the time I simply didn't fix it (i.e. I just had an AllowOverride all).

It was a very rough job, hence why I eventually abandoned it.

zhangtaihao commented 12 years ago

Regardless, the approach in http://drupal.org/documentation/install/multi-site#symlink would actually work, provided the 'q' is correctly rewritten for Drupal 6, (EDIT) because Drupal core will look for the right site folder.

What was wrong with RewriteBase?

mig5 commented 12 years ago

Thanks. My issue is that I need all sites to appear as a 'subfolder' of a single domain. So they are all on the one platform, symlinks are in place as per that doc. And the rewrite rules/alias need to exist outside of the vhost of each site, since those sites have their own 'dummy' subdomain ServerName and therefore the rules would be ignored for example.com

Going to example.com/foobar works thanks to the Alias. But going to example.com/foobar/user/password doesn't bootstrap and I get the /install.php page. This is the case unless the vhost snippet looks like this:

http://pastie.org/private/5pwoxua0zfqf6ijqcmttw

But problem is you can't have several RewriteBase within the same per site, because it's a common directory base, so they overlap/overrule each other.

Thanks anyway!

zhangtaihao commented 12 years ago

The module currently does symlinks. Problem is: you never know what you're symlinking.

I thought one could just rewrite the URI to end up in the original index.php. However that wouldn't actually work for Drupal 6 since Drupal bootstrap looks at the script name.