Project management: Trac

Table of Contents

CGI script of Apache
Add repository

CGI script of Apache

by ross at 17:45:36 on January 13, 2012

(Re)install Apache with suEXEC enabled

# cd /usr/ports/www/apache22
# make config
  • Check SUEXEC

Add to /etc/make.conf:

.if ${.CURDIR:M*/www/apache22}

If Apache is already installed:

# make build deinstall reinstall clean


# make install clean

Prepare webroot

Init /home/trac/projectname as shown on previous page.

# mkdir /home/www/
# mkdir /home/www/
# trac-admin /home/trac/projectname deploy /home/www/

# cd /home/www/
# chmod a+x cgi-bin/*
# htpasswd -c .htpasswd admin
# htpasswd .htpasswd user1
# htpasswd .htpasswd user2
# htpasswd .htpasswd user3
# chmod 640 .htpasswd

# chown -R projectname:projectname /home/www/
# chgrp www /home/www/

Virtual host

<VirtualHost *:80>
        DocumentRoot /home/www/
        Alias /chrome/common /home/www/
        Alias /chrome/site /home/www/
        ScriptAlias / /home/www/

        ErrorLog "/home/www/"
        CustomLog "/home/www/" combined

        SuexecUserGroup projectname projectname

        <Location "/login">
                AuthType Basic
                AuthName "Project Name"
                AuthUserFile /home/www/
                Require valid-user

<Directory "/home/www/">
        Options Indexes MultiViews
        AllowOverride None
        Order Allow,Deny
        Allow from all
<Directory "/home/www/">
        Options ExecCGI
        AllowOverride None
        Order Allow,Deny
        Allow from all
# service apache22 restart

Navigate to