Comments

MikeHigginbottom’s picture

For those new to this I've written up a post explaining the background concepts behind multi-site Drupal installs at http://mikehigginbottom.com/content/drupal-multi-site-installations-magic-secret-bits. It has some specifics but focuses on the stuff you need to understand rather than the steps you need to take.

billp44ruby’s picture

Within the settings.php file, there is a $drupal_hash_salt and accompanying authentication code. When I setup a multi-site implementation, with a unique database for each supported site, does this authentication code need to change or do I use the same code for all sites working off of my common code base? If it does need to change, what is the source of the authentication code? Does that come from my hosting company?

tgeller’s picture

Hi, Bill. I'm sorry to see that your question has gone unanswered for so long.

In short: You don't need to set the $drupal_hash_salt at all: The installer sets it, and you shouldn't change it (unless you have some special reason to do so). Each site within a multisite installation will have its own auto-generated taste of salt.

---
Tom Geller * tomgeller.com * Oberlin, Ohio
See my lynda.com videos about Drupal

GaryWong’s picture

I think what the OP means is.. "I copy and paste settings.php between the multisite subdirectories.. but how do I manually generate $drupal_hash_salt" ?

I won't necessarily be running the 'DB install' everytime as I'll simply export the DB and use this as the initial template for each subsequent site.

Is it as simple as:
$drupal_hash_salt = file_get_contents('./xxx/xxx.yyy');

Where each settings.php in the multisite gets a different file?

Gary

jorisx’s picture

Same kind o question,

I created a local version of drupal (with a different db name and user)
now when I upload the new drupal install to my server, do I need to create a new $drupal_hash_salt
and how do I do that ?

ptocco’s picture

We are running a multisite configuration with about half a dozen sites off a single core. In Site B I installed Superfish menu, but only installed it to that site. Now we'd like to try Superfish in Site A, so ideally Superfish should be installed to Sites/all/modules. However, I'm afraid if I do that, it will confuse Drupal or some developer in the future, unless I remove it from Site B then re-enable it as a sites/all module.

What would be the best way to add Superfish to Sites/all? Install it to Site A as a sites/all/module, then remove it from Site B as a module within the subtheme? Or would I even have to remove it from Site B? I also want to minimize downtime since this is a production site.

I think I have enough of an idea to just give it a try, but wanted to see if there is a rule of thumb to follow when you decide to move a module from a subsite to sites/all.

Thank you

d8v15’s picture

in a load balanced environment with a single database, and shared files directory, how do you ensure module install trigger is initiated only once - fool proof. if two + servers attempt to trigger module install, there is an issue. please advise. thanks ~