How to protect Lighttpd from DOS attacks and flooding? [duplicate]

Solution 1:

Lighttpd supports overall and per-connection throttling. Alternatively, you can limit bandwidth by IP adddress but that must be done in the firewall.

Go to http://www.cyberciti.biz/tips/lighttpd-set-throughput-connections-per-ip.html for an excellent, detailed HOWTO.

Solution 2:

iptables and --connlimit