Checking configuration file:
$ lighttpd -t -f /etc/lighttpd/lighttpd.conf
To enable logging add to config:
accesslog.filename = "/var/log/lighttpd/access.log" server.errorlog = "/var/log/lighttpd/error.log" debug.log-response-header = "enable" debug.log-request-handling = "enable"
To debug CGI (see stderr from CGI script):
server.breakagelog = "/var/log/lighttpd/cgi.log"