Each project can have its own virtual host
. Location of project files is configured with projectname
.projects.gforge.company.com
$groupdir_prefix
variable in GForge configuration file. Each project has directory with project's name and contains htdocs
subdirectory where Web files are placed. Project directories are created by cronjobs/cvs-cron/usergroup.php
.
Project virtual hosts require new DNS zone. Making this new zone is similar to making DNS zone for GForge itself.
Declare new zone in gforge.
zone:company.com
projects IN NS ns.projects.gforge.company.com
If DNS server doesn't serve the new projects.gforge.
zone, add the following line too:company.com
ns.projects IN A 1.2.3.4
Don't forget to change serial number of gforge.
zone!company.com
Create new zone file with following content:
$TTL 2d @ IN SOA projects.gforge.company.com
. hostmaster.gforge.company.com
. ( 1 ; Serial 172800 ; Refresh 900 ; Update retry 2419200 ; Expire 3600 ) ; Negative Cache TTL ; @ IN NS ns.projects.gforge.company.com
. @ IN A1.2.3.4
ns IN A1.2.3.4
* IN A1.2.3.4
The new zone must be added in main BIND configuration file:
zone "projects.gforge.company.com
" { type master; file "/dist-specific/path/to/zone-file
"; };
Reload BIND and test if all works:
$host test.projects.gforge.
test.projects.gforge.company.com
company.com
has address1.2.3.4
Module vhost_alias
should be enabled and the following directives should be added to httpd.conf
(if
is what you have chosen in /var/www/homedirs
/groups$groupdir_prefix
):
If you want to be FHS-compliant, you may use /var/local/gforge/log
and /var/local/gforge/homedirs
.
# # WARNING - security is degraded by having this # on the same machine as the primary GForge # NameVirtualHost1.2.3.4
<VirtualHost1.2.3.4
> ServerName projects.gforge.company.com
ServerAlias *.projects.gforge.company.com
ServerAdmin webmaster@gforge.company.com
UseCanonicalName Off # You may want to add these files to logrotate, or just use cronolog as shown below CustomLog "/var/log/gforge
/projects/access.log" combined ErrorLog "/var/log/gforge
/projects/error.log" # CustomLog "|/usr/bin/cronolog/var/log/gforge
/projects/%Y/%m/%d/access.log" combined # ErrorLog "|/usr/bin/cronolog/var/log/gforge
/projects/%Y/%m/%d/error.log" DocumentRoot/var/www/homedirs
/groups VirtualDocumentRoot/var/www/homedirs
/groups/%1/htdocs <Directory/var/www/homedirs
/groups> Options Indexes # # WARNING - turning on php will allow any user # to upload a php file to your server, and include # the gforge local.inc file and get your password to # connect to the database and have total control. # php_flag engine off AllowOverride None Order allow,deny Allow from all </Directory> DirectoryIndex index.html index.htm </VirtualHost>
cronjobs/cvs-cron/usergroup.php
copies from cronjobs/cvs-cron/default_page.php
to
but the above configuration disables PHP./var/www/homedirs
/groups/projectname
/htdocs/index.php
If you want to enable full text indexing, follow these steps:
Find tsearch2.sql
in your distribution of PostgreSQL and run it:
#su - postgres
$psql -f
/path/to/
tsearch2.sql gforge
Since gforge
PostgreSQL user is not superuser, access to some Tsearch2 tables should be additionally granted:
#su - postgres
$psql gforge
gforge=#GRANT SELECT ON pg_ts_dict TO gforge;
gforge=#GRANT SELECT ON pg_ts_parser TO gforge;
gforge=#GRANT SELECT ON pg_ts_cfg TO gforge;
gforge=#GRANT SELECT ON pg_ts_cfgmap TO gforge;
Import data definitions:
$cd
$/var/www/gforge
/dbpsql -U gforge -W -h localhost -f FTI.sql gforge
$psql -U gforge -W -h localhost -f FTI-20050315.sql gforge
$psql -U gforge -W -h localhost -f FTI-20050401.sql gforge
$psql -U gforge -W -h localhost -f FTI-20050530.sql gforge
Enable Full Text Indexing by setting $sys_use_fti
in GForge Configuration File local.inc
.
PHP must be compiled with --with-gd
, or appropriate package must be installed. Extra fonts for JPGraph are not necessary. Be sure your /etc/gforge/local.inc
file contains the proper path to the jpgraph/src/
directory.
Manual installation can be done like this:
# tar -xzf jpgraph-1.19.tar.gz # mkdir/var/www
/jpgraph # cp -R jpgraph-1.19/src/*/var/www
/jpgraph
If you want FHS-compliance, /usr/local/share/jpgraph
When you get your preferred version of JPGraph installed, you will have to edit one setting in jpgraph.php
(or jpg-config.php
, depending on JPGraph version):
DEFINE("USE_CACHE", false);
Be careful with JPGraph license: versions > 1.5.2 are not free (as in free speech). You must check license before use.
If you want to use some of the Perl scripts that access the database, you'll need the DBI
and DBD::Pg
Perl modules. On Red Hat systems (and variants), you can get them by installing the libdbi
and libdbd-pgsql
packages. On Debian systems (and variants), the packages are called libdbi-perl
and libdbd-pg-perl
.
You'll also need to install utils/include.pl
to /var/www/gforge/lib/
, and put some configuration variables into /etc/gforge/local.pl
. In particular, you'll need something like the following in local.pl
:
$sys_default_domain = 'gforge.company.com' ; $sys_dbhost = '192.168.12.34' ; $sys_dbname = 'gforge' ; $sys_dbuser = 'gforge' ; $sys_dbpasswd = 'p455w0rd' ;
GForge supports the sending of messages to jabber accounts. To accomplish this, you must have a user account setup on the jabber server that gforge can connect to and send messages.
Once you have that user account, server, and password set up, just edit /etc/gforge/local.inc
and add the information to the jabber section.
Add yourself, and any others you wish, to the “Peer Ratings” project, which should be at /projects/peerrating/
on the website. Make yourself an admininistrator of the project, and then proceed to “rate” other users on the website.
Members of the “Peer Ratings” project, who are administrator of the project, become the first trusted users. This is the only way to prime the pump for the peer ratings system.