我尝试在apache服务器上设置颠覆。 我遵循这个指南:[ http://wiki.centos.org/HowTos/Subversion] [1 ]
如果我尝试与龟龟SVN一个项目结帐后,我得到以下错误:
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服务器上的当前configuration如下所示:
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>
预先感谢您的任何build议或帮助
关于马克
我发现这个问题,Location和SVNParentPath被错误地设置了。 我按照这里的解决scheme[ http://www.wandisco.com/svnforum/threads/35525-Stuck-with-error-%E2%80%9C405-Method-Not-Allowed%E2%80%9D%5D%5B1%5D
Apache上的正确configuration如下所示:
<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>
在你的Apacheconfiguration中的某个地方禁用了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方法,请参阅官方文档 。