3

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
</Directory>

Questions:

  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?

DarkLeafyGreen
  • 273
  • 5
  • 7
  • 23

1 Answers1

3

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.

hasienda
  • 156
  • 4