Configuration Options

The following configuration options are present in the /etc/gforge/gforge.conf file. It's important to note that whenever you change these files, you must rebuild the configuration cache or the changes will not be reflected in the application. To rebuild the cache, the root user must issue this command:

cd /opt/gforge5 && php bin/create_config_cache.php


$config['libDir']
Description
Path to gforge php code.
Default
$config['libDir'] = '/opt/gforge5';

$config['etcDir']
Description
Path to gforge configuration files.
Default
$config['etcDir'] = '/etc/gforge5';

$config['varDir']
Description
Path to gforge data files.\
Default
$config['varDir'] = '/var/lib/gforge5';

$config['homeDir']
Description
Path to system home dir.
Default
$config['homeDir'] = '/home';

$config['usersTabAvailable']
Description
Whether users can access the Users tab at the top of the page.
Default
$config['usersTabAvailable'] = false;

$config['cacheDir']
Description
Path to language and configuration cache files. It use $config['varDir']
as a prefix.
Default
$config['cacheDir'] = $config['varDir'].'/caches';

$config['filesPath']
Description
Path where gforge filesystem will store files. It use $config['varDir']
as a prefix.
Default
$config['filesPath'] = $config['varDir'].'/filesystem';

$config['pluginsPath']
Description
Path where gforge plugins are. It use $config['libDir'] as a prefix.
Default
$config['pluginsPath'] = $config['libDir'].'/plugins';

$config['defaultLanguage']
Description
This will be the default language for the whole system. Later each user
can set their prefered language.
Options
Available options are:
en - English
es - Spanish
fr - French
zh - Simplified Chinese
ko - Korean
tw - Traditional Chinese
Examples
$config['defaultLanguage'] = 'en';
or
$config['defaultLanguage'] = 'es';

$config['defaultLanguageId']
Description
It's used by the LDAP plugin if it can't find the same configuration on
plugins/ldap/conf/ldap.conf
Options
These id's may vary, you should check the 'language' table on your
database.
Default Id's are:
1 - English
2 - Spanish
3 - French
4 - Simplified Chinese
5 - Korean
6 - Traditional Chinese
Examples
$config['defaultLanguageId'] = '1';
or
$config['defaultLanguageId'] = '3';

$config['sessionTimeout']
Description
Sets loggedin users session timeout.
Options
The time period is expressed in seconds.
Examples
$config['sessionTimeout'] = 60*60*24*7; // 7 days
or
$config['sessionTimeout'] = 60*60*24; // 1 day

$config['sessionKey']
Description
Random seed to create the session hash.
Options
It should be a long random string.
Examples
$config['sessionKey'] = 'N3ThLpFy0PAwsgZ7FuvVzflsx7ScF32gztwyzb46';

$config['defaultTheme']
Description
Default Theme name to be used.
Options
Take a look at the database table called 'theme'.
Default
$config['defaultTheme'] = 'gforge5';

$config['defaultThemeId']
Description
Default database Id of the Theme.
Options
Take a look at the database table called 'theme'.
Default
$config['defaultThemeId'] = '1';

$config['defaultTimeZone']
Description
Default time zone for new users if none is specified at registration Default
$config['defaultTimeZone'] = 'UTC';
Examples
$config['defaullTimeZone'] = 'Europe/Rome';

$config['apacheUser']
Description
Apache web server user name.
Examples
$config['apacheUser'] = 'apache';
or

$config['apacheGroup']
Description
Apache web server user group.
Examples
$config['apacheGroup'] = 'apache';
or
$config['apacheGroup'] = 'www-data';

$config['name']
Description
This name will appear as the title of the browser window.
Options
It could be whatever you want.
Examples
$config['name'] = 'MyGforge';
or
$config['name'] = 'Company Name';

$config['hostName']
Description
Hostname to be used by the system.
Examples
$config['hostName'] = 'company.com';
or
$config['hostName'] = 'company';

$config['use_ssl']
Description
Lets you enable or disable the use of SSL.
Options
true or false.
Examples
$config['use_ssl'] = true;
or
$config['use_ssl'] = false;

$config['dbtype']
Description
Database type.
Options
postgres | mysql | oracle.
Default
$config['dbtype'] = 'postgres';

$config['projectRegRestricted']
Description
If is set to true, only administrator's can register projects.
Options
true or false.
Examples
$config['projectRegRestricted'] = true;
or
$config['projectRegRestricted'] = false;
$config['troveDevStatus']
$config['troveLicense']
$config['troveOS']
$config['troveSpokenLanguage']
$config['troveProgrammingLanguage']
$config['troveTopic']
$config['troveIntendedAudience']
Description
These are the Trove Category root elements. Trove Categories are used in
Project Registration and Snippets. Most of the time, there's no need to
change them.
Examples
$config['troveDevStatus'] = 6; // An indication of the development
status of the software or resource.
$config['troveLicense'] = 13; // License terms under which the resource
is distributed.
$config['troveOS'] = 199; // What operating system the program requires
to run, if any.
$config['troveSpokenLanguage'] = 274; // The oral/written language for
the development and use of this software.
$config['troveProgrammingLanguage'] = 160; // Language in which this
program was written, or was meant to support.
$config['troveTopic'] = 18; // Topic categorization.
$config['troveIntendedAudience'] = 1; The main class of people likely to
be interested in this resource.

$config['licenseType']
Description
Refers to the different variations of GForge 5 - Express, Community, Advanced Server
Example
$config['licenseType']='advanced';

$config['licenseMaxUsers']
Description
Max number of users allowed by your license. 0 means unlimited users.
IMPORTANT: If you change this value the license check will fail and the
system will be unusable.

$config['licenseMaxMembers']
Description
Max number of project members allowed by your license. 0 means unlimited
project members.
IMPORTANT: If you change this value the license check will fail and the
system will be unusable.

$config['licenseMaxProjects']
Description
Max number of projects allowed by your license. 0 means unlimited
projects.
IMPORTANT: If you change this value the license check will fail and the
system will be unusable.

$config['licenseExpire']
Description
License expiration date. 0 means never expire.
IMPORTANT: If you change this value the license check will fail and the
system will be unusable.

$config['licenseKey']
Description
License hash key.
IMPORTANT: If you change this value the license check will fail and the
system will be unusable.

$config['sendmailPath']
Description
Path to sendmail.
Default
$config['sendmailPath'] = '/usr/sbin/sendmail';

$config['trueTypeDir']
Description
Path to the TrueType fonts directory.
Default
// must end with "/"
$config['trueTypeDir'] = '/usr/share/fonts/TrueType/';

$config['usesLdap']
Description
Set to true if you use LDAP for authentication.
Options
true or false.
Examples
$config['usesLdap'] = true;
or
$config['usesLdap'] = false;

$config['splitScmServers']
Description
Set to true if you want to use more than one SCM server.
Options
true or false.
Examples
$config['splitScmServers'] = true;
or
$config['splitScmServers'] = false;

$config['approveUsers']
Description
If registered users need to be approved by an administrator, set this to
true.
Options
true or false.
Examples
$config['approveUsers'] = true;
or
$config['approveUsers'] = false;

$config['pdftotextPath']
Description
The path to the install location of the pdftotext command, which is
used by the filesystem_index process to make PDFs searchable.
Example
$config['pdftotextPath']='/usr/bin/';

$config['doxygenPath'];
Description
The path to the doxygen code indexer, for the code search functionality
Example
$config['doxygenPath']='/usr/bin/';

$config['wvTextPath']
Description
The path to the install location of the wvtext command, which is used
by the filesystem_index process to make MS Word docs searchable.
Example
$config['wvTextPath']='/usr/bin/';

$config['usesNis']
Description
This option should be set to true if your operating system is authenticating
off of NIS, which means that users and their passwords already exist for all of
your users on the machine. In this case, GForge will allow the accounts to be
created via the www interface, but will not attempt to add the users to the
/etc/passwd and /etc/shadow files.

Examples
$config['usesNis'] = true;
or
$config['usesNis'] = false;

$config['redirectDownloads']
Description
This option will generally only be used for public, high-traffic websites
where the downloaded files can be exposed for download without concern about
access controls. By offloading downloads to an external host, you can increase
scalability of your server. To implement this functionality, set the option to
true, and enter the hostname where the downloads will be located. On that host,
you can then create a vhost entry in the apache config which will expose the
/var/lib/gforge/filesystem/ directory for direct download. By default, no vhost in
GForge exposes this directory and all downloads are protected by PHP scripts.
$config['redirectDownloads'] = false;
$config['redirectDownloadHost'] = 'http://download.gforgedomain.com';

$config['usernameregex']
Description
This variable contains a regular expression which will be used to validate
user names at the time of user registration on the www site.
Example
$config['usernameregex']='^[a-z0-9_\\.\\-]{3,15}$';

$config['passwordregex']
Description
A regular expression that is used to validate passwords that are set by the users on the new account and change password pages.
Example
$config['usernameregex']='[[:alnum:]]{6,30}';

$config['simpleFromEmail']
Description
Setting this to false will improve compatibility with some MTAs like qmail,
which do not like the modified addresses added in GForge 5.4. The new address
format in 5.4 is "Real Name" <address@mygforge.com> and this isn't working well in
qmail. Set this option to false to use the simple old address:
address@mygforge.com
Example
$config['simpleFromEmail'] = false;

$config['extraTroveRootCategories']
Description
Add additional root categories to your trove trees and project registration
forms. For example, create an additional select box with a 'business unit'
category. To do this, first create an entry in the trove_category table with a
parent_id of 0 to make it a root category. The trove_category_id of this new entry
should be placed into this array and it will then appear on the project
registration and trove browse pages.
Example
$config['extraTroveRootCategories']=array();

$config['ftp_upload']
Description
You can now upload large files into GForge AS FRS system using FTP if your
server is configured to allow this. See README.FTP in the root of your GForge AS
installation for more details. The cronjob must be run and the FTP server must be
setup to make all uploaded files owned by the apache user so the apache process
can move the files into their permanent location in the GForge file structures.
Example
$config['ftp_upload'] = false;
$config['ftp_upload_dir'] = '/var/tmp/uploads/'; // must end with "/"

$config['projectsVHostDir']
Description
GForge 5.4 and higher has the option of automatically publishing a selected
directory from project CVS or SVN trees into a wwwroot. IT IS HIGHLY RECOMMENDED
THAT YOU NEVER RUN THIS on your primary GForge server for security reasons. If you
wish to use this functionality, create a separate server, either with vmware or a
separate machine to host these insecure pages. If you run them on the primary
server, any user could upload malicious scripts and manipulate or take control of
your primary GForge instance.
See the README.PROJECTHOSTING file in the root of your GForge installation.
Example
$config['projectsVHostDir'] = '/home/groups/'; // must end with "/"

$config['forceAllLogin']
Description
Force everyone who visits the site, besides the homepage, to login.
Example
$config['forceAllLogin']=true;

$config['exportProjects']
Description
This directory is used by the project snapshot process to dump the project data to an XML file.
Example
$config['exportProjects']=$config['varDir'] . '/exportProjects';

$config['projectRegClickLicense']
Description
If set to true, you can place a text file containing your click-through license in /etc/gforge/PROJECT_LICENSE and it will be presented to the user during project registration.
Example
$config['projectRegClickLicense']=true;

$config['userRegClickLicense']
Description
If set to true, you can place a text file containing your click-through license in /etc/gforge/USER_LICENSE and it will be presented to the user during user account registration.
Example
$config['userRegClickLicense']=true;

$config['useSSO']
Description
Whether or not to use Single Sign On functionality (SSO). If set to true, you must configure your server to present a $_SERVER variable to PHP with the username of the user in question. If the variable matches an existing account, the user will be automatically logged in, otherwise redirected to account creation page.
Example
$config['useSSO']=true

$config['SSOServerVar']
Description
The variable in the $_SERVER array - often this will be REMOTE_USER, but it can be any other variable your SSO system uses, as long as it is stored in the $_SERVER variable for access by PHP.
Example
$config['SSOServerVar']='REMOTE_USER'

$config['SSOServerVarSplitChar']
Description
In some cases, the $_SERVER variable may be in a format that does not exactly match the GForge unix name, for example it may be an email address format. In this case, the SplitChar should be @. The var will be split and the first part will be used to search the database for a matching account.
Example
$config['SSOServerVarSplitChar']='@';

$config['SSOServerVarAlwaysPresent']
Description
Whether the SSO $_SERVER var is present 100% of the time. In some cases, like SiteMinder, this variable is not always presented. If set to true, the user would be booted out since they would not have the server var to compare their session cookie against. If set to false, the system will just trust the session cookie.
Example
$config['SSOServerVarAlwaysPresent']=true;

$config['SSOIDMatchesUnixName']
Description
Whether the $_SERVER variable matches the user.unix_name field or the user.external_id field. If set to true, then the $_SERVER var will be matched against the user.unix_name field. If set to false, it will be compared to the user.external_id field.
Example
$config['SSOIDMatchesUnixName']=true;

$config['SSORequireStoredPassword']
Description
Whether the password field is required when a new user account is registered. For some SSO systems, the desire is to not store any passwords in the database so no password is required and the SSO is used as the sole source of authentication.
Example
$config['SSORequireStoredPassword']=true;

$config['include_js_css']
Description
Whether to include in the html the javascript and css file contents. If "true", the javascript/css file ("*.js"/"*.css") contents used by GForge will be included in the rendered html, if "false", the javascript/css files will be linked in the rendered html.
Example
$config['include_js_css']=true;

$config['indexSCM']
Description
Whether to prevent or allow search engine spiders index scm content. If set to "false", a metatag will be added to the scm index page to prevent spiders for indexing the contents. If set to "true", no metatag will be added and search spiders will be free to index contents.
Example
$config['indexSCM']=false;

$config['useCaptcha']
Description
Whether to use the captcha mechanism on user account registration. This feature is useful to prevent automated account registration. If set to "true", a captcha will be added in the user account registration form as required field. If set to "false", captcha will not be used and the regular user registration form will be used.
Example
$config['useCaptcha']=true;

$config['useNSS']
Description
Whether the system uses an external NSS (Name Service Switch) that interacts with Gforge (e.g, nss-pgsql)
Example
$config['useNSS']=false;

$config['allowProjectJoinRequests']
Description
Whether to allow project join requests sitewide. If set to "false", the project join button won't show in project homepages and the join requests forms will be disabled.
Example
$config['allowProjectJoinRequests']=false;