SVN + Apache2 mod_dav。 “302redirect,请重新定位”

我的虚拟主机configuration:

<VirtualHost *:443> ServerName test1.site.com DocumentRoot /var/www/test1.site.com <Location /svn> DAV svn SVNListParentPath on SVNParentPath /opt/svn </Location> SSLEngine on SSLCertificateFile /etc/apache2/ssl/server.pem SSLCertificateKeyFile /etc/apache2/ssl/server.key 

我用命令创build了回购站:

 svnadmin create /opt/svn/reponame 

当我将浏览器指向https://site.com/svn时,它会显示我的所有项目和文件,即可。

检查时出错:

 $ svn checkout https://test1.site.com/svn/ ./ svn: Repository moved temporarily to 'https://test1.site.com/svn/'; please relocate $ svn checkout https://test1.site.com/svn/projectname ./ svn: Repository moved temporarily to 'https://test1.site.com/svn/projectname/'; please relocate $ tail -2 /var/log/apache2/other_vhosts_access.log test1.site.com:443 93.12.33.100 - - "OPTIONS /svn HTTP/1.1" 302 274 "-" "SVN/1.6.6 (r40053) neon/0.29.0" test1.site.com:443 93.12.33.100 - - "OPTIONS /svn/projectname HTTP/1.1" 302 277 "-" "SVN/1.6.6 (r40053) neon/0.29.0" 

在/etc/apache2/mods_enabled/dav_svn.conf中没有configuration选项,Apache2中没有其他的VirtualHosts。

我花了大约10个小时没有结果:(我已经尝试创build新的回购,设置错误404默认,同样的狗屎!

怎么样svn checkout https://test1.site.com/svn/projectname/

你得到的第一个错误是正常的 – 因为你正在使用SVNListParentPath指令,访问/ svn URI会给你一个你可以浏览的存储库列表。 但是,您需要提供一个URL到实际存储库进行签出。

第二个错误是奇怪的 – 它应该做正确的事情,但严格来说URL应该以/结尾。

你使用的是什么版本的Apache和Subversion?