Hi,

I have setup multisite at my server using Domain Access Module. Currently it contains following features :

1. I am using separate - 2 theme for every domain with unique site url, it working fine with domain access module.
2. I am using single setting.php file to manage whole DB for all sites, for this I have keep all the themes under theme folder i.e /sites/all/themes

Currently I am managing 4 sites using single DB, it works fine because there is no change in folder structure of Drupal. I mean it is same folder structure that we use for single site except there is multiple theme inside theme folder. Rest of the work is managed through Domain Access module and Vhost file.

I need to set some configuration variable that are unique for every site. And these configuration variables are set inside setting.php file. Because I am using single setting.php here so how can i configure separate - 2 variables for every domain.

I did some R&D for this but did not find any solution. Can somebody give me any idea regarding this.

Thanks!!!!

Comments

pushpinderchauhan’s picture

Hi,

I am trying to make a separate - 2 setting.php file for every site with same DB configuration. I have already completed vhost related worked and every site domain url is already setup.

To implement this in such way I am following these steps :

  • I have installed drupal at my primary domain say www.myDupalSite.com. I have set all required variables and configuration that are unique for this domain in this setting.php. Its working perfectly, getting no issue.
  • Now I am going to create a second domain for my site and for this I've created a directory for root/sites/mysecondsite.com. In this, I am using the same DB configuration for this domain too as using for primary domain. www.mysecondsite.com

As described above, I am using the same DB for both domain with different configuration variables in setting.php for both domain.

Actually I need to setup varnish at this server and there is some configuration required that are unique for each domain. This configuration can be done only in setting.php file, this is the reason I require separate setting.php file for every domain.

But In this case Domain Access module giving some issues, If I make some changes in www.mysecondsite.com, it gets overwrite when I access the primary domain www.myDupalSite.com. Recently I made separate custom theme for second site but it is not getting saved, every time it shows me selected theme that I am running for primary domain.

Can someone guide me to resolve this issue. If some body have idea to do this in any another way then please share with me.

Pushpinder Rana #pushpinderdrupal
Acquia Certified Drupal Expert

pushpinderchauhan’s picture

Can anybody give any suggestion regarding my question. I am doing R&D on this from last 2 days and also searching on forums but did not get any clue yet. If there is any other approach to implement this please share with me because I want to confirm whether this is right approach or there is any other way to do this.

Please help!!!!!!!!!

Pushpinder Rana #pushpinderdrupal
Acquia Certified Drupal Expert

pushpinderchauhan’s picture

Currently I have two domain and facing following issue at both domains.

Error message

The form has become outdated. Copy any unsaved work in the form below and then reload this page.

Whenever I am trying to create a node from any domain, it shows above message. I am not understanding why this issue is coming.

As I am using same DB for both domain without any db prefix, so there can be a possibility of Session Conflict in both domain due to usage of same session table.

Have anybody faced this issue earlier.

Please correct me if this is not a correct way to implement multi domain site with single DB.

Pushpinder Rana #pushpinderdrupal
Acquia Certified Drupal Expert