So if anyone tries to setup lighttpd, you need the following lines added to the lighttpd.conf file:
url.rewrite-if-not-file = (
"^/emoncms/([^?]*)$" => "/emoncms/index.php?q=$1",
"^/emoncms/([^?]*)\?(.*)$" => "/emoncms/index.php?q=$1&$2"
)
Relates to this thread.