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?

link|improve this question
Let me guess; a 301 in response to the PROPFIND? – Shane Madden May 27 '11 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. – Mark May 30 '11 at 17:48
feedback

1 Answer

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>
link|improve this answer
I don't believe so, because DAV svn at Location "/" will gobble all requests. – Mark May 27 '11 at 19:24
Believeing is not knowing, have you even tried? – evildead May 29 '11 at 1:49
I did. With <Location />, no other location directives are processed. Sorry. – Mark May 30 '11 at 17:22
feedback

Your Answer

 
or
required, but never shown

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