Hello

I am using Drupal core 7.14. I have a successful instance of multisite install, using symlinks to connect to the core base. I am not using subdomains, instead i use symlink folders for the multisite install. And, these symlinks are within folders such as:

- nz
- ch
- uk
- us
- dk
etc

Then you might see a symlink in the /nz folder that is /this_symlink

I am using the geo_redirect module in my main_ code base. I have set this to redirect the IP addressed for each country to the appropriate TLD domain i am using, such as for New Zealand then domain example.co.nz. But to complete the geo_redirect module i have set URL settings similar to: http://www.example.co.nz/nz/index.php ...and then the final part is a 301 redirect to the HOME (for that country) page through a new /index.php file, then in other words the 301 redirect is a connectivity to a multisite symlink in the /root/nz folder etc. IE: the 301 redirect is /nz/index.php => /nz/this_symlink

To adjust the durpal core code base to accept the multi country TLD's, such as example.co.nz and example.co.uk i have set the /sites folder with a hack:

- sites/example.co.nz.nz.this_symlink
- sites/example.co.uk.uk.this_symlink
- sites/example.com.us.this_symlink

This is working fine.

Then i have saved database into to all the necessary /settings.php files, and ran the install.php script for each. The tables have all been installed on one database, for all sites. The install has been successful for all tables.

Now, i am ready to setup for single login for multisite multi TLD's, and i wonder what is the best practice...

I have reviewed many posts in Drupal.org doco's, but some are not valid for my install of Drupal core 7x.

At this point i thought i might change all settings.php files to reflect this:

  $databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'db_name',
  'username' => 'username'
  'password' => 'pass',
  'host' => 'localhost',
  'prefix' => array(
  'default'   => 'main_',
  'users'     => 'shared_',
  'sessions'  => 'shared_',
  'role'      => 'shared_',
  'authmap'   => 'shared_',
 ),
  'collation' => 'utf8_general_ci',
 );

Then i'd go to phpMyAdmin and do this for related tables:

- RENAME TABLE tbl_name TO new_tbl_name

I'd change tables names such as:

- main_users to shared_users
- main_sessions to shared_sessions
- main_role to shared_role
- main_authmap to shared_authmap
etc etc

Then i'd either delete other instances of the 'users', 'sessions', 'role', and 'authmap' tables from the database. Or i could rename them to ensure i don't loose data in case i need to restore.

Can someone please help? Please may you let me know if using the 'shared_' prefix on tables with the multi TLD multisite install will work? Or do you have any other ideas?

Comments

Valance’s picture

Hello

I have now done this:

At this point i thought i might change all settings.php files to reflect this:

$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'db_name',
'username' => 'username'
'password' => 'pass',
'host' => 'localhost',
'prefix' => array(
'default' => 'main_',
'users' => 'shared_',
'sessions' => 'shared_',
'role' => 'shared_',
'authmap' => 'shared_',
),
'collation' => 'utf8_general_ci',
);

Then i'd go to phpMyAdmin and do this for related tables:

- RENAME TABLE tbl_name TO new_tbl_name

I'd change tables names such as:

- main_users to shared_users
- main_sessions to shared_sessions
- main_role to shared_role
- main_authmap to shared_authmap
etc etc

...and the single site login does not work... does anyone have ideas?

swarad07’s picture

Hi,

I think Drupal 7's core architecture supports SSO between multisites. Although I think there is a disclaimer that the sites need to be under same domain. There are modules that provide that the widely known is the Bakery project.

In your case you have sites on different TLDs, you can look into Multisite login. I have used it on Drupal 6 and they have the dev available for Drupal 7. Give it a try and see if it helps.

Cheers,
Swarad

Jooblay.net’s picture

Central Authorization Service (CAS) was developed just for your needs. There is a drupal module for drupal 7 and you can set it quite fast.

Download CAS
Configure CAS on one sub or site in https as CAS server (make sure your CAS server is not the client)
Then enable your clients sites and point your CAS users to your CAS server.
Once your get the basics setup, you can play with a host of settings for your clients sites. Note on the CAS server is auto enabled and there are not any settings for the server. Just remember that the server is just a server and not apart of the actual clients sites.

There is quite a lot of documentation on this as well. One issue is that you have to have your CAS server set up on https:// Hypertext Transfer Protocol Secure. This gets deeper if you want to set some or all your sites into https:// using the *.example.com wildcard domain https://. This can be a challenge depending on your server side access and or knowledge of .htaccess. But at the same time if they are set on unique domains this could be as easy as setting up an additional CAS Server in your multi site and https that one:)

Hope this helps:) power to the drupal... without us it would cease to exist!

Jooblay.net’s picture

Good hit:) Drupal rocks so much... Go Drupal Pro

Thanks for the lead on the Bakery Mod... I was bogged down in the hedge rows outside of the Maginot Line... I suggested the CAS Server but I did not want to setup the https:// for the server:)
Big Thanks:) Leseen

jasom’s picture

https://drupal.org/project/i18n_sso
Internationalization Single Sign-On

pixelsweatshop’s picture

Priority: Major » Normal
Status: Active » Closed (fixed)

Support requests are never major, downgrading. jooblay.me and jasom gave you some options to try. Closing.