During the course of this project, I've had to get very good at hosting fossil repositories.
My current setup is built around lighttpd running under Debian (or Ubuntu.)
Installing lighttpd is easy:
apt-get lighttpd
The tricky part is generating a custom URL and CGI handler for each project. Which, owing to the extensible nature of lighttpd, is not really that tricky. lighttpd allows you to farm out swaths of your webserver's configuration to scripts. The twist is that your script needs to output the configuration you desire to stdout (much the same way as you would to generate CGI.)
The code is posted on this site to here.
The main files that are interesting are: