apache web dav svn多个存储库,一个ACL文件



我有一个非常困难的时间试图解决一个问题,我有一些apache配置与web日和身份验证。我有几个存储库,我想使用一个单一的权限(ACL)文件。这可能吗?我现在的设置是被禁止的。下面是:我的回购协议:/var/svn/repos/project_1

/var/svn/repos/project_2

/var/svn/repos/project_3

我的apache配置:

< VirtualHost *:80>
    ServerName svn.mydomain.tld
    Redirect / https://svn.mydomain.tld/    
< /VirtualHost >

' LoadModule dav_module modules/mod_dave .so

LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
< VirtualHost *:443 >
ServerName svn.mydomain.tld
DocumentRoot "/var/www/svn"
    <Directory />
    Options Includes FollowSymLinks MultiViews
    </Directory>
SSLEngine on
SSLCertificateFile /path/to/the/cert
SSLCertificateKeyFile /path/to/the/key
SSLCACertificateFile  /path/to/the/cacert
<Location /project_1>
    DAV svn
    SVNPath /var/svn/repos/project_1
    SVNIndexXSLT "/repos-web/view/repos.xsl"
    SVNPathAuthz on
    AuthzSVNAccessFile /srv/svn/conf/svnaccess
    AuthType Basic
    AuthName "My SVN Repository"
    AuthUserFile /srv/svn/conf/svnusers
    Require valid-user
</Location>
<Location /project_2>
    DAV svn
    SVNPath /var/svn/repos/project_2
    SVNIndexXSLT "/repos-web/view/repos.xsl"
    SVNPathAuthz on
    AuthzSVNAccessFile /srv/svn/conf/svnaccess
    AuthType Basic
    AuthName "My SVN Repository"
    AuthUserFile /srv/svn/conf/svnusers
    Require valid-user
</Location>
<Location /project_3>
    DAV svn
    SVNPath /var/svn/repos/project_3
    SVNIndexXSLT "/repos-web/view/repos.xsl"
    SVNPathAuthz on
    AuthzSVNAccessFile /srv/svn/conf/svnaccess
    AuthType Basic
    AuthName "My SVN Repository"
    AuthUserFile /srv/svn/conf/svnusers
    Require valid-user
</Location>
</VirtualHost>

我的ACL文件"/srv/svn/conf/svnaccess"如下所示:

[groups]
gods = admin
[/]
@gods = rw
* = r
[project_1/]
joe = rw
* =
[project_2/]
ana = rw
* =

我终于通过使用"SVNParentPath"而不是"SVNPath"解决了这个问题,还在"Location"project_name/后面添加了一个斜杠,最后我不得不在我的ACL文件中使用"[project_x:/]"格式,以使其工作。

相关内容

  • 没有找到相关文章

最新更新