Sharing DB across 2 sub domains with Domain Access Module

Events happening in the community are now at Drupal community events on www.drupal.org.
cwittusen's picture

Hi:
Is it easy or hard to have 2 domains, one primary and one sub domain and have them share the db across the sites? We have www.ceveryday.com and we are looking to have our classified section on classified.ceveryday.com. Is that possible and how in that case?

/Chris

Comments

Sharing database is easy, you

rpsu's picture

Sharing database is easy, you only need to prefix db-table names. Read through settings.php, there are instuctions for that.

I kind of do not get what you need to do, so if this is not what you meant please share some more of your situation.

--
Perttu Ehn

Domain Access

cwittusen's picture

RPSU:
I'm trying to use Domain Access module, I installed it and I'm playing with it and I read that the BOA install comes prepared to work with Domain Access module but I'm having trouble when I create a new sub domain, when I try to go to the sub domain it doesn't work and I'm not sure why.

Regards,
Chris W

Alias?

defiantbyte's picture

Did add the subdomain as an alias to the site within the Aegir configuration?

It's probably already set for www.domain.com and domain.com, but you'll need to add your subdomain to the Aegir config so it points correctly.

Sub domain

barwonhack's picture

I have noticed some issues with Domain name module and install ing new drupal site (ie: fails). What I do is create a new site in a plan-vanilla platform (one without domain module) and then migrate it to the platform with all the extra modules (ie: domian).

I have configured my DNS to accept subdomain wildcards. (Is your hosts file or DNS set up correctly?)

All domains are added to aegir site config, redirects etc are handled by domain module. I am using current stable domain module release (for me on D& = 7.x-2.17).

Alias

cwittusen's picture

So if I have the domain www.ceveryday.com and I want classified.ceveryday.com, do I add classified as the alias in Aegir where the www alias is as well?

/Chris

Regards,
Chris W

Yeah, because you want all

defiantbyte's picture

Yeah, because you want all traffic to hit the same Drupal instance where Domain Access is installed.

Thank you

cwittusen's picture

Defiantbyte
Awesome, that worked, thank you for all the help; now I just have to figure out how to keep the line in settings.php when ever I add a new subdomain because Aegir overwrite's it all the time and I lose the line that loads Domain. Do you know how to do that?

Regards,
Chris W

Aegir

defiantbyte's picture

Yeah it's an Aegir thing. You create a local.settings.php file with the settings you want. Here's a link to the documentation for it.

http://community.aegirproject.org/node/71

Thank you again

cwittusen's picture

Awesome, that helps, thank you so much for your help.

Regards,
Chris

Regards,
Chris W

BOA

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: