Fixing SSL Error -12263 in CPanel / WHM
Over the last 12 months I have found that one single SSL-based host on my CPanel / WHM server occasionally drops back and starts generating “[hostname] has sent incorrect or unexpected message. Error Code: -12263″ alerts when trying to load a secure page in a browser, in this case FireFox.
A quick search of Google and the CPanel forums yields precious little. In the past I have fund that “reinstalling” the certificate under the “Install a SSL Certificate and Setup the Domain” link in WHM fixes the problem, but what exactly causes the problem I am not quite sure. The idea of it being caused by a rewrite of the httpd.conf file seems plausible but unlikely if this happens many times a day and the host goes for months without breaking.
Suggestions in the CPanel forums include the modification of the virtual host in the httpd.conf file to include <IfDefine SSL> but can imagien this will be deleted next time CPanel regenerates the file itself. Other tips include the changing of the sites IP address in WHM, fixing issues with .pem file generation in CPanel, switching on mod_usedir in “Tweak Settings”, but again these achieved no results at this end.
All I can tell from this end is that it seems to pertain to a mix up between a secure host that is on a subdomain and the main sites domain, for example, www.domain.com versus secure.domain.com. If you set up the subdomain in CPanel this fixes the problem, but then you either have to transfer your files there, which isn’t exactly convenient, or you have to use a symbolic link which will only cause recursion problems.
In short, the best fix I have found, involves simply using the www.domain.com as a secured URL rather than a subdomain and should you need to make the switch that it would be worth redirecting with a 301 redirect in the .htaccess, so that site visitors don’t get confused or lost in the scrum.
