如果我打开我的SVN http://localhost/repos/XXX 浏览器说:
禁止
您无权访问此服务器上的/ repos / XXX。 位于localhost端口80的Apache / 2.2.3(CentOS)服务器
CENTOS 5.7新安装(X64)
我确信所有步骤(http://www.server-world.info/en/note?os=CentOS_5&p=subversion)都已运行且未显示任何错误。
这是我的配置:
cat /etc/httpd/conf.d/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 readable and writable by the 'apache' user. Note that if
# SELinux is enabled, the repositories must be labelled with a context
# which httpd can write to; this will happen by default for
# directories created in /var/www. Use "restorecon -R /var/www/svn"
# to label the repositories if upgrading from a previous release.
#
#
# 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
#
<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 Realm"
AuthUserFile /etc/httpd/conf/.htpasswd
# specify access control file
AuthzSVNAccessFile /etc/svnusers
Require valid-user
</LimitExcept>
</Location>
EDIT:
[root@ORA /]# ls -la /var/www/svn/XXX
total 32
drwxr-xr-x 6 apache apache 4096 Feb 24 09:53 .
drwxr-xr-x 3 apache apache 4096 Feb 24 09:53 ..
drwxr-xr-x 2 apache apache 4096 Feb 24 09:53 conf
drwxr-sr-x 6 apache apache 4096 Feb 24 09:53 db
-r--r--r-- 1 apache apache 2 Feb 24 09:53 format
drwxr-xr-x 2 apache apache 4096 Feb 24 09:53 hooks
drwxr-xr-x 2 apache apache 4096 Feb 24 09:53 locks
-rw-r--r-- 1 apache apache 229 Feb 24 09:53 README.txt
EDIT:
#cat access_log
127.0.0.1 - - [24/Feb/2012:09:54:54 +0800] "GET /repos/XXX HTTP/1.1" 403 287 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.26) Gecko/20120216 CentOS/3.6-1.el5.centos Firefox/3.6.26"
答案 0 :(得分:0)
<Location /repos>
DAV svn
SVNParentPath /var/www/svn
#
# # Require SSL connection for password protection.
# SSLRequireSSL
#
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /etc/httpd/conf/.htpasswd
# specify access control file
AuthzSVNAccessFile /etc/svnusers
# # Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
答案 1 :(得分:0)
尝试使用SVNPath而不是SVNParentPath。
答案 2 :(得分:0)
SVNParentPath / var / www / svn - &gt; SVNPath / var / www / svn