Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
share|improve this question
    
What happens when you try to use this? –  David Z Jun 24 '10 at 4:52
    
Basically it appears like the second rule is competely ignored. –  Wes Jun 24 '10 at 8:10

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.