使用Apache + SVN + HTTPS + Trac, 采用Digest验证经验

1. 不要将svn文件夹建在(svnadmin create)在trac目录下, 要不在post操作的时候会出现500  (无法上传东西, 只能checkout)

2. 禁用新的功能HTTPV2, 否则会找不到路径, 使用方法看下面的: SVNAdvertiseV2Protocol Off

3. 强制开启ssl

4. 下面是我的Apache conf.d 的 trac+svn配置文件

WSGIScriptAlias /pathto/trac.wsgi

<Directory /pathto/tracfile>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>

<Location “/pathto/tracurl/login”>

AuthType Digest
AuthName “**”
AuthDigestDomain  /pathto/svnurl /pathto/tracurl
AuthUserFile /pathto/tracfile/trac.htpasswd
Require valid-user
</Location>
<Directory/pathto/svn/>
Order deny,allow
Allow from all
</Directory>

<Location “/pathto/svnurl/”>
DAV svn
SVNAdvertiseV2Protocol Off
SVNPath /pathto/svnfile/

AuthType Digest
AuthName “***”
AuthDigestDomain /pathto/svnurl /pathto/tracurl
AuthUserFile /pathto/tracfile/trac.htpasswd
Require valid-user
SSLRequireSSL
</Location>

Leave a Reply

Your email address will not be published. Required fields are marked *