Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to get Apache to serve Trac on CentOS 5.6 for the past few days. The missing link is almost certainly the Apache configuration. I know this because I can get trac to run locally with tracd -s --port 8080 /path/to/trac/project.

I have both mod_python and mod_wsgi installed. All of the dependencies for Trac are in place. Trac was installed using easy_install. I have successfully created a trac environment using trac-admin /path/to/trac/project initenv.

I'm aware that mod_wsgi is preferred over mod_python because it is still developed and has performance advantages, but the most recent configuration that I've tried uses mod_python. This is because all of the complete guides that I could find used mod_python and performance is not an issue. Furthermore, it is highly unlikely that anyone will ever attempt to patch this server (because I'm a student who won't be here for a great deal longer).

My most recent attempt (from /etc/httpd/conf/httpd.conf)

<virtualHost *:80>
    ServerName **IP of Server**

    <location />
    SetHandler mod_python
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnv /path/to/trac/project
    PythonOption TracUriRoot /

Any help in finding the magic configuration to make apache work for me is something that I would really appreciate. All the better if it uses mod_wsgi instead of mod_python.

EDIT: After I posted this, I discovered the BitNami Trac distribution. It installed the entire stack of software needed in its own directory and did all of the config work.

share|improve this question
The Location directive is redundant and isn't needed when doing it for '/'. VirtualHost implies '/' for stuff in it. – Graham Dumpleton Jul 6 '11 at 5:26

Your Answer


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

Browse other questions tagged or ask your own question.