SVN - CENTOs 4.5 - Plesk 8.3

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
tungsten
Forum User
Forum User
Posts: 16
Joined: Thu Sep 29, 2005 11:11 pm

SVN - CENTOs 4.5 - Plesk 8.3

Unread post by tungsten »

Hi All,

Been pulling my hair out for a day or so now. We working on getting our codebases in order. I'm attempting to get Subversion working on our CentOS 4.5 / Plesk 8.3 box.

Here is what we have installed:

Code: Select all

httpd-2.0.52-32.3.ent.centos4
mod_dav_svn-1.4.6-0.1.el4.rf
subversion-1.4.6-0.1.el4.rf
I've followed Scott's Wiki entry - http://www.atomicorp.com/wiki/index.php/Subversion- and still no joy.

In trying to connect to the SVN repos via file:/// we get
svn list http://svn.domain.com/repos
svn: PROPFIND request failed on '/repos'
svn: PROPFIND of '/repos': 403 Forbidden (http://svn.domain.com)
When hitting the subdomain at http://svn.domain.com we get the following:
Could not open the requested SVN filesystem
This is the contents of the vhost.conf file for subdomains/svn/conf

Code: Select all

<Location /repos>
 DAV svn
 SVNParentPath /var/www/svn
 #
 # Limit write permission to list of valid users.
 <LimitExcept GET PROPFIND OPTIONS REPORT>
    # Require SSL connection for password protection.
    # SSLRequireSSL
    #
    AuthType Basic
    AuthName "authorization to svn.domain.com required"
    AuthUserFile /var/www/passwd
    Require valid-user
 </LimitExcept>
</Location>
I have created valid user/pass credentials. Apache has been configured to account for the vhost.conf file under the subdomain as per Scott's wiki entry.

Apache owns all the files in the /var/www/svn directories and I've even gone so far as to chmod -R 777 that entire tree in an effort to get it running.

Does anyone have any insight as to how to get this running? I'm at a loss at present (hence my de-lurk mode on the forum).

Appreciate any help / suggestions / etc.... Thanks.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

And you set all that stuff in the vhost.conf/ran websrvmng on the domain? Second thing to check would be to see if you see those connections in the domains logs. (under /var/www/vhosts/DOMAINNAME/statistics/logs)
tungsten
Forum User
Forum User
Posts: 16
Joined: Thu Sep 29, 2005 11:11 pm

Unread post by tungsten »

Thanks for the response Scott. Here is what I know:

Vhost.conf file is set up for svn.domain.com with the above details (as per the wiki).

When I check the error_log and access_log for the parent domain, there are no entries related to svn.domain.com in regards to the SVN login attempts.

Access_log is showing traffic just fine to the svn. subdomain when I browse it.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

DNS problem maybe? Id start with the most simple and work your way forward. The fact that no traffic is getting to the domain at all tells me its not related to your vhost.conf changes, or subversion at all.
tungsten
Forum User
Forum User
Posts: 16
Joined: Thu Sep 29, 2005 11:11 pm

Unread post by tungsten »

Ok. Simplest way forward. Started over! :)
yum remove subversion mod_dav_svn

After walking through the wiki again from top down, I am now getting the following error in the access_log for the domain.

Code: Select all

my.IP.add.ress - - [06/Apr/2008:10:13:40 -0500] "PROPFIND /projects/domain/project HTTP/1.1" 405 606 "-" "SVN/1.4.4 (r25188) neon/0.26.3"
The good news is that I can now access the repositories through svn.domain.com with a web browser.

2 things to work out still:

1. Authentication - not sure why my authorization is not working
2. Still get the PROPFIND error when trying to use CL from local to remote. (edit: turns out the PROPFIND error occurs when you try and access a directory that does not exist. If you get the svn co http://domain/path/to/project corrent, everything is fine)

I will post with details. Thanks for the sounding board.
Last edited by tungsten on Mon Apr 07, 2008 11:49 am, edited 1 time in total.
tungsten
Forum User
Forum User
Posts: 16
Joined: Thu Sep 29, 2005 11:11 pm

Unread post by tungsten »

SVN is working ... so that is a good thing. I feel like I'm halfway there.

However, my authorization is not currently working at all. At present, this is what I have in the subdomain vhost.conf file

Code: Select all

<Location /repos>
 DAV svn
 SVNParentPath /var/www/svn
 #
 # Limit write permission to list of valid users.
 <LimitExcept GET PROPFIND OPTIONS REPORT>
    # Require SSL connection for password protection.
    # SSLRequireSSL
    #
    AuthType Basic
    AuthName "authorization to svn.domain.com required"
###    AuthUserFile /var/www/passwd
    AuthUserFile /var/www/svn-auth-file
    Require valid-user
 </LimitExcept>
</Location>
/var/www/password /var/www/svn-auth-file is a valid file. Does apache need to own that svn-auth-file? At present the permissions on it are:

Code: Select all

-rw-r--r--   1 root  root       218 Apr  5 15:16 svn-auth-file
Currently when I try and access http://svn.domain.com/repos/path/to/project via a web browser I can get directly to it. There is no authentication prompt. This is also true for access via the command line.

I've read over the Subversion FAQs at tigris.com and because we are passing everything off to Apache to handle authentication, I'm not sure where to look.
tungsten
Forum User
Forum User
Posts: 16
Joined: Thu Sep 29, 2005 11:11 pm

Unread post by tungsten »

Holy crap. Why didn't anyone tell me I'm retarded. I've been staring the issue right in the face the entire time. /bonk

Anyhow, for anyone else spinning around like me, if you want a user authenticated SVN repo that is NOT publicly accessible, then set your vhost.conf file as follows:

Code: Select all

<Location /repos>
 DAV svn
 SVNParentPath /var/www/svn
 #
 # Limit write permission to list of valid users.

    AuthType Basic
    AuthName "authorization to svn.domain.com required"
    AuthUserFile /var/www/svn-auth-file
    Require valid-user
</Location>
This is all pretty clearly documented over at the Subversion Book.

It's amazing what a few hours away from something (and some sleep) will do. Fresh eyes always win.
Last edited by tungsten on Tue Apr 08, 2008 9:28 am, edited 1 time in total.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Thanks for the follow up!
Post Reply