[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: 405 not allowed in reponse to PROPFIND

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Wed, 23 Sep 2009 15:04:13 -0500

On Sep 23, 2009, at 13:59, Anderson Smith wrote:

> I'm having a hell of a time getting svn/apache/https working.
> Unfortunately I'm relatively new to any Systems Administration, and
> no one else where I work has any idea what is going on, so thank you
> for any help.

It sounds like you have several separate issues going on. I'll try to
respond to them below.

> Before I installed my SSL and made a virtualhost in /etc/httpd/
> conf.d/subversion.conf SVN was working remotely, but now that I have
> that it's not. I'm having trouble debugging it. I thought maybe it
> was a permissions issue, so I put user apache in a group called svn
> (I'm running CentOS) and did "chgrp -R apache repos/ && chmod g+rw -
> R repos/" to no avail, I even tried later to just do "chown -R
> apache.apache repos/" but still no luck. I'm not quite sure what the
> problem is and I've tried to detail what I can below, thank you for
> any help.
> • https is working, I can and see things in
> the /var/www/html/ directory
> • subversion works locally. For example, I get the following when I
> use file:/// instead of http,
> [root_at_localhost tmp]# svn co file:///var/www/svn/repos/project
> A project/main
> A project/main/index.php
> A project/config
> A project/config/nom.php
> A project/options
> A project/options/options.php
> Checked out revision 3.
> [root_at_localhost tmp]#
> When I commit, I get the following:
> [root_at_localhost project]# svn commit -m "I did a bunch of stuff"
> Sending config/nom.php
> Transmitting file data .
> Committed revision 4.

You should refrain from using the repository via the file:/// protocol
after you get it set up for use with apache. Otherwise some files will
be owned by the user you're running as, and some will be owned by the
user apache is running as. Better to change the permissions of the
files so that only apache's user can read and write the repository,
and switch all your working copies to the http or https protocol. But
of course that depends on you getting that working right. See below.

> Warning: post-commit hook failed (exit code 255) with no output.
> [root_at_localhost project]#
> This is quite the different error, and I suspect unrelated, but here
> is what is in /var/www/svn/repos/project/hooks/post-commit:
> #!/bin/bash
> /usr/bin/svn update --username=hook /var/www/html/project
> The reason for this is that I need updates that are committed to be
> pushed to a live site served by apache I can actually view.

Sure, that sounds reasonable. It's not immediately clear to me why the
hook is failing. So I would take the hook out for now since that's a
secondary issue.

> 3. When I attempt to use subversion remotely I get the following:
> user@remotemachine:~$ svn co
> svn: Server sent unexpected return value (405 Method Not Allowed) in
> response to PROPFIND request for '/repos/project'

That message indicates your server is not set up to server Subversion

> My /etc/httpd/conf.d/subversion.conf is as follows:
> LoadModule dav_svn_module modules/mod_dav_svn.so
> LoadModule authz_svn_module modules/mod_authz_svn.so
> <VirtualHost *:447>
> DocumentRoot "/var/www/html"
> ServerName
> SSLEngine on
> SSLCertificateFile /etc/httpd/conf/ssl.crt/svn.crt
> SSLCertificateKeyFile /etc/httpd/conf/ssl.key/svn.pem
> <Location /var/www/svn>
> DAV svn
> SVNParentPath /var/www/svn/repos
> AuthzSVNAccessFile /etc/svn-acl-conf
> AuthType Basic
> AuthName "Subversion repos"
> AuthUserFile /etc/svn-auth-conf
> Require valid-user
> </Location>
> ServerAdmin admin_at_example.com
> </VirtualHost>

With the URL you supplied ( you're
trying to access the server on its default port 80, but above you've
shown you've set it up to handle Subversion repositories only on port
447. If that's how you want to use it, then you must specify that port
in the URL. Also, the SSL commands you've used tell me this is serving
via HTTPS. Therefore you must use the HTTPS protocol not the HTTP
protocol. So the URL you would use is "
" (note the "https" and ":447").

> /etc/httpd/conf/httpd.conf is set to listen on 447. I think the port
> here might need to be 443, but when I restart apache it is already
> listening on that port per a virtualhost in /etc/httpd/conf.d/ssl.conf

Yes, 443 would be the usual port to use for SSL web sites. You might
want to turn off that other vhost that's already running on 443, or if
you need it, then integrate your config changes into that vhost.

> If I change the VirtualHost to be *:80 instead of 447 I get this:
> user@remotemachine:~$ svn co
> svn: OPTIONS of '': Could not read
> status line: connection was closed by server (

If all you changed was changing 447 to 80, then that would be
unusable, since you're still serving SSL, but on port 80, which is
expecting not to use SSL.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-23 22:05:12 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.