Work with Trac projects

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

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 installdir
$ 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://localhost:port/trac. For single-project deployments, this page can be hidden by following the steps below:

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

      #<LocationMatch "/trac/[^/]+/login">
      <LocationMatch "/trac/login">
        AuthType Basic
        AuthName "Trac"
        AuthUserFile "installdir/apps/trac/conf/htpasswd"
        Require valid-user
  • Edit the installdir/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'] = 'installdir/apps/trac/trac_projects'
      os.environ['TRAC_ENV'] = 'installdir/apps/trac/trac_projects/Project'
  • Restart the Apache server:

      $ installdir/ restart apache
Last modification April 8, 2020