Not sure if I should ask for support here, or through SSO, but im having a problem getting a second Domain Access site recognized. Think it could be related to Apache vhosts config, but not sure.
I have 3 sites now.
Site1 - SSO controller, Does not have Domain Access enabled at all.
Site2 - SSO client, Is the primary site for Domain Access, and Domain Access is enabled.
Site3 - Created through DA's "Create Domain Record" as another active site.
My directory structure is:
sites/default/settings.php for Site1, the controller. This settings file has $conf['session_inc'] = 'sites/all/modules/sso/session.singlesignon.inc'; but NO include for domain access, and no db_prefix array.
sites/site2/settings.php for Site2, the client. This settings file has $conf['session_inc'] = 'sites/all/modules/sso/session.singlesignon.inc'; and an include for DA, and code for the db_prefix to share users.
Both Site1 and Site2 work fine. They share logins, and everything appears ok, but now that ive added site through the Domain Access "create domain record" im having a problem.
If i navigate to that site http://site3.com.au, firstly, it wont share the login, and secondly, it shows the header, page title etc from site1. If I login into that site as the administrator, rather than having the same module setup as Site2, as is normal, I appear to be logged into the Site1 database....There is no Domain module enabled for instance.
Some weird path error or something perhaps. In vhosts I have.
DocumentRoot C:/wamp/www/site1.com.au
ServerName site1.com.au
DocumentRoot C:/wamp/www/site1.com.au
ServerName site2.com.au
DocumentRoot C:/wamp/www/site1.com.au
ServerName site3.com.au
Should the document root for site3, be C:/wamp/www/sites/site2.com.au? I tried that and it didnt work.
I know this is probably something really simple.
Comments
Comment #1
Netbuddy commentedComment #2
promesYou should use the default domain-settingsfile: sites/default/settings.php for all domains except the controller domain.
You just did it the other way. So currently site 3 goes to the controllerdomain instead of the sites-domains database.
Good luck.
Comment #3
Netbuddy commentedMmm the sites/default/settings.php file is for Site1, which is the SSO controller site. The very first site I installed, so the DB_URL I have.
$db_url = 'mysqli://username:password@localhost/site1_db';
Also, wondering what other settings should be in that file.
So just to clarify. I have 2 settings.php. The first one is for the first site installed...a normal straight installation. It has:
$db_url = 'mysqli://username:password@localhost/site1_db';
But nothing else...
and the second one is in sites/site2/settings.php, and it has
$db_url = 'mysqli://username:password@localhost/site2_db';
$db_prefix = array(
'default' => '',
'authmap' => 'site1_db.',
'sessions' => 'site1_db.',
'users' => 'site1_db.',
);
Also has the $conf line and include lines :
$conf['session_inc'] = 'sites/all/modules/sso/session.singlesignon.inc';
include './sites/all/modules/domain/settings.inc';
If i change the db url for the default settings file to point to site2_db, i get all sorts of errors, like:
- Only one single sign-on module can be installed at a time. Please disable single sign-on client or controller on this site.
- Undefined property: stdClass::$global_sid in C:\wamp\www....
and a whole bunch of sql warnings.
Are you saying the first site I installed with default/settings.php should have been the client, (in fact site2) and the second site, its own directory, should have been the controller (in fact site1)?
Comment #4
agentrickardYou will probably get better support in the SSO queue. I don't deal with this issue at all, and the SSO maintainers understand the problem better.
You might try putting the $conf['session_inc'] line below the DA code, though.
Comment #5
Netbuddy commentedIve now solved this problem. I have Domain Access and a common shared login across about 8 sites now in localhost. Works wonderfully atm *touch wood*. I did as you suggested and put the $conf line above the include line in default/settings.php. Im not sure if that solved it though cause I re-installed the whole setup again differently. I will probably post a Multi-Site tut in the How-To area at some stage detailing what I did.
Comment #6
agentrickard