0x0e.org | pentesting perspective

braindump on pentesting, QA, metasploit, constant learning

10 min project hosting & sharing

with one comment

Need a simple way to backup (and share) local files & scripts? Yeah yeah, another svn/websvn howto – but my brain sucks, and i forget this stuff if i don’t write it down…

The only prereqs to this quick howto are that you have an ubuntu box and you know a thing or two about subversion. Preferably a shellhost – I use slicehost and i’ve heard great things about linode.com.

I use svn for many of my projects, and for my toolkit. Tonight i needed to quickly and securely share a few files from that toolkit, so i stuck websvn on a host, and configured htaccess authentication. Total time? 10 min. Here’s the setup.

(Yes, i know the cool kids are all on git now)

  • Create subversion repository in /var/svn
cd /var/svn
svnadmin create repository
  • install apache / websvn (apt-get install)
$apt-get install apache2 websvn
  • Configure websvn – this is handled with the debian package, so when you’re done, your config (/etc/websvn/svn_deb_conf.inc) should look like this
// please edit /etc/websvn/config.php
// or use dpkg-reconfigure websvn
$config->addRepository("repository", "file:///var/svn/repository");
  • Create htpasswd file
$htpasswd -c -s /var/svn/htaccess testuser
  • Configure htpasswd in apache config (/etc/websvn/apache.conf)
# Configuration for websvn using php4.
Alias /websvn /usr/share/websvn
<Directory /usr/share/websvn>
DirectoryIndex index.php
Options FollowSymLinks
Order allow,deny
Allow from all
AuthType Basic
AuthName "Subversion Repository"
Require valid-user
AuthUserFile /var/svn/htaccess
<IfModule mod_php4.c>
php_flag magic_quotes_gpc Off
php_flag track_vars On
  • Restart Apache and you’re done.
$/etc/init.d/apache2 restart

Written by jcran

July 13, 2010 at 6:01 AM

Posted in howto, utility

One Response

Subscribe to comments with RSS.

  1. thank you admin for informaion

    endüstriyel mutfak

    August 4, 2010 at 12:27 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: