所以我已经在我的centos 6.5,版本1.6.11上安装了SVN 我试图配置在/ var / www / html / svn / testrepo将是我的存储库, 所以我在谷歌找到了很多指南,并使用它们全部尝试这样做, 这是我的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>
现在我查了一下,我发现/ etc / svn-pass和/ etc / svn-auth-users是一样的...... 我也没有看到/ var /中的svn文件夹很奇怪,因为它显示在所有指南中, 我试过那些指南: 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
只是无法想象我到底做错了什么...... 顺便说一下,这是我第一次尝试设置svn ...
编辑:
现在我用它玩了一下后我可以通过浏览器访问整个目录但是我无法通过tortoiseSVN连接到repo我得到一个重定向循环错误 和httpd / access日志说:
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"
这是在错误日志中:
[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
我改变了subversion.conf文件(编辑上面的文件) etc / svn-auth-users中有1个用户,但svn甚至不需要凭据,只是说有一个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]#
如果有人可以帮助我,我真的很感激。
答案 0 :(得分:0)
DocumentRoot
。我想,它低于/var/www/html/svn/
并且它的大错误cd /var/www/html/svn/unixmen1/
,即来自<Location>
的虚拟路径作为真实物理路径存在(甚至在DocumentRoot内部 - 请参阅第1页) - 这是巨人NO-NO Apache服务的SVN-repos的通用规则(脏短草案)
I.e,f.e。:
var/repos/Name1 ... var/repos/NameN
是存储库的路径var/www/html
是DocumentRoot http://HOST/repositories/NameX
您的配置将是(相关部分)
# 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>