I have a fossil project and want to host it in a server of mine. I'm using lighttpd to serve the git interface for some other projects so using apache or nginx is out of the question.

I have followed the -rather simple- instructions and given read, write and execute permissions to www-data in both the cgi-script and the repository.

The relevant part of my lighttpd.conf looks like this:

$HTTP["host"] =~ "^fossil-project.my-server.com$" {
server.groupname           = "www-data"
server.username            = "www-data"
cgi.assign = (
   ".cgi" => "/usr/bin/fossil"
alias.url += (
  "/" => "/usr/lib/cgi-bin/fossilweb.cgi"

Going to my project in a web browser confirms that the cgi script works well, as it is redirecting from / to /index, the default landing page for the fossil web interface, but, instead of showing the project page (which also works, as confirmed by running fossil ui fossil-project.fossil) it spits out a 404!

I guess I'm missing something in the host configuration in the lighttpd.conf that tells it that all urls under / in that subdomain should be handled by fossil instead of by lighttpd, but I don't know how to do that

Any pointers?


I think that you have two choices:

  1. Use fossil server and then proxy the requests from lighttpd to fossil via mod_proxy

  2. Use fossil's built in CGI see http://www.fossil-scm.org/index.html/wiki?name=Cookbook#CGI.

You might get some hints from mercurial's and/or trac's way of setting things up.

  • Thanks man! I ended up using xinetd for serving up the repo and using mod_proxy like you suggested for redirecting requests from my subdomain to the port where xinetd is listening; worked like a charm :) – lfborjas Mar 26 '11 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.