Subversion on CentOS VPH

azov

New Member
#1
Did anybody have any luck with subversion + svn_mod_dav on CentOS VPH?..

I installed svn_mod_dav and configured it in my httpd.conf, created users with htpasswd, and did

svnadmin create /path/to/repos
chown -R apache.apache /path/to/repos

Finally, I tried to do

chcon -R -h -t httpd_sys_content_t /path/to/repos

(per http://subversion.tigris.org/faq.html#reposperms), but got

chcon: /path/to/repos: Operation not supported

error. When I try to access my repository from a client computer, I'm getting

svn: Could not open the requested SVN filesystem

Any advice?..
 
#2
I have subversion + svn_mod_dav on CentOS working.

I don't think that our installation of CentOS is configured for SELinux, so the "chcon" command might not be necessary.

Looks like something wrong with your httpd.conf file. Here's the relevant part of mine for reference:

<Location /svn>
DAV svn
SVNParentPath /usr/subversion/svnroot

#svn access control policy
AuthzSVNAccessFile /usr/subversion/svn-access-file

#how to authenticate a user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /usr/subversion/svn-auth-file

#only authenticated users may access the repository
Require valid-user
</Location>
 

azov

New Member
#3
Well, here's what I've got:

<VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
ServerName svn.mydomain.com
ErrorLog logs/svn.mydomain.com-error_log
CustomLog logs/svn.mydomain.com-access_log common
DocumentRoot /prod/reps
<Location />
DAV svn
SVNParentPath /prod/reps
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /etc/svnpasswd
Require valid-user
</Location>
</VirtualHost>

Any obvoius problems? Basically, I want the URL for my repository to be http://svn.mydomain.com, and since I run a bunch of other sites off the same web server, I placed it under VirtualHost. SVN seems to understand that, when I try to connect it asks me for my username & password and checks whether it's good or not, but then fails.
 

azov

New Member
#4
Okay, I figured this out! Since I only have one repository, I should use SVNPath instead of SVNParentPath. With SVNParentPath replaced by SVNPath everything works fine.

Thanks!
 
Top