日期:2014-05-17 浏览次数:20966 次
?
结合apache配置subversion步骤如下:
?
1.
vi /usr/local/apache/conf/httpd.conf
找到
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
改为
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
?
2.
vi /usr/local/apache/conf/extra/httpd-vhosts.conf
在该文件的最后,增加如下内容:
?
<Location /svn>
DAV svn
SVNParentPath /usr/local/svnroot/repository
AuthzSVNAccessFile /usr/local/svnroot/repository/password/authz
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /usr/local/svnroot/repository/password/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
?
3.
重启apache
/usr/local/apache/bin/apachectl -k start/restart
?
4.创建密码文件及用户和密码
cd?/usr/local/apache/bin
./htpasswd -c /usr/local/svnroot/repository/password/passwd hello
./htpasswd /usr/local/svnroot/repository/password/passwd admin
?
5.authz文件内容如下:
[groups] developers=admin,joshua testers=test [helloworld:/] @developers=rw @testers=?
?
?