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 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 </LocationMatch>
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/ctlscript.sh restart apache