我正在尝试设置 trac,我输入了以下几行
<Location /trac/[[:alnum]]+/login">
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
<Location /trac>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/www/trac
PythonOption TracUriRoot /trac
</Location>
在这个文件中,
/etc/apache2/sites-enabled/000-default
但是当我尝试重新启动 apache 服务器时,出现以下错误:
Syntax error on line 50 of /etc/apache2/sites-enabled/000-default:
Invalid command 'PythonInterpreter', perhaps misspelled or defined by a module not included in the server configuration
答案1
也许您需要先安装 libapache2-mod-python?
sudo apt-get install libapache2-mod-python