Subversion on CentOS VPH

Discussion in 'Linux VPS/Dedicated - General' started by azov, Sep 6, 2006.

  1. azov

    azov New Member

    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. weiyin

    weiyin New Member

    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>
     
  3. azov

    azov New Member

    Well, here's what I've got:

    <VirtualHost *:80>
    ServerAdmin [email protected]
    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.
     
  4. azov

    azov New Member

    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!
     

Share This Page