2

我很难尝试解决一些带有 web dav 和身份验证的 apache 配置的问题。我有几个存储库,我想使用一个单一权限 (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 模块/mod_dav.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
* =
4

1 回答 1

1

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

于 2014-07-03T15:09:55.820 回答