我正在努力安装新的 Trac 1.0.3(在通过 安装相同的问题后从源代码easy_install
)。
- Debian 7.8
- 阿帕奇 2.2.22
- Python 2.7.3
- 源氏0.6
- Sqlite 3.7.13
- WSGI 3.3
我在其中创建了 Trac 环境/var/trac
并/var/trac/cgi-bin
持有trac.wsgi
. 我已经更新了 Apache...LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
和我网站的配置...
WSGIScriptAlias /trac /var/trac/cgi-bin/trac.wsgi
<Directory /var/trac/cgi-bin>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
<Location /trac>
Order deny,allow
Allow from all
</Location>
我的/var/trac/log/trac.log
(为空)配置在trac.ini
...
[logging]
log_file = /var/trac/log/trac.log
log_level = DEBUG
log_type = file
我的 Apache 错误日志...
[Thu Jan 29 18:38:46 2015] [debug] util_ldap.c(1990): LDAP merging Shared Cache conf: shm=0x7f4d8661f0f0 rmm=0x7f4d8661f148 for VHOST: hostname.example.net
[Thu Jan 29 18:38:46 2015] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Thu Jan 29 18:38:46 2015] [info] LDAP: SSL support available
[Thu Jan 29 18:38:46 2015] [debug] mod_wsgi.c(10080): mod_wsgi (pid=12945): Socket for 'My-WSGIDaemonProcess' is '/var/run/apache2/wsgi.12945.0.1.sock'.
[Thu Jan 29 18:38:46 2015] [notice] Apache/2.2.22 (Debian) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12951): Starting process 'My-WSGIDaemonProcess' with uid=33, gid=33 and threads=15.
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12951): Initializing Python.
[Thu Jan 29 18:38:46 2015] [info] Server built: Dec 23 2014 22:48:32
[Thu Jan 29 18:38:46 2015] [debug] worker.c(1757): AcceptMutex: sysvsem (default: sysvsem)
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12952): Initializing Python.
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12953): Initializing Python.
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12952): Attach interpreter ''.
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12951): Attach interpreter ''.
[Thu Jan 29 18:38:46 2015] [info] mod_wsgi (pid=12953): Attach interpreter ''.
Apache 访问日志中的浏览器请求...
1.2.3.4 - - [29/Jan/2015:18:44:20 -0500] "GET /trac HTTP/1.1" 304 188 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:35.0) Gecko/20100101 Firefox/35.0"
问题: Apache 提供的内容是/var/trac/cgi-bin/trac.wsgi
……我看到了 Python 代码。
我不知道我哪里出错了,但您的帮助将不胜感激。谢谢。
更新 1:如您所见,上述信息围绕提出GET /trac
请求。我发现虽然发出GET /trac/login
请求会导致 Apache 抛出HTTP 500
.
更新 2:我禁用了错误配置的 LDAP 身份验证,并且现在HTTP 500
错误.UPDATE 1
HTTP 404
在您的 cgi-bin 指令中,尝试添加“ExecCGI”选项并添加 cgi-script 处理程序:
解决了我的问题...
阿帕奇配置...
将此配置与问题中发布的配置进行比较。