• About

lighttd webserver

December 27th, 2006

I just installed my first lighttpd server, and it works fine. Now I'd like to set it up to compress output (gzip), and include appropriate cache headers (expires, last modified, and revalidate).

Magnificient, that was easy. Just edited the conf file:

nano /etc/lighttpd/lighttpd.conf

uncomment this:


and this:



compress.cache-dir          = "/var/tmp/lighttpd/cache/compress/"
compress.filetype           = ("text/plain", "text/html")

then create the cache directory and give www-data ownership:

mkdir /var/tmp/lighttpd/cache/compress/
chown -R www-data /var/tmp/lighttpd

That rocks that the compression is cached, saves a good amount of processing power I'm sure. I actually implemented something similar for the Wordpress cache plugin I made, which uses PEAR's Cache_Lite.

Yearly Indexes: 2010 2003 2005 2006 2007 2008 2009 2004 2011 2012 2013 2015 2019 2020