Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to install trac on my server. I found TracInstall to intall trac step by step. I stopped at the point Running trac on a Web-Server because I do not really understand what all the paths mean. E.g.

Example: Apache and ScriptAlias

Assuming the deployment has been done this way:

$ trac-admin /var/trac/env deploy /path/to/trac/htdocs/common

Add the following snippet to Apache configuration before the ScriptAlias or WSGIScriptAlias (which map all the other requests to the Trac application), changing paths to match your deployment:

Alias /trac/chrome/common /path/to/trac/htdocs/common
Alias /trac/chrome/site /path/to/trac/htdocs/site

<Directory "/path/to/www/trac/htdocs">
  Order allow,deny
  Allow from all


  1. What is /var/trac/env? I can't find it on my server.
  2. Is /path/to/trac/htdocs/common the path to my trac project's htdocs folder? There is a htdocs folder but actually it is empty.
  3. What is /path/to/www/trac/htdocs? This is again a totally different path.

What makes that thing even worse, during installation I had to do this

mkdir -p /usr/share/trac/projects/my-project
trac-admin /usr/share/trac/projects/my-project initenv
trac-admin /usr/share/trac/projects/my-project deploy /tmp/deploy
mv /tmp/deploy/* /usr/share/trac

So I actually have two projects now. Why?

Later in TracInstall he says

Alias /trac/chrome/site /path/to/projectenv/htdocs

Again a strange path. Are that paths all different? Can you tell me how to get trac running on web server correctly?

share|improve this question
Is /var/trac/env a Trac environment? –  quanta Aug 4 '11 at 9:17

1 Answer 1

up vote 3 down vote accepted

Directly to your numbered questions:

  1. The path to Trac environment folders is often referred to as /your/path/to/<env>, where env is the folders name corresponding to your newly created projects name. Hint: Trac environment creation has to be done at the CLI, if you don't use a fancy plugin like TracCreateWebUiScript.

  2. /path/to/trac/htdocs/common is actually created by the deploy command. What you do here, is extracting static resources from installed Trac package to be accessed and served by your webserver. Hint: This could be one place even for multiple Trac instances, but strictly for a single Trac version. To serve projects with different Trac versions in parallel, you'll need to give each it's dedicated htdocs/common/trac_0.1x folder.

  3. Finally /path/to/www/trac/htdocs does refer to the htdocs folder to be found in every Trac environment - <env>/htdocs to be exact. Hint: This must be different between your Trac enviroments. Theoretically you could decide to share this space to simplify setup and maintenance for a bunch of Trac environments located at the same server, but some plugins use folders below <env>/htdocs.

Note to your install:

initenv will create a new Trac environment, as stated above. The other thing is about static resources for that very same environment, just support files for it.

Are the installation instructions really that hard to understand? Well must be, or you wouldn't see help here. Sorry for that. Please reply to get more information, if required.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.