0

我需要将 Trac 放在 / 以外的 URL 路径上。如果我从http://trac.edgewall.org/wiki/TracOnUbuntu获取配置并修改位置块,我会收到错误消息“没有处理程序匹配到 /trac 的请求”。我怎样才能避免这种情况?

<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>
4

1 回答 1

0

调整'PythonOption TracUriRoot /'怎么样?

此外请承认,mod_python 已被贬值(生命周期结束),您应该选择 WSGI来代替新安装。

于 2013-03-16T13:13:42.263 回答