Mantis Server Farm
Moderators: Developer, Contributor
Mantis Server Farm
Hi
My current System:
Win2k3, Apache 2.0.58, MySQL 5.0.22, Mantis 1.0.7
Everything is working fine, but that is not my Problem ;)
I have to create different mantis installations, because of different developer groups and different access configurations. Currently I created different folders an MySQL-DBs for each installation. It working. The problem I will went into is, when a new version of mantis got released. I have to update each installation for its own.
Is there any way to hav one central installation folder for more than one mantis? Each Mantis should have it own "Issue and ID management".
Jens
My current System:
Win2k3, Apache 2.0.58, MySQL 5.0.22, Mantis 1.0.7
Everything is working fine, but that is not my Problem ;)
I have to create different mantis installations, because of different developer groups and different access configurations. Currently I created different folders an MySQL-DBs for each installation. It working. The problem I will went into is, when a new version of mantis got released. I have to update each installation for its own.
Is there any way to hav one central installation folder for more than one mantis? Each Mantis should have it own "Issue and ID management".
Jens
Arbeit, die man liegen ließ, war nie vergeblich
I couldn't tell you how to do something like that, but if you don't mind, can I ask for more information as to why you need multiple installations?
You said it's "because of different developer groups and different access configurations".
Normally differences like that are served by making your projects private and then adding each user with their own required level to the project. That way, each user can have a different level of access to each project (right down to 'no access at all').
I just wanted to make sure that you had explored that path before going ahead with having to manage multiple installations...
You said it's "because of different developer groups and different access configurations".
Normally differences like that are served by making your projects private and then adding each user with their own required level to the project. That way, each user can have a different level of access to each project (right down to 'no access at all').
I just wanted to make sure that you had explored that path before going ahead with having to manage multiple installations...
Yes it is possible
See:
http://bugtracker.morinie.fr/mantis/
http://bugtracker.morinie.fr/lisp/
http://bugtracker.morinie.fr/demo/
This three "instances" share the same database (but not the same tables) and the same source code.
In the config_inc.php file you need to add this (and only this):
With config_lisp.php, config_mantis and config_demo.php located in the /var/www/bugtracker/config directory and /var/www/bugtracker/html/demo is a link to /var/www/bugtracker/mantis-1.1.0a2 by example.
See:
http://bugtracker.morinie.fr/mantis/
http://bugtracker.morinie.fr/lisp/
http://bugtracker.morinie.fr/demo/
This three "instances" share the same database (but not the same tables) and the same source code.
In the config_inc.php file you need to add this (and only this):
Code: Select all
$t_conf = explode( '/', str_replace( '/var/www/bugtracker/html', '', $_SERVER['SCRIPT_NAME'] ) );
$t_conf = $t_conf[1];
# config_inc may not be present if this is a new install
if ( file_exists( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config_' . $t_conf . '.php' ) ) {
require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config_' . $t_conf . '.php' );
}
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/
Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
=> http://deboutv.free.fr/mantis/
Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
Here is my little tutorial to build a mantisfarm on a single domain. These are the steps I did to make it work for me:
Hope I missed nothing.
Jens
- Assuming you want to have the following Mantis-URLs:and your webspace is located at "D:\webserver\htdocs"
Code: Select all
http://www.example.com/mantisfarm/test/ http://www.example.com/mantisfarm/tools/ http://www.example.com/mantisfarm/apps/
- Your Webserver has to support "RewriteEngine"
- Create this directories
Code: Select all
D:\webserver\htdocs\mantisfarm\ D:\webserver\htdocs\mantisfarm\config\ D:\webserver\htdocs\mantisfarm\scripts\
- uncompress the mantis-zip-file to "D:\webserver\htdocs\mantisfarm\scripts\"
- copy "mantisfarm\scripts\config_inc.php.sample" to "mantisfarm\config\config_test.php", "mantisfarm\config\config_tools.php" and "mantisfarm\config\config_apps.php"
- Create file "mantisfarm\.htaccess"
Code: Select all
RewriteEngine On RewriteCond %{REQUEST_URI} ^/mantisfarm/tools/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/mantisfarm/apps/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/mantisfarm/test/(.*)$ RewriteRule [^/]/.* /mantisfarm/scripts/%1 [L,QSA]
- create the file "mantisfarm\scripts\config_inc.php"Make it readonly.
Code: Select all
<?php $farmrooturl = '/mantisfarm'; $t_conf = explode( '/', str_replace( $farmrooturl, '', $_SERVER['REQUEST_URI'] ) ); $t_conf = $t_conf[1]; # config_inc may not be present if this is a new install $t_conffile=dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config_' . $t_conf . '.php'; if ( file_exists( $t_conffile ) ) { require_once( $t_conffile ); } else{ header("HTTP/1.0 404 Not Found"); header("Status: 404"); echo "<p>mantis not found</p>"; exit; } ?>
- Open "http://www.example.com/mantisfarm/test/admin/" and configure the installation. Save the config to "/mantisfarm/config/config_test.php"
- Do the same for "tools" and "apps". Greate a new database for every installation or redefine the full "Mantis Database Table Variables"-Block in the config-files.
- rename "admin"-directory. You need it if you want to install another mantis
Hope I missed nothing.
Jens
Arbeit, die man liegen ließ, war nie vergeblich
Add the following to your config-files to get redirected correctly after log out:nigjo wrote:Hope I missed nothing.
Code: Select all
###########################
# Redirections
###########################
# Specify where the user should be sent after logging out.
$g_logout_redirect_page = $farmrooturl.'/'.$t_conf.'/login_page.php';
Code: Select all
############################
# Mantis Path Settings
############################
# path to your images directory (for icons)
# requires trailing /
$g_icon_path = $farmrooturl.'/'.$t_conf.'/images/';
###########################
# Include files
###########################
# CSS file
$g_css_include_file = $farmrooturl.'/'.$t_conf.'/css/default.css';
Jens
Arbeit, die man liegen ließ, war nie vergeblich
I'm not anyone else, but I found another way. You don't have to replace all %path% with $farmrooturl/$t_conf, but you have to change a file of the distribution: "config_defaults_inc.php":nigjo wrote:(or does anyone know a better patch?)
Search the following line:
Code: Select all
$t_path = dirname( strip_tags( $_SERVER['PHP_SELF'] ) );
Code: Select all
// check for rewrite_engine
if ( isset( $_SERVER['REDIRECT_URL'] ) ) {
$t_path = dirname( strip_tags( $_SERVER['REDIRECT_URL'] ) );
} else {
$t_path = dirname( strip_tags( $_SERVER['PHP_SELF'] ) );
}
Jens
Arbeit, die man liegen ließ, war nie vergeblich
Another hint to solve the "PHP_SELF"-problem:
Edit the code-snippet from above to this one:
Now you can change every occurrence (except in core.php and config_defaults_inc.php ) of into and you no longer should run into 404-Errors because of wrong redirections.
In core/utility_api.php you have to change thisinto
Jens
Edit the code-snippet from above to this one:
Code: Select all
// check for rewrite_engine
if ( isset( $_SERVER['REDIRECT_URL'] ) ) {
$g_php_self = $_SERVER['REDIRECT_URL'];
} else {
$g_php_self = $_SERVER['PHP_SELF'];
}
$t_path = dirname( strip_tags( $g_php_self ) );
Code: Select all
$_SERVER['PHP_SELF']
Code: Select all
config_get_global( 'php_self' )
In core/utility_api.php you have to change this
Code: Select all
function is_page_name( $p_string ) {
return isset( $_SERVER['PHP_SELF'] ) && ( 0 < strpos( $_SERVER['PHP_SELF'], $p_string ) );
}
Code: Select all
function is_page_name( $p_string ) {
return config_get_global( 'php_self' ) != null && ( 0 < strpos( config_get_global( 'php_self' ), $p_string ) );
}
Arbeit, die man liegen ließ, war nie vergeblich
Re: Mantis Server Farm
I successfuly updated my farm to Version 1.1 (Backup your current installation before updating!!!)
The config-dir will stay the same as in v1.0.x. Copy config.inc.php from your old installation.
Instead of changing every occurance of $_SERVER['PHP_SELF'] I just added to following lines to config_defaults_inc.php:
find the lineand add these lines before:
All other files don't need any change.
After this you have to call /<mantisfarmpath>/<farmitem>/admin/ to update your database for each item of your farm.
Jens
The config-dir will stay the same as in v1.0.x. Copy config.inc.php from your old installation.
Instead of changing every occurance of $_SERVER['PHP_SELF'] I just added to following lines to config_defaults_inc.php:
find the line
Code: Select all
$t_path = dirname( strip_tags( $_SERVER['PHP_SELF'] ) );
Code: Select all
// check for rewrite_engine
if ( isset( $_SERVER['REDIRECT_URL'] ) ) {
$g_php_self = $_SERVER['REDIRECT_URL'];
$_SERVER['PHP_SELF'] = $_SERVER['REDIRECT_URL'];
}
After this you have to call /<mantisfarmpath>/<farmitem>/admin/ to update your database for each item of your farm.
Jens
Arbeit, die man liegen ließ, war nie vergeblich
Re: Mantis Server Farm
i am a newbie to mantis server farm just using only one mantis on single domain computer.
I want to deploy mantis server farm for mantis hosting business.
Above example shows URL type multiple installations. How do I configure Mantis to use wildcard DNS type mantis farm ?
Top domain is like this. http://farm.com , subdomain will be http://mantis1.farm.com, http://mantis2.farm.com, http://mantis3.farm.com .....
And what license should I get from mantis team to deploy mantis hosting business ?
I want to deploy mantis server farm for mantis hosting business.
Above example shows URL type multiple installations. How do I configure Mantis to use wildcard DNS type mantis farm ?
Top domain is like this. http://farm.com , subdomain will be http://mantis1.farm.com, http://mantis2.farm.com, http://mantis3.farm.com .....
And what license should I get from mantis team to deploy mantis hosting business ?
Re: Mantis Server Farm
I know this is an incredibly old thread, but has anyone attempted this with the current version of software (1.3.0)? I've successfully created and edited the folders as shown above in the 6th post, and executed the install.php script, but when I try to hit the login page (http://<myhostname>/mantis/lmt/login_page.php, I'm redirected to the install page. Clearly something isn't in the right place with version 1.3.
Any help is appreciated (or should I just do a single install and use projects to divide business units)?
Any help is appreciated (or should I just do a single install and use projects to divide business units)?
Re: Mantis Server Farm
Hi srwatters
We finally managed to update our installation to 1.3.x. The configuration is mostly the same as for 1.2.x. Except the path in the config/config_inc.php has to add another folder depth.
Jens
We finally managed to update our installation to 1.3.x. The configuration is mostly the same as for 1.2.x. Except the path in the config/config_inc.php has to add another folder depth.
Code: Select all
$t_conffile = dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR .
'..' . DIRECTORY_SEPARATOR .
'config' . DIRECTORY_SEPARATOR . 'config_' . $t_conf . '.php';
Arbeit, die man liegen ließ, war nie vergeblich