Hello,

I've started to build a set of affiliated sites with Domain Access and appears that BOA very intelligently supports these modules without needing to do anything to the local.settings.php now.

Quite awhile back I did a proof of concept for myself and a client and I had to add

<?php # local settings.php
/**
 * Add the domain module setup routine.
 */
include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';  

to local.settings.php in order to get things to work.

But now when I do that, the base site will not verify and I get the following error.
Drush command terminated abnormally due to an unrecoverable error. Error: Cannot redeclare domain_bootstrap() (previously declared in /data/disk/USER/static/PLATFORM/sites/all/modules/domain/domain.bootstrap.inc:56) in /data/disk/USER/static/PLATFORM/sites/all/modules/domain/domain.bootstrap.inc, line 83

Here's the last line of my octopus_log.txt file so you know what versions I'm running.
Fri May 17 22:47:37 EDT 2013 / Ubuntu.lucid x86_64 / Aegir BOA-2.0.8 / Octopus BOA-2.0.9 / FPM 5.3 / CLI 5.3
and this is the last line from my barracuda_log.txt file
Fri Jul 12 14:51:45 EDT 2013 / Ubuntu.lucid x86_64 XEN / Aegir BOA-2.0.8 / Barracuda BOA-2.0.9 / Nginx 1.5.2 / PHP 5.2.17 and 5.3.26 / MODERN-YES / FPM 5.3 / CLI 5.3 / MariaDB-5.3.12 FQDN / Wildcard NO

If more information is needed, just let me know, but I think the status of this is really is
"works by AWESOME design, thank you very much!
Now charging your credit card for making your life so damn easy! LOL"

All the Best,
Steve

Comments

omega8cc’s picture

Category: support » task

This should be explicitly explained in the docs, I guess, but the answer is simple: upload the module to the sites/all/modules -- nothing less, nothing more (read: don't add anything in the local.settings.php). If you are curious why, read /data/conf/global.inc code.

wickwood’s picture

Thanks for the confirmation!

aanjaneyam’s picture

Version: » 6.x-2.0-rc8

Hi I have set up all my custom platforms to contain modules in sites/all/modules/contrib and have installed sites on these platforms. Now how can I change settings to be able to upload domain access and related modules in sites/all/modules/contrib. I have three subfolders in site/all/modules/{contrib,custom and features}. I have been following this set up since long and now when I want to use modules like domain and fb this doesn't seem to be viable.

Or in the alternative I will have to move all the modules drom contrib to sites/all/modules. I can do this if this is easier to approach or necessary. But then do we need to rebuild registry after doing this as the existing sites would be looking for modules in site/all/modules/{contrib,custom and features}folders respectively. The sites are still in development but I have done work on them.

aanjaneyam’s picture

also according to https://drupal.org/documentation/install/modules-themes/modules-7 it is recommended to place all third-party modules in a subfolder called contrib (sites/all/modules/contrib).

aanjaneyam’s picture

Thanks I just saw this https://github.com/omega8cc/nginx-for-drupal/commit/717823b6d8d4c8037904... . So this should allow domain modules to be run from contrib subdir in sites/all/modules. I should also open a similar issue fo Drupal for Facebook as it also uses a setting.inc.

aanjaneyam’s picture

I think we definitely need some documentation in the form of few steps that need to be taken on BOA for domain access to work correctly.

Now after I have enabled domain access I created a new domain xxx.mydomain.com and it is getting 404 error (not found) in domain module. I have wild card dns set up for my domain - when I visit xxx.mydomain.com it shows under construction so wild card seems to be working. Now how to make 404 error disappear from domain module. After searching for nginx conf I found that every new subdomain added in domain module needs to be added to server_name variable of nginx configuration. The only way I see is by adding an alias in aegir panel for every domain added in domain access and verify the site (this would add new domain/alias alias in server_name nginx variable). Is this what we should be doing. Should'nt that happen automatically via aegir configuration/support for domain module.

During development I have set _MODULES_FIX=NO. Does this have a role in automatically adding the new domains to nginx conf.

aanjaneyam’s picture

In think I found this https://groups.drupal.org/node/83454#comment-259959 which says we need to add alias. Now another aspect I am unable to automatically login to new subdomain xxx.mydomain.com. Does BOA set the required $cookie_domain or do we need to set it manually.

aanjaneyam’s picture

Ok my issue was single sign on accoss all the subdomain managed by domain access. The solutin is sites/foo.com/modules/cookie_domain.info . But does it work in cases mention on https://drupal.org/node/1348784. This thread can serve as guidance for new users of domain access on BOA.

omega8cc’s picture

1. Obviously, you must add all associated domains or subdomains as aliases in Aegir.
2. If you have many subdomains, add a wildcard alias, like *.foo.com in Aegir instead.
3. The modules/cookie_domain.info file makes SSO possible only for subdomains in the same parent domain (imo).

omega8cc’s picture

Issue summary: View changes

Changed placement of end quote

omega8cc’s picture

That said, I'm not sure you can make this pseudo-SSO working with other parent domains -- see our earlier how-to: https://gist.github.com/omega8cc/5724528 -- maybe it needs more testing and then some correction, not sure.

omega8cc’s picture

Issue summary: View changes
Status: Active » Fixed

It is now documented in both platform and site level INI files.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.