我用mod_wsgi设置了Trac,除了我无法访问项目之外,一切似乎都很好。我登录后可以成功查看项目列表,但如果我尝试点击任何项目,Trac将无限期挂起。
如果我在端口80上运行相同的apache设置,一切运行正常。但是我不希望它通过端口80.我还生成了我自己的证书,我正在使用它。我无法发现我的设置有什么问题?
以下是我采取的一般步骤:
cd /etc/apache2/sites-available
vi default-ssl
a2ensite default-ssl
/etc/init.d/apache2 restart
转到https://www.myserver.com/trac
会显示我的trac项目列表。
点击其中的任何一个会导致trac挂起。即,https://www.myserver.com/trac/project1
挂起。
位点可用/默认-SSL:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
# Trac settings
WSGIScriptAlias /trac /var/lib/trac/apache/trac.wsgi
<Directory /var/lib/trac/apache>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
# Trac authentication stuff
<Location /trac>
AuthName "Trac login"
AuthType Basic
AuthUserFile /var/lib/trac/.htpasswd
require valid-user
</Location>
# Trac mod_rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "/var/lib/trac/logs/rewrite.log"
RewriteLogLevel 9
# Don't let DirectoryIndex mess with Trac installed in the root
RewriteCond %{REQUEST_URI} ^/$
RewriteRule . /trac [QSA,PT,L]
# Don't let Trac handle existing directories, files or aliases
RewriteCond /var/lib/trac%{REQUEST_FILENAME} !-d
RewriteCond /var/lib/trac%{REQUEST_FILENAME} !-f
# prepend /trac to URI and append Query String, Pass-Through to xxxAlias directives, Last rule.
RewriteRule ^(.*)$ /trac$1 [QSA,PT,L]
</IfModule>
....
</VirtualHost>
</IfModule>
用http测试trac就可以了:
的httpd.conf:
WSGIScriptAlias /trac /var/lib/trac/apache/trac.wsgi
<Directory /var/lib/trac/apache>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
<Location /trac>
AuthType Basic
AuthName "Trac login"
AuthUserFile /var/lib/trac/.htpasswd
Require valid-user
</Location>
答案 0 :(得分:0)
你知道,这真的很奇怪。我决定重新加载页面。这一次,我得到了标准的未经证实的证书问题,我接受了......
现在trac完全加载了。所以现在好了。
我以为我之前已经接受了证书。这很奇怪!