0
votes

so ive installed SVN on my centos 6.5, version 1.6.11 and im trying to configure that in /var/www/html/svn/testrepo will be my repository, so i found alot of guides in google and used all of them to try to do that, here is my subversion.conf

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

#
# Example configuration to enable HTTP access for a directory
# containing Subversion repositories, "/var/www/svn".  Each repository
# must be both:
#
#   a) readable and writable by the 'apache' user, and
#
#   b) labelled with the 'httpd_sys_content_t' context if using
#   SELinux
#
#
# To create a new repository "http://localhost/repos/stuff" using
# this configuration, run as root:
#
#   # cd /var/www/svn
#   # svnadmin create stuff
#   # chown -R apache.apache stuff
#   # chcon -R -t httpd_sys_content_t stuff
#


<Location /unixmen1>
   DAV svn
   SVNParentPath /var/www/html/svn
# Require SSL connection for password protection.
# SSLRequireSSL

      AuthType Basic
      AuthName "Subversion repos"
      AuthUserFile /etc/svn-auth-users
      Require valid-user

</Location>

now i checked and i found out that /etc/svn-pass and /etc/svn-auth-users are the same ... also i dont see svn folder in /var/ which is weird because it is shown in all of the guides, i tried those guides : http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/

https://wiki.centos.org/HowTos/Subversion

just cant figure wht the hell ive done wrong ... and by the way this is the first time i try to setup svn ...

EDIT:

now after i played with it for a bit i can access via browser the whole directory but i cant connect to the repo with tortoiseSVN i get an redirection cycle error and the httpd/access log says :

 192.168.1.36 - - [19/Nov/2015:14:44:19 +0200] "OPTIONS /svn/unixmen1 HTTP/1.1" 301 319 "-" "SVN/1.9.2 (x64-microsoft-windows) 
serf/1.3.8 TortoiseSVN-1.9.2.26806"

this was in the error log :

    [Thu Nov 19 14:40:38 2015] [notice] Apache/2.2.15 (Unix) DAV/2 SVN/1.6.11 configured -- resuming normal operations
[Thu Nov 19 14:44:04 2015] [notice] caught SIGTERM, shutting down
[Thu Nov 19 14:44:09 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Nov 19 14:44:09 2015] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 19 14:44:09 2015] [notice] Digest: done
[Thu Nov 19 14:44:09 2015] [notice] Apache/2.2.15 (Unix) DAV/2 SVN/1.6.11 configured -- resuming normal operations

and i changed the subversion.conf file aswell (edited the file above) the etc/svn-auth-users got 1 user in it but the svn doesnt even require credentials, just says that there's a redirection cycle for the URL : 192.168.1.14/svn/unixmen1

[root@SVN svn]# cd /var/www/html/svn/unixmen1/
[root@SVN unixmen1]# ls -als
total 36
4 drwxr-xr-x 7 apache apache 4096 Nov 19 12:43 .
4 drwxr-xr-x 3 root   root   4096 Nov 19 09:47 ..
4 drwxr-xr-x 2 apache apache 4096 Nov 19 09:47 conf
4 drwxr-sr-x 6 apache apache 4096 Nov 19 09:47 db
4 -r--r--r-- 1 apache apache    2 Nov 19 09:47 format
4 drwxr-xr-x 2 apache apache 4096 Nov 19 09:47 hooks
4 drwxr-xr-x 2 apache apache 4096 Nov 19 09:47 locks
4 drwxr-xr-x 2 root   root   4096 Nov 19 12:43 project1
4 -rw-r--r-- 1 apache apache  229 Nov 19 09:47 README.txt
[root@SVN unixmen1]#

would really appreciate if someone could help me.

1

1 Answers

0
votes
  1. Show DocumentRoot for Apache's mainhost. I suppose, it's below /var/www/html/svn/ and it's big error
  2. I see cd /var/www/html/svn/unixmen1/, i.e virtual path from <Location> exist as real physical path (and even inside DocumentRoot??? - see p.1) - this is giant NO-NO

Common rules (dirty short draft) for Apache-served SVN-repos

  1. Repositories places at any location outside web-root
  2. DAV-Location doesn't exist as real path inside DocumentRoot (unique name)
  3. SVNParentPath used for serving family of repositories with common 1-st parent, SVNPath - for serving single repo

I.e, f.e.:

  • var/repos/Name1 ... var/repos/NameN are paths to repositories
  • var/www/html is DocumentRoot
  • URL for the repos have to be smth. like http://HOST/repositories/NameX

your configuration will be (relevant part)

# if mod_dav was compiled as a shared object (instead of statically linked)
LoadModule dav_module         modules/mod_dav.so
LoadModule
LoadModule 
...
<Location /repositories>
   ...
   SVNParentPath /var/repos/
   ...
</Location>