1

We currently have a subversion server at svn.company.com for internal (and occasionally external) use. Currently, the repositories are located at /svn/[project] via SVNParentPath. However, management wants to make them also available at just /[project]. I was able to get it seemingly working with some mod_rewrite directives:

#Don't redirect (internally, note the PT (passthrough)) any trac or admin pages RewriteCond %{REQUEST_URI} !^/trac.*$ RewriteCond %{REQUEST_URI} !^/admin.*$ RewriteCond %{REQUEST_URI} !^/svn.*$ RewriteRule ^/(.*)$ /svn/$1 [PT,NS,QSA] 

This seems to work, but fails when checking out or performing any other actual SVN operations. My theory is that DAV reports its URL as /svn/[project], and the client aborts when this doesn't match its requested url of /[project].

How would you solve this?

2
  • Let me guess; a 301 in response to the PROPFIND? Commented May 27, 2011 at 18:23
  • Actually, no. A 500 in response to REPORT. The server complains "Unusable URI: it does not refer to this repository" when the client sends the XML entitty S:src-path as "svn.company.com/[project]/trunk" in the REPORT request. Ironically, the client is sending the to the svn.company.com/svn/[project]/!svn/vcc/default URI, so its all kind of confused! I think this problem is unsolvable without a more intelligent DAV implementation or a proxy application that can modify the requests themselves. Commented May 30, 2011 at 17:48

1 Answer 1

0

Could you not just use both things?

<Location "/"> ....setup for management SVNParentPath /path/to/repos </Location> <Location "/svn"> ...stuff for /svn/project SVNParentPath /path/to/repos </Location> 
3
  • I don't believe so, because DAV svn at Location "/" will gobble all requests. Commented May 27, 2011 at 19:24
  • Believeing is not knowing, have you even tried? Commented May 29, 2011 at 1:49
  • I did. With <Location />, no other location directives are processed. Sorry. Commented May 30, 2011 at 17:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.