2

I'm trying to limit access to certain directories in SVN as follows using Apache httpd server to controll the requests. Basically I want to allow access to / for all authenticated users and only allow access to paths matching /root//branches/release to a specific user. Is such a thing possible? example of broken code below.

<Location />
    DAV svn
    SVNPath c:/svnrep/svn_repository
    AuthType Digest
    AuthName "example"
    AuthDigestDomain /
    AuthUserFile c:/users
    Require valid-user
</Location>


<Location /root/*/branches/release*>
    DAV svn
    AuthType Digest
    AuthName "example"
    AuthDigestDomain /svn
    AuthUserFile c:/users
    Header add test result
    Require user exampleuser
</Location>
2
  • What happens when you try to use this?
    – David Z
    Jun 24, 2010 at 4:52
  • Basically it appears like the second rule is competely ignored.
    – Wes
    Jun 24, 2010 at 8:10

1 Answer 1

2

It appears that the following works.

<Location "/svn">
    DAV svn
    SVNPath c:/svnrep/svn_repository
    AuthType Digest
    AuthName "example"
    AuthDigestDomain /svn
    AuthUserFile c:/users
    Require valid-user
</Location>

<Location "/root/projectName/branches">
    Header add test result
    Require user exampleuser
</Location>

Theres two fundemental differences between this and the previous one.

  1. The second location block doesn't contain the mapping to SVN. This makes sense actually as in the origional example it was trying to map the root of svn to the internal structure.
  2. For some reason it doesn't work for me when using the wildcard syntax even though the wildcard syntax is mentioned at http://httpd.apache.org/docs/2.2/mod/core.html#location apache core

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .