WebDav Problem svn: PROPFIND of '/dir/dir' 301 Moved Permanently
I get the following error when attempting to export my SVN repo files from my development server which is running SVN and WebDAV to my stage server which is running on a hostgator account.
Here is the full error:
svn: PROPFIND request failed on '/svn/egr/trunk'
svn: PROPFIND of '/svn/egr/trunk': 301 Moved Permanently (http://some.no-ip.info)
Here is the SVN command I am using:
svn export http://some.no-ip.info/svn/egr/trunk . --force --username myusername
My WebDAV virtual host configuration looks like this:
<VirtualHost *:80>
ServerName some.no-ip.info
DocumentRoot /var/svn/
<Directory /var/svn/>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Alias /svn "/var/svn/"
<Location "/svn">
DAV On
DavDepthInfinity on
SVNPar开发者_开发技巧entPath /var/svn/
AuthType Basic
AuthName "SVN Login"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
</VirtualHost>
Before you ask yes I plan on using this for multiple projects that already exist within /var/svn so this is why I have attempted configuring it with SVNParentPath. A decent amount of stuff comes back in google regarding this error, but none of the solutions seem to work for me.
Ok so I finally resolved the problem. I moved all of the SVN/WebDAv configurations out of my virtual host config leaving it looking like this:
<VirtualHost *:80>
ServerName myhost.no-ip.info
ServerAdmin webmaster@localhost
ServerAlias egr.localhost
DocumentRoot /var/svn/egr/trunk
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
Options Indexes None
</VirtualHost>
I then went into /etc/apache2/mods-available/dav_svn.conf and configured it like so:
<Location /svn>
DAV svn
SVNParentPath /var/svn/
AuthType Basic
AuthName "SVN Repo"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
I can no access my SVN repo with a remote (as well as local svn client) and also have apache render the files through HTTP.
精彩评论