Common Codebase only multisite

Events happening in the community are now at Drupal community events on www.drupal.org.
sisko's picture

Hey guys,

I could really use your expertise on this.

I'm revisiting multisites after trying a year ago without any success.

Basically, I need a setup which will allow a parent drupal site to contain all modules and themes which the children drupal sites
will use.
I want each child site to have it's own seperate database, template.php etc. There should be no sharing of information etc.
They all look to the only parent drupal site for modules and themes but their settings, users, content are entirely unique.
And, the child drupal installations all represent unique live domain urls.

I have been trying to follow this tutorial : http://justinhileman.info/articles/a-more-secure-drupal-multisite-install but I can't get it
working.

Can you guys offer some assistance, please ?

Comments

Ignore everything on the page

Garrett Albright's picture

Ignore everything on the page you linked to. Those are horrible instructions written by someone who had no idea what they were doing.

You can have multisites share modules and themes by simply putting them in sites/all/modules and sites/all/themes instead of each site's unique directory.

Agreed, don't follow those

aaront's picture

Agreed, don't follow those instructions. You only need to put modules in a specific site's directory if you want that module to be available to only that one site, or if you want a different version of a module available for a specific site (say, cck3 vs cck2, which is something i'm doing on one site.)

I actually set up a server using the instructions on that page about a year and a half ago and still have some sites running on that server. It can work, but is a pain to set up and whenever you want to create additional sites. I don't know enough to weigh in on the security advantages he mentions, but many people in the comments have opinions on the subject. These days I"m happily running 20+ sites with aegir.

Thanks guys

sisko's picture

I appreciate you input. I'll do as you directed.

Can you give or direct me to correct instructions to setup a functioning multisite
as my original posting details, please ?

Have you tried the

aaront's picture

Have you tried the instructions on this page?

http://drupal.org/getting-started/6/install/multi-site

There aren't too many things to do beyond what you do for a single site setup. If you're getting stuck, let us know what parts you're having problems with.

Thanks again

sisko's picture

I definately need help with an issue.

I had a couple of sites all setup as individual drupal domains on my server.

To take advantage of a single code base for them all, I decided to use a multisite.

So, I setup another Drupal 6 site called D6Multi, I moved the settings.php for one of my existing sites, lets call it sample.com, into
D6Multi/sites/sample. I also moved all it's themes and modules there resulting in the following file structure :

D6Multi/sites/sample/settings.php
D6Multi/sites/sample/modules
D6Multi/sites/sample/themes

I have the following virtualhost definition for sample.com:

ServerAdmin admin@mail.com
ServerName sample.com
ServerAlias www.sample.com

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{HTTP_HOST} !^www\.sample\.com$ [NC]
       RewriteCond %{HTTP_HOST} !^$
       RewriteRule /(.*) http://www\.sample\.com/$1 [L,R=301]
    </IfModule>

    DocumentRoot /server/www/D6Multi
    ErrorLog /server/www/D6Multi/log/error.log
    CustomLog /server/www/D6Multi/log/access.log combined

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

Now, when I visit sample.com I just get a blank screen. Though the database is intact and the theme and even the modules are all there. If I call up the install script, it begins the drupal install process

So, I concluded that blank screen is not actually sample.com but actually D6Multi.

If this makes scense to anyone, I could use your help.

Thanks

It can be tough to figure out

Garrett Albright's picture

It can be tough to figure out what all is going on there - is there anything useful in that error log? - but usually, your subsite directories should be named as the domain name that they're accessible by. So if your site is accessible at the sample.com domain name, its directory should look like:

/server/www/D6Multi/sites/sample.com/

Hey, thanks for your

sisko's picture

Hey, thanks for your input.

Once I renamed my site folder according to the domain name, it all just worked - common codebase and everything.

Thank you all.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: