juretta.com

Capistrano: Hide SVN Files

July 07, 2006
Tags: Capistrano Rails
Do you use Capistrano to deploy your Rails app?

Capistrano uses subversion to deploy rails applications. Unfortunately this means that the hidden subversion directories (usually .svn) are accessible via HTTP. To prevent the exposure of .svn files or directories you are strongly encouraged to add the following lines to your server configuration:

Apache:
# Don't expose .svn files/directories    
<DirectoryMatch "^/.*/\.svn/">
    Order deny,allow
    Deny from all
</DirectoryMatch>

 

Using a (mod_rewrite) rewrite rule:
RewriteRule \.svn/.*   -   [F]   

 

Lighttpd:
$HTTP["url"] =~ "/\.svn/" {
    url.access-deny = ( "" )
}

blog comments powered by Disqus

About

juretta.com is the personal workspace of Stefan Saasen. More about this site can be found in the „About“ section.

Share!

Latest links  RSS  

More...