我需要将 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>