Most DDOS protection is unprotectable at the software level. Massive DDOS protections are unprotecable by software or hardware. If it was just a regular DOS attack you could probably minimize the damage with stuff like apf firewall or mod_deflate.
I use for my apache server
http://www.configserver.com/cp/csf.html Also I use
www.litespeed.com that helps with DOS. Litepseed also speeds up my server way way way way faster than apache.
If you ever get DDOS just have your host null route for a few hours, but that's only if it's extremely severe. If not, you can block the IP with iptables or the CSF firewall. It has a nice UI for WHM.