azuretrac

Work with Trac projects

Add a new project

To create a project, enter the command below, remembering to replace the PROJECT_PATH placeholder with the correct path to your project:

$ cd /opt/bitnami
$ trac-admin PROJECT_PATH initenv

To make the project automatically appear in the “Available Projects” web page, ensure that the PROJECT_PATH is a location directly under the Bitnami Trac Stack’s projects/ directory.

Modify project configuration

The trac.ini file for each project can be found in the project’s directory in the conf directory.

Remove the project list page

By default, the Bitnami Trac Stack is configured to display the list of available projects at http://SERVER-IP:port/trac. For single-project deployments, this page can be hidden by following the steps below:

  • Edit the /opt/bitnami/apps/trac/conf/trac.conf file and remove /[^/]+ from the LocationMatch directive:

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/trac/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/opt/bitnami/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    
  • Edit the /opt/bitnami/apps/trac/scripts/trac.wsgi file and replace the TRAC_ENV_PARENT_DIR definition with a TRAC_ENV definition pointing to the project directory:

    #os.environ['TRAC_ENV_PARENT_DIR'] = '/opt/bitnami/apps/trac/trac_projects'
    os.environ['TRAC_ENV'] = '/opt/bitnami/apps/trac/trac_projects/Project'
    
  • Restart the Apache server:

    $ /opt/bitnami/ctlscript.sh restart apache
    
Last modification August 30, 2018