There is nothing you can do on the server to protect against a DDoS attack. Once the traffic reaches your server, it's too late already....
You need some kind of upstream network filtering to really protect against attacks, and such things are extremely expensive.