Developers using subversion as version control system might have encountered that it is possible to browse through the .svn directories in their checked out repositories. Of course this can cause some security related problems as sources can be spied out. This little apache configuration allows restricting this behaviour.

<p>Developers using subversion as version control system might have encountered that it is possible to browse through the .svn directories in their checked out repositories. Of course this can cause some security related problems as sources can be spied out. This little apache configuration allows restricting this behaviour.</p>
 
<code class="prettyprint">
&lt;directorymatch \.svn&gt;
    Order allow,deny
    Deny from all
&lt;/directorymatch&gt;
</code>
 
It is also possible to put the following statement to a .htaccess file to have a similar effect.
 
<code class="prettyprint">
RewriteEngine on
RewriteRule .*\.svn.* http://%{SERVER_NAME}/
</code>

Bookmark this!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • Digg
  • Fark
  • Furl
  • MisterWong
  • NewsVine
  • Reddit
  • Spurl
  • StumbleUpon
  • TailRank
  • Technorati

Submit your comment

vision22.net

Copyright © 2007