I have three different domains using Host Monster.

I installed drupal via multisite so that all domains have a different database but run on the same codebase.

For example, I have www.domain1.com [as the default domain], www.domain2.com, and www.domain3.com.

I installed the multisite_api and multisite_login under the /home/username/public_html/sites/all/ directory.

I enabled all the sites to have both the multisite_api and multisite_login on.

When I log in on domain2.com, it logs me in domain3.com, and vice versa but does not log me into domain1.com. However, if I logged out all the domains and log in via domain1.com, it will let me log into domain2.com, and domain3.com. But this can't be done if domain3.com or domain2.com has been logged in first.

domain1.com uses the sites/default directory because this main domain is the domain name associated with my hostmonster shared hosting provider. By HostMonster, domain2.com and domain3.com were named in folders of the public_html/domain2.com & public_html/domain3.com respectively. I used a sym link to make these directories go to the sites/domain2.com & sites/domain3.com.

Any help on how I can get his multisite_login to work through all the sites, no matter which site I choose to log in?

Comments

PandorasFire’s picture

I got this to work!

For those interested, especially if your hosting provider is with Bluehost or Hostmonster.

1. Make sure in the multisite_api settings of all your drupal installations that you have Exclude: default.
2. Save these configuration settings.
3. Then make sure in your sites directory that you have the original domain name.
3a. For the above example, I have /sites/default , /sites/domain1.com , /sites/domain2.com , /sites/domain3.com
4. Make changes in your settings.php [might also be helpful if you edit the base url of each of these to each site respectively in the settings.php of each of the /sites/ directories.

The theory behind this:
I noticed that if I had my domain1.com as the /sites/default , it would give the troubles I had above. However, when I added the /sites/domain1.com directory with the settings.php and files directory, I received an error when I browsed to domain2.com and domain3.com. I noticed that when I previewed what was being outputted by the multisite_api [located in the multisite_api settings] I noticed that I was outputting default & domain1.com. So I decided to exclude default and it worked!

Goodluck to those using this module, it is nifty. However, I am not sure if you need to create an account with the same information for each and everyone of these sites to have this login module work.

nikmahajan’s picture

Status: Active » Closed (fixed)
dalin’s picture

Title: Multisite works/doesn't work » Multisite doesn't work with default domain
Status: Closed (fixed) » Active
Issue tags: +multisite

When I first wrote multisite_api I assumed that no one would use the default sites directory (according to best practices). Thus I have it in the example list of excluded sites. And therefore since multisite_login only logs into sites with the same visibility and same server as the current site, when you login to domain2 it will only log you into domain3 and not domain1. The solution is to simply remove 'default' from the list of excluded sites. Apparently I'll need to take that out in the next version.

dalin’s picture

Priority: Critical » Normal
Status: Active » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -multisite

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