Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have several svn repo's set up for use by a small collection of people. They currently access there repo by the following url pattern: If they have multiple packages (which some, but not all do) its: and so on.

I would like to remove the /svn/ out of the url. I have tried using RewriteRule and RedirectMatch in apache with no success.

This is the virtual host file, prior to trying to change the URL:

<VirtualHost *:443>
  DocumentRoot /var/svn

  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/apache.pem
  SSLProtocol all

  <Location /var/svn/>
    DAV svn
    SVNParentPath /var/svn
    SVNListParentPath on
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /var/svn/svn-auth-file
    Require valid-user

  ErrorLog /var/log/apache2/error.log

  LogLevel warn

  CustomLog /var/log/apache2/access.log combined
  ServerSignature On


Any suggestions?

share|improve this question


  1. Your written config doesn't reflect your described config: /svn path vs /var/svn/ location
  2. You config must not work at all (or work with big troubles): DocumentRoot == Location == SVNParentPath, because they are a) unrelated b) different parameters

When you want to change path to your repos, you have to rewrite only definition of SVN-location, it can be / in your case (and beware: non-WebDAV tree under root will have problems in this case, if all site is repositories only it's OK for root-location)

<Location /> is short answer on your question

share|improve this answer

Assumption You have two svn repositories located at:

  1. /var/svn/repo1
  2. /var/svn/repo2

And so URLs would be:


Requirement To access PackageA of Project1 of repo1 using URL:

Probable Solution

-<Location /var/svn/>
+<Location />
     DAV svn
    -SVNParentPath /var/svn
    +SVNPath /var/svn/repo1
    -SVNListParentPath on
     AuthType Basic
     AuthName "Subversion Repository"
     AuthUserFile /var/svn/svn-auth-file
     Require valid-user    

And, restart httpd.

share|improve this answer

Your Answer


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.