Link to home
Start Free TrialLog in
Avatar of nerkoni
nerkoni

asked on

drupal 7 multisite install on centos 6.6

Hello,

I am trying to get drupal multisite running on centos 6.6 vps.
My main site main.com (which has its own mysql db) is working fine, This site has also the domain access module installed (https://www.drupal.org/project/domain).

My other 2 sites are in the main.com/sites folder (i.e. main.com/sites/mysite1.com and main.com/sites/mysite2.us). These 2 sites share another existing mysql database. They both have settings.php with same db info and different base_url strings.

The main.com/sites directory also has sites.php file which looks something like this:
$sites['default'] = 'main.com';
$sites['mysite1.com'] = 'mysite1.com';
$sites['mysite2.us'] = 'mysite2.us';

When trying to access either mysite1.com or mysite2.us I am getting 403 Forbidden error (Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.)

When trying to import existing install (in Installatron) for the 2 sites I am getting (Error: Unable to detect the source installed application's database information. Please contact support for assistance.)

How to resolve this to get it working?

Thanks.
403.PNG
installatron.PNG
subsites.PNG
Avatar of nerkoni
nerkoni

ASKER

I was able to get it solved (partially at least) by pointing the 2 subsites to the main.com installation root.
Few problems remain:
1. since mysite1.com and mysite2.us share same database, whatever theme I set for the one affects the other (since same db). I know it should work so that you put desired themes in respective theme folders, but something seems still not right in my setup...
2. how could I eventually share most of the database (now is whole) between the 2 "subsites" and just have some of them each have their own tables (and how I determine which tables)? For example: if I set the file system for the mysite1.com/files, I want to have for the second one the file system to be mysite2.us/files (right now it is the same, i.e. mysite1.com/files)

Thanks.
Avatar of David Johnson, CD
By design each site is supposed to have its own database and not share from the main site.
Avatar of nerkoni

ASKER

That is new to me. I thought you can setup multisite any way you like: each site has own DB, they share complete DB, they share some of the DB tables, etc.
Avatar of nerkoni

ASKER

Anyway, I think I found what I need in this module: https://www.drupal.org/project/themekey
This will allow me to have different themes for different domains. That solves my initial dilemma...
Thanks for the reply.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.