sudesh
sudesh

Reputation: 973

Creating HTTP Alias for Subversion repos directories

I would like to grant read/write access for one of our development team to access only a particular sub directory in a SVN repository. I achieved this using the directive "AuthzSVNAccessFile" in subversion.conf(httpd).

Let Say I am having the following directory structure in my svn repo:
- Workspace
      - Branches
             - Mobile
                   - App
                         - Phase1
                         - Phase2
                         - Phase3 (This is the directory I want to grant) .....

Phase3 can be accessible by our dev team using the below url
       http://mydomain.com/svn/Workspace/Branches/Mobile/App/Phase3

How do I create a short url like the following to access the above one.
       http://mydomain.com/svn/Phase3

Please help me to get this done. Thanks.

My apache configurations are below:
<Location /Phase3>
     DAV svn
     ReWriteEngine On
     ReWriteRule ^Phase3$  Workspace/Branches/Mobile/App/Phase3
     SVNParentPath /var/www/svn
     AuthzSVNAccessFile /var/www/svn/Workspace/conf/authz
     Require valid-user
     AuthType Basic
     AuthName "Subversion repositories"
     AuthUserFile /etc/svn-auth-users
</Location>

Upvotes: 0

Views: 1115

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97365

Preface: I never used it for SVN-locations and I'll try to avoid it in future, but you have to test. I can't explain in simple words, why I try to avoid Alias directive, you can think about it as about my "interbal voice"

Face:

I consider mod_rewrite for this simple case as overkill and suggest to start with mod_alias. "...mod_alias is designed to handle simple URL manipulation tasks..."

Inside corresponding container (location or vhost, but I'll start from outside and before SVN-Location definition)

Redirect /svn/Phase3 /svn/Workspace/Branches/Mobile/App/Phase3

If Phase3 in turn, is node, not leaf, you may to have to use RedirectMatch directive

Upvotes: 0

Related Questions