我正在运行 CentOS 6.3 服务器以及自定义编译的 apache 2.4.3(下面的编译行)和自定义编译的 subversion 1.7.8(再次,下面的编译行)。
我已经设置了 mod_dav_svn,它已经工作了一半。如果我访问 svn.domain.com/svn,它会要求我输入用户名和密码。我可以正常登录(它只要求我一次),我可以毫无问题地浏览存储库。如果我在 Windows 机器上访问 tortoisesvn 并尝试签出存储库(例如 svn.domain.com/svn/testrepo),则会弹出登录窗口。我输入我的凭据并点击保存,然后点击确定。窗口再次弹出。我可以反复输入我的凭据,但它什么也没做(它表现得好像我的用户名和密码是错误的,但我知道它们是正确的)。错误日志中没有显示任何内容,访问日志中也没有显示任何奇怪的内容。如果我禁用身份验证,一切都会正常工作。救命!
编辑:我执行了“chmod -R 777 /u01/svn”来查看是否解决了问题。没有成功。出于同样的原因,svnauth 文件也是 777。
VHosts 配置
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/u01/www/vhosts/svn"
ServerName svn.domain.com
ErrorLog "logs/svn.domain.com-error_log"
CustomLog "logs/svn.domain.com-access_log" common
<Location /svn>
DAV svn
SVNParentPath /u01/svn/
SVNListParentPath On
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /usr/local/apache/conf/svnauth
Require valid-user
</Location>
</VirtualHost>
配置交换机
阿帕奇
"./configure" \
"--prefix=/usr/local/apache" \
"--enable-ssl" \
"--enable-rewrite=shared" \
"--enable-status=shared" \
"--enable-info=shared" \
"--enable-so"
颠覆
'./configure' \
'--with-serf' \
'--enable-ssl' \
'--prefix=/usr/local/subversion' \
'--with-apr=/usr/local/apache/bin/apr-1-config' \
'--with-apr-util=/usr/local/apache/bin/apu-1-config'
目录列表结果
[pritchea@server ~]$ ls -l /u01/svn/
total 12
drwxrwxrwx 6 pritchea wheel 4096 Jan 24 04:44 repo1
drwxrwxrwx 6 pritchea wheel 4096 Jan 15 03:20 repo2
drwxrwxrwx 6 pritchea wheel 4096 Mar 7 20:13 testrepo
[pritchea@server ~]$ ls -l /u01/svn/*
/u01/svn/repo1:
total 24
drwxrwxrwx 2 pritchea wheel 4096 Jan 24 04:44 conf
drwxrwxrwx 6 pritchea wheel 4096 Jan 24 04:51 db
-rwxrwxrwx 1 pritchea wheel 2 Jan 24 04:44 format
drwxrwxrwx 2 pritchea wheel 4096 Jan 24 04:44 hooks
drwxrwxrwx 2 pritchea wheel 4096 Jan 24 04:44 locks
-rwxrwxrwx 1 pritchea wheel 229 Jan 24 04:44 README.txt
/u01/svn/repo2:
total 24
drwxrwxrwx 2 pritchea wheel 4096 Jan 15 03:20 conf
drwxrwxrwx 6 pritchea wheel 4096 Feb 12 02:26 db
-rwxrwxrwx 1 pritchea wheel 2 Jan 15 03:20 format
drwxrwxrwx 2 pritchea wheel 4096 Jan 15 03:20 hooks
drwxrwxrwx 2 pritchea wheel 4096 Jan 15 03:20 locks
-rwxrwxrwx 1 pritchea wheel 229 Jan 15 03:20 README.txt
/u01/svn/testrepo:
total 24
drwxrwxrwx 2 pritchea wheel 4096 Mar 7 20:13 conf
drwxrwsrwx 6 pritchea wheel 4096 Mar 7 20:13 db
-rwxrwxrwx 1 pritchea wheel 2 Mar 7 20:13 format
drwxrwxrwx 2 pritchea wheel 4096 Mar 7 20:13 hooks
drwxrwxrwx 2 pritchea wheel 4096 Mar 7 20:13 locks
-rwxrwxrwx 1 pritchea wheel 229 Mar 7 20:13 README.txt
答案1
删除该DocumentRoot
指令。 它对 无效DAV svn
。