简体   繁体   中英

Subversion (SVN) Propfind 405 error

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.

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.

I get this when I try to log in through Zend Studio. I use the following to try to login:

URL: http://IPADDRESS/svn/
Username: fakeuser
Password: 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.

<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.

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).

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.

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.

I think your URL is partly to blame - try something more along the lines of

http://username:password@IPADDRESS/svn/project1/

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 PROPFIND errors until I moved it into a <Directory> block.

Here's my working configuration (not for SVN, just a stand-alone WebDAV server):

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 webdav directory is chown ed to your web user (eg www-data ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM