0

I am trying to figure out how to have apache redirect to a subversion repository after the requested URL is authorized for a user. After trying a lot of combinations the best result I can get is ave apache to redirect to target SVN repo folder as a web directory rather than the folder as a subversion repository.

The authorization steps work as expected, approving or denying the user, but then the redirect fails with Directory index forbidden by Options directive: /home/svn/svnRepo1/,

Folder set up /home/svn/svnRepo1 << the repo is working via myurl.com/svnRepo1 as expected /home/userA/myurl.com/protected

NB: the myurl.com/protected/svnRepo1 web folder does not exist

in the url conf files I have

svn.conf

    <Location /svn>
     DAV svn
     SVNParentPath /home/svn
    </Location>

in the url.conf I have

 <Location /protected/svnRepo1>
            AuthType openid-connect
            #Require valid-user
            Require claim folders:svnRepo1
  </Location> 
  Alias /protected/svnRepo1 /home/svn/svnRepo1

Lastly I would like to make the directives so a user can NOT access the repo directly by myurl.com/svnRepo1 as this would bypass the authorization process.

Thx Art

  • Is there some good reason why you can't just put the auth directives directly onto /svn? Why the redirect? – Andrew Schulman Oct 9 '14 at 7:33
  • yes, i need different urls for each svn project (myurl.com/project-x/svnName) and each project has different authorization providers, so I can not see a way to set this up on a per project basis. Can you provide some code examples to do it directly? – art vanderlay Oct 9 '14 at 10:58
0

It seems to me that this would be a more direct approach:

<Location /svn>
  DAV svn
  SVNParentPath /home/svn
</Location>

<Location /svn/svnRepo1>
  AuthType openid-connect
  Require claim folders:svnRepo1
</Location> 

avoiding the need for the Alias directive.

But anyway, as for your problem error message Directory index forbidden by Options directive, all you should need to fix that is to add Options +Indexes within one or more of the <Location> directives.

  • @Schulman, unfortunately that did not work, I need the alias as there are several sub domains pointing to the svn directory that contains sub projects. Your code did not trigger the openid auth request. – art vanderlay Oct 9 '14 at 18:48
  • OK. Well ignoring my suggestion about the Alias, did Options +Indexes solve your error message? – Andrew Schulman Oct 9 '14 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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