WordPress with clean urls on Lighttpd
Place it after server.document-root, either in the main section or in your virtual host sub-sections...
server.error-handler-404 = "/index.php?error=404"
and use this as your clean urls template
/%year%/%monthnum%/%day%/%postname%/