Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Support / [help!] Multiple installations setup

tensh
#1 2013-02-19 08:51


Contributors
Thanked: 9 times

Hi;

Because I've encountered many problems with subdomains and wildcards, I decided to setup a multi-instance website. The question is: how to do it?

Can I just install Cotonti 3 times, but make it share the user table (by changing the prefix of table in config)? How about sharing pfs, sessions/users? Do you have any experience with it?

I won't be using different databases, just change prefixes I think.

Added 2 hours later:

 

This is my setup:
- I have multihost enabled.
- I copied site ID to the installation in subdomain
 
Do I miss anything?
 
$db_x= 'cota_'; // Default: cot_, prefix for extra fields' table(s)
$db_xx= 'cot_'; // Default: cot_, prefix for extra fields' table(s)
 
$db_auth= $db_xx.'auth';
$db_cache = $db_x.'cache';
$db_cache_bindings= $db_x.'cache_bindings';
$db_core= $db_x.'core';
$db_config = $db_x.'config';
$db_groups = $db_xx.'groups';
$db_groups_users = $db_xx.'groups_users';
$db_logger = $db_x.'logger';
$db_online = $db_xx.'online';
$db_extra_fields= $db_x.'extra_fields';
$db_plugins = $db_x.'plugins';
$db_structure = $db_x.'structure';
$db_updates= $db_x.'updates';
$db_users = $db_xx.'users';
$db_pfs= $db_xx.'pfs';
$db_pfs_folders = $db_xx.'pfs_folders';

Added 14 minutes later:

It seems that I have problems with permissions... :/

I need some advice. Hmm... rename some modules to prevent mess?

Added 1 hours later:

Edit2: okay, I separated auths for each site. Only groups, users and pfs tables are shared.

Added 5 minutes later:

I also turned off auth cache.

So far it looks good.

Added 3 hours later:

Hot to log in and out into/from all subdomains? So far I have to log in separately to each subdomain instance.


This post was edited by tensh (2013-02-19 15:24, 2 years ago)
Macik
#2 2013-02-19 20:33


Team
Thanked: 60 times

What aims you want to achieve with «multisites» (different visual themes with shared users DB)? 

What domains or site names will be used for different of you sites (completelly different domain names, diff. subdomains or diff subfolders of same domain)?

 

https://github.com/macik
tensh
#3 2013-02-20 07:22


Contributors
Thanked: 9 times

Well, at first I wanted to have each page list as a subdomain, but I've ran into problems (see my previous post in this forums)

It will be a very simple site, using some plugins and only page, pfs, rss modules. Yes, there will be different themes. It will be a portfolio site that will cover totally different areas of interest. That's why each portfolio will be in a subdomain.

I'm pretty okay so far with what I've done, the only think is that I would like to single-log in into all instances.

Eugene
#4 2013-03-13 06:37


Members
Thanked: 4 times

Hello, tensh!

please, share you experience...

Did you solve problem with no single-login?

Did you try to share other db tables? What about cot_extra_fields or cot_structure?

Macik
#5 2013-03-13 09:40


Team
Thanked: 60 times

#37057 tensh:

I'm pretty okay so far with what I've done, the only think is that I would like to single-log in into all instances.

If you don't use multiuser on you site (only one admin user) you can try use same $cfg['site_id'] for all subdomains. (I'm not tested it so I'm not sure it will works.)

Добавлено 28 минуты спустя:

And set «cookiedomain» to point to main domain.

https://github.com/macik

This post was edited by Macik (2013-03-13 10:08, 1 years ago)
tensh
#6 2013-03-13 10:52


Contributors
Thanked: 9 times

Thanks, I'll try it :)