[aegir] Using the Bakery module with Aegir by using local settings files

Seth Vincent sethvincent at gmail.com
Fri Mar 18 08:02:27 EST 2011


Hello all,
I'm working on setting up single sign-on among a number of sites hosted with
Aegir using the Bakery <http://drupal.org/project/bakery> module, but
haven't gotten it to work yet.

When logging in to the master site everything works as expected. When
logging into a slave site, the user is redirected to the master login form.
But, on logging in at example.com/user/login the user is taken to
example.com/user, not redirected back to slave.example.com. And the user is
not logged in at all on the slave site.

I've successfully used Bakery on sites that are not hosted with Aegir, so
I'm familiar with the set-up it requires.

I've followed the instructions in Bakery's README, and have set up a
local.settings.php file in the directory for each site that would use Bakery
that included the following:

<?php
$cookie_domain = 'example.com';


Aegir also produces code in a site's settings.php file, and it seemed like
it might be the source of the conflict:

  * We try to set the correct cookie domain. If you are experiencing
problems
  * try commenting out the code below or specifying the cookie domain by
hand.
  */
  if (isset($_SERVER['HTTP_HOST'])) {
    $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
    // Per RFC 2109, cookie domains must contain at least one dot other than
the
    // first. For hosts such as 'localhost', we don't set a cookie domain.
    if (count(explode('.', $domain)) > 2) {
      @ini_set('session.cookie_domain', $domain);
    }
  }


I tried commenting out that code, but met the same results. Plus any time a
site is verified in Aegir the settings.php file is wiped clean again, making
the code block uncommented.

I'm not sure if this is related to Redirect back to the slave site's
destination <http://drupal.org/node/838020>, but it might be.

I've cross-posted this on the bakery issue queue<http://drupal.org/node/1096660>
.

I'd appreciate any help y'all can offer with this issue.

Thanks,
Seth Vicent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.aegirproject.org/pipermail/aegir/attachments/20110317/4b030cfb/attachment.html>


More information about the aegir mailing list