apache Subversion (SVN) Propfind 405 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2016868/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Subversion (SVN) Propfind 405 error
提问by Joe
I am brand new to Subversion and have been told that this is the best thing since sliced bread. I have tried Google, and I am just drawing blanks on what is wrong and have tried multiple different suggestions. I get the following error.
我是 Subversion 的新手,有人告诉我这是自切片面包以来最好的东西。我试过谷歌,我只是在错误的地方画空白,并尝试了多种不同的建议。我收到以下错误。
The Location information has been specified incorrectly.
svn: Propfind of '/svn': 405 Method not allowed (http://IPADDRESS) with IPADDRESS being the IP of my server.
位置信息指定不正确。
svn: Propfind of '/svn': 405 不允许方法 ( http://IPADDRESS),IPADDRESS 是我服务器的 IP。
I get this when I try to log in through Zend Studio. I use the following to try to login:
当我尝试通过 Zend Studio 登录时,我得到了这个。我使用以下内容尝试登录:
URL: http://IPADDRESS/svn/
Username: fakeuser
Password: fakepassword
网址:http://IPADDRESS/svn/
用户名:fakeuser
密码:fakepassword
I believe that the issue is around this file because of the error "Location Information has been specified incorrectly". This file is included in the httpd.conf file. I have restarted Apache and there are not errors when restarting Apache.
我认为问题出在这个文件附近,因为错误“位置信息指定不正确”。该文件包含在 httpd.conf 文件中。我已经重新启动了 Apache,重新启动 Apache 时没有错误。
<Location /project1>
DAV svn
SVNPath /home/jhughes/project1
AuthzSVNAccessFile /home/jhughes/.svn-policy-file
AuthName "SVN Repositories"
AuthType Basic
AuthUserFile /home/jhughes/.svn-auth-file
Satisfy Any
Require valid-user
</Location>
I have spent a few hours on this and cannot get it.
我在这上面花了几个小时却无法得到它。
I am not using a proxy server. I am using the IP address of the server, because I have multiple domains on the server and thought this may be an issue.
我没有使用代理服务器。我正在使用服务器的 IP 地址,因为我在服务器上有多个域,并认为这可能是一个问题。
采纳答案by Chuck
I think your URL is partly to blame - try something more along the lines of
我认为你的 URL 部分是罪魁祸首 - 尝试更多的东西
回答by Cfreak
This is probably more a question for Server Fault, but here's my take on it:
这可能更像是服务器故障的问题,但这是我的看法:
Problem 1. Location needs to be "/project1" not just "project1" ... that's probably the source of your Location error. You can look in Apache's logs for things like this (possibly /etc/httpd/logs/error_log, but it depends on your OS and settings).
问题 1. 位置需要是“/project1”而不仅仅是“project1”……这可能是您的位置错误的来源。您可以在 Apache 的日志中查看此类内容(可能/etc/httpd/logs/error_log,但这取决于您的操作系统和设置)。
Possible problem: I've never seen an SVN repository setup in a user folder. Most likely you need to look at the settings for SVN itself and make sure the SVNPath in Apache matches it. Usually its something like /svn. Again it might be setup that way, just something I've never seen.
可能的问题:我从未在用户文件夹中看到过 SVN 存储库设置。您很可能需要查看 SVN 本身的设置,并确保 Apache 中的 SVNPath 与其匹配。通常它类似于/svn. 同样,它可能是这样设置的,只是我从未见过的东西。
What you've been told is true. SVN rocks, though setting it up through DAV is not usually for the faint of heart. Does Zend Studio support connecting to SVN through SSH? That's far easier to get going.
你被告知的是真的。SVN 摇滚,虽然通过 DAV 设置它通常不适合胆小的人。Zend Studio 是否支持通过 SSH 连接到 SVN?这要容易得多。
回答by Evan
I think you want to put your configuration inside a <Directory>block rather than a <Location>block. I originally had my configuration inside a <Location>block and was getting endless PROPFINDerrors until I moved it into a <Directory>block.
我认为你想把你的配置放在一个<Directory>块而不是一个<Location>块中。我最初将我的配置放在一个<Location>块中,并且在PROPFIND我将它移入一个<Directory>块之前不断出现错误。
Here's my working configuration (not for SVN, just a stand-alone WebDAV server):
这是我的工作配置(不适用于 SVN,只是一个独立的 WebDAV 服务器):
Alias /webdav /webdav
DavLockDB "/etc/apache2/var/DavLock"
<Directory /webdav>
Allow from all
DAV On
Require all granted
Options Indexes
AuthType Basic
AuthName "webdav"
AuthUserFile /etc/apache2/webdav.passwd
Require valid-user
</Directory>
Make sure the webdavdirectory is chowned to your web user (e.g. www-data).
确保该webdav目录已chown分配给您的网络用户(例如www-data)。

