Recently I tryied to setup a development server at home. It’s pretty easy to install the subversion server since there are so many great tutorials online. I don’t want to use HTTP protocol to remote access my code repository because I always like svn+ssh better. But I do want a web interface to browse my repositories and compare the difference between reversions. So ViewVC becomes my nature choice. To be more specific, I want to be able to access the source tree from my home network freely; if from outside network, I want some basic security so that my code is not share with the whole world for free.
It’s not that hard either. But I did spend some time to figure out the security stuff. After all, I am not a system engineer.
Anyway, after it is done, I restarted the Apache server, and everything worked beautifully. Actually for me there are only two files you need to modify, one is the /etc/apache2/conf.d/viewvc.conf, the other is the viewvc.conf at ViewVC’s home directory. Here is the Apache configuration file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
ScriptAlias /viewvc /home/svn/viewvc-1.0.6/bin/cgi/viewvc.cgi ScriptAlias /query /home/svn/viewvc-1.0.6/bin/cgi/query.cgi AuthUserFile /home/svn/viewvc-1.0.6/viewvc_passwd AuthName "coffeestone:viewvc" AuthType Basic Require valid-user Order allow,deny Allow from 127.0.0 Allow from 192.168.2 Satisfy Any AuthUserFile /home/svn/viewvc-1.0.6/viewvc_passwd AuthName "coffeestone:viewvc" AuthType Basic Require valid-user Order allow,deny Allow from 127.0.0 Allow from 192.168.2 Satisfy Any |
As you can see, I installed ViewVC at directory “/home/svn/viewvc-1.0.6″, and use command “htpasswd2″ to create a password file “viewvc_passwd” in that directory. Another file changed is viewvc.conf at ViewVC’s home directory. I only post changed variables as following:
1 2 3 4 5 6 |
svn_roots = coffeestone : /home/svn/repos/ default_root = coffeestone root_as_url_component = 0 use_rcsparse = 0 use_enscript = 1 enscript_path = /usr/bin/ |
Well, it is that simple. Now I can enjoy my home development server!

