Premature end of script headers: wredirect.cgi
If you are getting Internal Server Error while doing /webmail /whm /cpanel , please check the apache error log.
For us it was like the below error
[Tue Oct 08 08:14:44 2013][error][client x.x.x.x] Premature end of script headers: wredirect.cgi [Tue Oct 08 08:14:44 2013][error][client x.x.x.x] File does not exist: /home/user/public_html/500.shtml
A temporary fix is to disable Suexec from WHM from the drop down at Home »Service Configuration »Configure PHP and suEXEC and save. But in this case you are compromising the security.
This is actually a known bug and if you are using cagefs then please do the below steps to fix this permanently
cagefsctl --remount-all service proxyexecd restart
Once the above steps are executed, then please re-enable Suexec (if you had disabled this earlier) and check the links with /webmail, /whm, /cpanel etc and should be working.
If you are not using CageFs, then it should be some thing with permissions of the corresponding cgi scripts or check for missing ScriptAlias entries for /whm /webmail and /cpanel in httpd.conf
Hope this helps you 🙂