You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Anderson Smith <ta...@hotmail.com> on 2009/09/23 18:59:48 UTC

405 not allowed in reponse to PROPFIND

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. 

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
	https://10.1.10.250 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@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@localhost tmp]# 




	When I commit, I get the following:
		[root@localhost project]# svn commit
-m "I did a bunch of stuff"

		Sending        config/nom.php

		Transmitting file data .

		Committed revision 4.



		Warning: post-commit hook failed
(exit code 255) with no output.

		[root@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.



3. When I attempt to use subversion
	remotely I get the following:
	user@remotemachine:~$ svn co
http://10.1.10.250/repos/project

	svn: Server sent unexpected return
value (405 Method Not Allowed) in response to PROPFIND 	request for
'/repos/project'




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 10.1.10.250

        SSLEngine on

        SSLCipherSuite HIGH:MEDIUM

        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@example.com

</VirtualHost>




	/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

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



Thanks again








 		 	   		  
_________________________________________________________________
Microsoft brings you a new way to search the web.  Try  Bing™ now
http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399035

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: 405 not allowed in reponse to PROPFIND

Posted by Ryan Schmidt <su...@ryandesign.com>.
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 https://10.1.10.250 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@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@localhost tmp]#
>
> When I commit, I get the following:
> [root@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@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 http://10.1.10.250/repos/project
> 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  
repositories.


> 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 10.1.10.250
> SSLEngine on
> SSLCipherSuite HIGH:MEDIUM
> 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@example.com
> </VirtualHost>

With the URL you supplied (http://10.1.10.250/repos/project) 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 "https://10.1.10.250:447/repos/project 
" (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 http://10.1.10.250/repos/project
> svn: OPTIONS of 'http://10.1.10.250/repos/project': Could not read  
> status line: connection was closed by server (http://10.1.10.250)

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.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399049

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].