If your apache web server had ever DDOS attacked then you probably heard about ModSecurity, Mod_Evasive and Fail2Ban. Those are well known protection modules for apache but for my experiences they are not very good for DDOS protection.
ModSecurity is too complicated and not well suit for DDOS protection, ModEvasive can be easily fooled by attacker and Fail2Ban is not specialised for DDOS but general protection.
After I tried to use those modules and failed to protect my server then I decided to create my own module which I named it RedAlert.
You can try it from my github account