Tunelling SVN & mod_proxy

Mr Gray and I have recently been working on a project where the subversion repos is IP restricted, and we’ve been tunelling over to a machine that is in the IP allow list to get access. Because the repository is accessed via WebDAV, it either means putting our local web servers on another port than 80, or putting the tunnel on another port, which causes some issues with svn externals.

Mr G came up with a much better solution though, enable mod_proxy in apache, and setup a local vhost like:

<VirtualHost *:80>
ServerName tunnelled.repos.server.com

ProxyPass /svn/ http://tunnelled.repos.server.com:<tunnel port>/svn/
<Location /svn/ >
ProxyPassReverse /svn/
<Limit OPTIONS PROPFIND GET REPORT MKACTIVITY PROPPATCH PUT CHECKOUT MKCOL MOVE COPY DELETE LOCK UNLOCK MERGE>
Order Deny,Allow
Allow from all
Satisfy Any
</Limit>
</Location>
</VirtualHost>

Leave a Reply