Laconica multi-site installation

I want to have several installations of Laconica on our Intranet but want only one code base.  Here is how I am doing this.

Setup

  • Place the Laconica install in a non-public folder.
  • Edit path for the config files in lib/common.php
//$_config_files[] = INSTALLDIR.'/config.php';
$_config_files[] = SITEDIR.'/config.php';
  • Create a new folder in the public web space and add the following folders/files from the Laconica install folder.

avatar/
file/
js/
local/
theme/
config.php
index.php
install.php
favicon.ico

Installation

In both the index.php and install.php files, edit the INSTALLDIR to point to your Laconica installation base and add a define for SITEDIR.

define('INSTALLDIR', '/web/laconica');
define('SITEDIR', dirname(__FILE__));

In the file install.php change all paths using INSTALLDIR to SITEDIR with the following exceptions

$res = runDbScript(INSTALLDIR.'/db/laconica.sql', $conn);
$res = runDbScript(INSTALLDIR.'/db/'.$scr.'.sql', $conn);
  • Run install.php

Post Install

Add site timezone and fancy-urls to config.php

$config['site']['timezone'] = 'America/Detroit';
$config['site']['fancy'] = TRUE;
  • Edit the .htaccess file to set the correct RewriteBase
  • Remove the install.php file
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: