Skip to content

lighttpd

Configure Lighttpd for gitweb on FreeBSD

I spent some time this afternoon setting up a public git repository for my project, Origami. I had a little bit of trouble getting the repository set up initially, particularly the cgi aspect of it all. Below outlines the steps I took to configure Lighttpd for gitweb, hosted on FreeBSD. Installation First, of course, I installed the git port: portmaster devel/git I made sure to select the gitweb option, which is de-activated by default. The other options are up to you. Configuration Second, I configured Lighttpd in the simplest manner I could find. This solution uses the existing gitweb files in-place. This is contrary to what the pkg-message prescribes, but I like this idea because it’ll ensure that upgrades are handled automatically. I don’t plan to run any additional repositories either, so using the one central set of files is preferable in my situation. This is my configuration: Read more

Lighttpd on FreeBSD : Hard Lock on Upload?

I’ve recently migrated my server(s) to a new VPS, one which offers BSD as a hosting option. I have long been a fan of FreeBSD on my servers, so this was a deal I couldn’t pass up. I did, however, run into one fairly difficult problem based on my combination of FreeBSD and lighttpd web server. I felt it was important to blog about it so that “teh internets” could share the wisdom and, hopefully, others could solve this same issue quickly. Problem The web server seemed to work great. It was handling traffic efficiently. Logs were going where they were expected. Rewrites were working. All the main things that I would expect to test were working just fine. And then I uploaded a file. Hard lock. Panic. Do not pass go. Do not collect $200. This was bad. I was even able to reproduce it. Anytime I would upload a file to the server (in my case via WordPress upload form), the server would hard-lock and I’d have to manually bring it back up. Read more

Require Authentication For Multiple Directories in Lighttpd

I have a domain that I use to hold my notes, personal wiki, html versions of books and magazines, and other assorted resources. Much of this I want to remain private so I’ve implemented Lighttpd access restrictions at the root of those directories. I had a little bit of trouble this evening adding additional directories to my restriction list, so I thought I would make a note of it here. Hopefully it’ll help anyone else running into similar trouble. <br /> $HTTP["host"] =~ "domain.tld" {<br /> auth.require = (<br /> "/secret/" => (<br /> "method" => "basic",<br /> "realm" => "Password Protected Area",<br /> "require" => "valid-user",<br /> ),<br /> "/private/" => (<br /> "method" => "basic",<br /> "realm" => "Password Protected Area",<br /> "require" => "valid-user",<br /> )<br /> )<br /> } The cause of my problem was the missing comma between the directory names. If you’re going to limit access to multiple directories in a list like this it needs to be a comma separated list. Read more