0

I need to put Trac on a URL path other than /. If I take the configuration from http://trac.edgewall.org/wiki/TracOnUbuntu and modify the Location blocks, I get the error message "No handler matched request to /trac". How can I avoid this?

<VirtualHost *:80>
    ServerName trac.local
    <Location /trac> # instead of Location /
       SetHandler mod_python
       PythonInterpreter main_interpreter
       PythonHandler trac.web.modpython_frontend
       PythonOption TracEnv /var/local/trac
       PythonOption TracEnvParentDir /var/local/trac
       PythonOption TracUriRoot /
       PythonOption TracEnv /var/local/trac
        # PythonOption TracEnvIndexTemplate /var/local/trac/templates/index-template.html
       PythonOption TracLocale en_US.UTF8
       PythonOption PYTHON_EGG_CACHE /tmp
       Order allow,deny
       Allow from all
    </Location>
    <Location /trac/login> # instead of /login
      AuthType Basic
      AuthName "myproject"
      AuthUserFile /var/local/trac/.htpasswd
      Require valid-user
    </Location>
</VirtualHost>
ideaboxer
  • 3,863
  • 8
  • 43
  • 62

1 Answers1

0

How about adjusting 'PythonOption TracUriRoot /' too?

Furthermore please acknowledge, that mod_python is depreciated (end-of-life), and you should rather choose WSGI for new installations instead.

hasienda
  • 2,390
  • 1
  • 13
  • 16
  • Thanks, I did not think of this option. Now it works. @deprecated: I just did a brand-new Trac setup and followed the instructions on the TracOnUbuntu wiki (http://trac.edgewall.org/wiki/TracOnUbuntu). It nowhere states this is not the recommended way of setting up Trac together with Apache. – ideaboxer Mar 20 '13 at 14:24
  • Sure, just the age of most of its content is speaking against taking that wiki page too serious. – hasienda Mar 20 '13 at 22:33
  • 10 months is not really old. – ideaboxer Mar 21 '13 at 14:13