Multiple sites, one installation

Post about your customizations to share with others.

Moderators: Developer, Contributor

Re: Multiple sites, one installation

Postby cas » Feb 11, 2011 2:10 am

@phileas,
yep feel free to beuatify, can only help the community :P
cas
 
Posts: 276
Joined: Mar 11, 2006 11:08 am

Re: Multiple sites, one installation

Postby Phileas » Feb 11, 2011 4:38 am

Phileas
 
Posts: 29
Joined: Feb 22, 2010 11:51 am
Location: Switzerland

Re: Multiple sites, one installation

Postby cas » Feb 11, 2011 5:44 am

Thanks, it looks much better like this :D
cas
 
Posts: 276
Joined: Mar 11, 2006 11:08 am

Re: Multiple sites, one installation

Postby ryanasr » Feb 14, 2011 5:49 pm

Agreed much better, formatting makes all the difference.
ryanasr
 
Posts: 1
Joined: Feb 13, 2011 7:11 pm

Re: Multiple sites, one installation

Postby AussieSwede12 » Feb 15, 2011 10:13 am

Oh yeah!! That's neat! Thanks! :D
AussieSwede12
 
Posts: 1
Joined: Feb 15, 2011 10:08 am

Re: Multiple sites, one installation

Postby cas » Feb 17, 2011 6:18 am

There is one other area which needs to be addressed which is the reference within Mantis to custom_strings_inc.php.
In the current setup it is assumed that these would be the same for all instances running of that singel install. This clearly is not de facto true.
Good news is that it is not a real issue anyway :D
This can be handled pretty easily, exactly in the same way as for the base config !!
Just move your custom strings into an instance dependent file caklled custom_strings_mantis1.php and so on.
Then your custom_strings_inc.php would look like :
<?php
// ******************************************************************************************
// * *
// * HTTP_HOST is used to determine the config file needed for webservices *
// * SCRIPT_NAME is used to determine the config file needed for commandline services *
// * *
// ******************************************************************************************
$hostheader = $_SERVER['HTTP_HOST'];
$mailscript = $_SERVER['SCRIPT_NAME'];

switch ($hostheader) {
case "mantis1.yourdomainl.com" :
include('custom_strings_mantis1.php');
break;
case "mantis2.yourdomainl.com" :
include('custom_strings_mantis2.php');
break;
}

switch ($mailscript){
case "read_mail_mantis1.php" :
include('custom_strings_mantis1.php');
break;
case "read_mail_mantis2.php" :
include('custom_strings_mantis2.php');
break;
}

The same applies for the custom_constants_inc.php

@phileas,
did not add that to the wiki, did not want to screw up your very nice lay-out :lol: . So please add the above to the Howto.
cas
 
Posts: 276
Joined: Mar 11, 2006 11:08 am

Re: Multiple sites, one installation

Postby cas » Mar 02, 2011 8:56 am

we found a lot of error messages (type notify) in the php errorlog after this change.
The reason being that we also use the commandline feature and then clearly there is no hostheader.
In order to avoid the messages, the config_inc.php needs to be adjusted as follows :
Code: Select all
if (isset($_SERVER['HTTP_HOST'])) {
    $hostheader = $_SERVER['HTTP_HOST'];
}

Initially there was no condition given for reading of the hostheader.
cas
 
Posts: 276
Joined: Mar 11, 2006 11:08 am

Re: Multiple sites, one installation

Postby Phileas » Mar 03, 2011 4:49 am

Hi cas

please have a look at http://www.mantisbt.org/wiki/doku.php/m ... stallation in section Examples.
can you correct the source of config_inc.php, i do not know where you made this change.
or let me know what you exactly mean, how it should be coded.
Phileas
 
Posts: 29
Joined: Feb 22, 2010 11:51 am
Location: Switzerland

Re: Multiple sites, one installation

Postby cas » Mar 03, 2011 5:15 am

Phileas,
documentation adjusted. Manged to do that without damaging the lay-out :D
cas
 
Posts: 276
Joined: Mar 11, 2006 11:08 am

Previous

Return to Customizations

Who is online

Users browsing this forum: No registered users and 1 guest

cron