我试图在apache服务器上设置subversion。我遵循了这个指南:[http://wiki.centos.org/HowTos/Subversion][1]
如果我以后尝试用Tortoise签出一个项目,我会得到以下错误:
Unexpected HTTP status 405 'Method Not Allowed' on '/repos
如果我试图在linux服务器本身上使用svn客户端,就会得到如下错误:
svn: Server sent unexpected return value (405 Method Not Allowed) in response to OPTIONS request for 'https://server.ch/repos'
我在apache服务器上的当前配置如下所示:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<VirtualHost *:443>
...
<Directory "/var/www/svn/">
Order allow,deny
Allow from all
AllowOverride all
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /etc/subversion/svn-auth-conf
Require valid-user
</Directory>
<Location /repos>
DAV svn
SVNParentPath /var/www/svn/repos
SVNListParentPath on
SSLRequireSSL
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /etc/subversion/svn-auth-conf
Require valid-user
</Location>
</VirtualHost>
谢谢您提前提出建议或提供帮助。
问候马克
发布于 2014-05-12 19:21:46
我发现问题所在,位置和SVNParentPath设置错误。我在这里遵循了解决方案,[http://www.wandisco.com/svnforum/threads/35525-Stuck-with-error-%E2%80%9C405-Method-Not-Allowed%E2%80%9D][1]
apache上的正确配置如下所示:
<VirtualHost *:443>
...
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
SVNListParentPath on
SSLRequireSSL
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /etc/subversion/svn-auth-conf
Require valid-user
</Location>
</VirtualHost>
发布于 2014-05-11 22:43:01
在Apache的某个位置禁用SVN使用的OPTIONS
方法。您可以在<Directory "/var/www/svn/">
中启用此方法。
<Directory "/var/www/svn/">
...other config here
<Limit OPTIONS>
Order Deny,Allow
Allow from all
</Limit>
...other config here
</Directory>
您必须知道启用此方法的安全含义。对于SVN使用的所有HTTP方法,请参考正式文件。
https://serverfault.com/questions/594424
复制相似问题