How to set retraction on uploading file type or extensions?

view full story

http://forums.cpanel.net – Hi, I want to limit only files with approved extensions such as ".gif", ".jpeg", ".doc", etc. are allowed to be uploaded to the web server. This is vitally important for my server's security, since the web server might attempt to execute or specially process files with extensions like ".php", ".cgi", etc. Anybody can advice how and where can I set / configure to set restriction to upload file according to below Logic: # Deny All File extension # Except : .gif , .jpg , .pdf , .png. Any help is highly appreciated. (HowTos)