darcsweb+lighttpd on Debian
I couldn’t find any information on how to set up darcsweb on lighttpd in general. I was a little disappointed to see that the darcsweb package on Debian only comes with apache and apache2 configurations, nothing for lighttpd. Since Debian is a little special sometimes when it comes to web servers—they like to add convenient configuration “frameworks”—I was afraid that using a “non-supported web server” might be a lot of work. How wrong I was
First enable the CGI module for lighttpd:
# cd /etc/lightttpd/conf-enabled
# ln -s ../conf-evailable/10-cgi.conf
Then create a very short configuration file to enable darcsweb to find its images:
# cd
# echo 'alias.url += ( "/darcsweb/" => "/usr/share/darcsweb/" )' > \
/etc/lighttpd/conf-available/50-darcsweb.conf
Then enable that “module” as well:
# cd /etc/lightttpd/conf-enabled
# ln -s ../conf-evailable/50-darcsweb.conf
Create your darcs repositories in /var/www/darcs/. I created a repo I called test.
The Debian default configuration of darcsweb will expose all repositories in /var/www/darcs/. This is quite probably not what I wanted so I commented out the auto class and added the following:
class test:
reponame = 'test'
repodesc = 'Silly little test repo'
repodir = '/var/www/darcs/test'
repourl = 'http://denobula/darcs/test/'
repoencoding = 'latin1'
That’s it!
![[Digg]](http://therning.org/magnus/wp-content/plugins/bookmarkify/digg.png)
![[Reddit]](http://therning.org/magnus/wp-content/plugins/bookmarkify/reddit.png)
Preben:
Hi
Just wondered why you don’t use fastcgi in stead of cgi?
Preben
31 January 2007, 10:27 pmadam:
did you have no issue with doing python cgi in lighttpd? thats where im stuck
6 February 2007, 3:11 amMagnus:
Preben,
AFAIU fastcgi requires support by darcsweb, right? At the moment it’s written as a regular CGI script so cgi seems to be the only option.
6 February 2007, 11:59 amMagnus:
Adam,
No issue at all for me. The configuration provided with lighttp on Debian works like a charm.
6 February 2007, 1:41 pmMagnus:
Preben,
Another comment on the issue of using FastCGI. AFAIU FastCGI offers most of its speed-up by removing the need to create a new process everytime a page is accessed. This pays off very quickly when using interpreted languages to implement your dynamic site.
Darcsweb is written in Python, but it relies heavily on darcs itself to deal with your repo. That means the potenital for speed-up is rather reduced.
6 March 2007, 9:26 amPreben:
Hi again
I’m trying to setup my lighttpd like you have done above, but I cannot manage to get the style.css and logos loaded. The darcsweb looks just boring old text.
Any ideas what is the problem?
Thanks in advance
Preben
5 September 2007, 10:16 pmMagnus:
Preben, my guess is that your configuration doesn’t have
7 September 2007, 7:10 am/darcsweb/pointing to the place where the images and CSS are. The recipe above worked on a Debian system when I wrote it. It’s likely that locations of files differ between distributions. They might even have changed on Debian, I wouldn’t know since I no longer run a system with darcsweb+lighttpd on it.Preben:
Got it
I had to write:
$HTTP["remoteip"] == "127.0.0.1" { alias.url += ("/darcsweb/" => "/usr/share/darcsweb/") $HTTP["url"] =~ "^/darcsweb/" { dir-listing.activate = "disable" } }to get the alias to work. It didn’t work with only the alias.url line. I guess you can skip the $HTTP["url"] line though.
8 September 2007, 7:40 amJohan:
For really thick people like me:
After you’re done:
sudo /etc/init.d/lighttpd force-reload
Point your web browser to:
8 February 2008, 11:10 amhttp://www.yourdomain.com/cgi-bin/darcsweb.cgi