CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • multiple subdomains on Drupal multisite - same Civi code and db
Pages: [1]

Author Topic: multiple subdomains on Drupal multisite - same Civi code and db  (Read 2748 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
multiple subdomains on Drupal multisite - same Civi code and db
December 11, 2011, 09:20:54 pm
Hi I have a Drupal 6 multisite where multiple subdomains are used.   california.abc.com, oregon.abc.com etc.   The content of the sites are the same and they use the same Drupal DB, the differences are purely aesthetic (theme) stuff.

I want the same CiviCRM codebase and dB to be available to all subdomains.

What is the best (easiest) way to accomplish this with CiviCRM 3.4?  I haven't installed yet.  I notice the docs are a little out of date (here too) on this subject. 

If someone can explain best way to do this, I'd be happy to update the wiki.

Thanks. :)



 
Try CiviTeacher: the online video tutorial CiviCRM learning library.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: multiple subdomains on Drupal multisite - same Civi code and db
December 11, 2011, 11:46:22 pm
and having a separate crm.abc.com is not an option?

For the front office, copying civicrm.settings.php and adjusting the url might be an option, for the backoffice, probably not, as the domain is hardcoded in the db.

It should be relatively easy to fix the urls in resource to be relative and it would then work.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: multiple subdomains on Drupal multisite - same Civi code and db
December 12, 2011, 06:39:00 am
Merci.

I did one install of Civi using one of the subdomains.  Then I copied civicrm.settings.php to each subdomain and changed the base URL in each civicrm.settings.php.   This appears to work fine for both the 'front end' (forms and registration) and backend administration areas.

Try CiviTeacher: the online video tutorial CiviCRM learning library.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: multiple subdomains on Drupal multisite - same Civi code and db
December 12, 2011, 06:46:19 am
Hi,

Some features depends on the url as set in the resource url. Things like emails for instance I think.

Would be good you identify which ones and hopefully being able to fix them.

(so the resource url only contains the relative path without the domain name, and the domain name is only in civicrm.settings)

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: multiple subdomains on Drupal multisite - same Civi code and db
December 12, 2011, 12:16:51 pm
As of 4.1 you should be able to store things like resource urls in civicrm.settings.php.

We use the domain module to provide multiple sites with one drupal db & one civicrm db (it allows different themes per URL & has quite a lot of other features if required) & then stick 'if thens' into civicrm.settings.php to set the base url depending on the domain - this is just about enough under 3.4 but occassionally the resourceurl causes problems - e.g. on secure pages.

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • multiple subdomains on Drupal multisite - same Civi code and db

This forum was archived on 2017-11-26.