Tuesday, December 15, 2009

Home SVN Server - Authentication with mod_dav_svn


Since nowadays broadband is everywhere, why not installing your own svn server? Unlimited size, private data and ultra-fast access when you’re working locally are some of the advantages.

This tiny overview is not going under much detail about installing the system, instead it reminds you (and myself) some post-installation steps you should not forget in order everything to work smoothly, namely access via apache server (mod_dav_svn).

First: Install the svn package (in ubuntu the package “subversion” comes already with repository administration commands)

Second: Install the libapache2-svn package with apt-get.

Third: Config mod_dav_svn. Go to /etc/apache2/mods-available and find dav_svn.load. Check inside if both apache modules are being loaded (i.e. both lines are uncommented).

Then open dav_svn.conf and you have to configure certain parameters, like the hard disk location where your svn repository will actually reside. Luckily this file is already well documented, but the common settings are as follow:

<Location /svn> –> Tells apache the url it should reserve for SVN. In this case http://your_server/svn will point to our repository, which you use with your svn client.

SVNParentPath /var/svn –> Tells Apache/mod_dav where all svn repositories reside.

Create the repository location and give it permissions.
(remember, when you commit apache will WRITE information for you, so it must have permission to do so)
> mkdir /var/svn
> chown www-data /var/svn –R

No go and create your first repo!
>svnadmin create /var/svn/

The following steps are needed if you want apache to require authentication when users try to commit and or read.

Back to dav_svn.conf

First tell apache “Hey! I want some authentication, and I’ll store users information on … (the file path)”:
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd

This will require authentication for every access. If you want to make it public readable add this trick:

<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>

Now just create your first user:
> htpasswd -c /etc/apache2/dav_svn.passwd your_first_svn_user

To add more users you just skip the –c (create) parameter.

Monday, December 7, 2009

Public DNS server from google

Google seems to be broadening their service provisioning with the introduction of a “Public DNS service”.

If it’s true DNS plays an essential role in the internet, it’s also true it introduces already a significant overhead. Google considers the service can be improved and therefore launches its approach, which they claim it’s faster, more secure and needs no redirection (less resolving jumps).
Details on performance are available at the google page: http://code.google.com/speed/public-dns/docs/performance.html

I’m temped to give it a try. Free, simple to try (and remember). Just point your dns server addresses to 8.8.8.8 and 8.8.4.4. Feedback is encouraged! :)

Public page: http://code.google.com/speed/public-dns/