Premature end of script headers: /usr/local/cpanel/cgi-sys/whmredirect.cgi

yeohbaby

Member
Nov 25, 2004
24
0
151
The redirect to whm doesn't seem to be working properly.

We have an ssl site set up, so if you specify https://somesite.com:2087, it works.

If you specify http://somesite.com/whm, it works.

However, if you specify https://somesite.com/whm it fails with a 500 Internal server error. The error log shows the following message:
Premature end of script headers: /usr/local/cpanel/cgi-sys/whmredirect.cgi

We set whm to require an ssl connection for cpanel/whm.

How do we get this last method to work also?

Thanks.
 

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
Ok, here's the problem. The certificate is for the domain on that port ( thats how its been installed ). When you call using /whm its using apache to pass the user onto WHM. Since the cert is installed for WHM and apache, it doesn't see the cert as existing. There may be a way around this but i'm not sure, you may need 2 certs, one for the domain on regular apache and 1 for whm or you may be able to use the cert on both ( I haven't tried, so i can't confirm ).

Just out of curiosity, was there any reason in perticular you purchased an SSL cert for WHM ? Was it just to get rid of the popup message ?
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
Well, all three of your methods work for me on my server...

But I have the WHM Tweak Settings | "When visiting /cpanel or /whm or /webmail with ssl redirect to the servers hostname" checked and on. I think that might be what does it.

Using 9.9.9-STABLE_15
 

yeohbaby

Member
Nov 25, 2004
24
0
151
dezignguy said:
Well, all three of your methods work for me on my server...

But I have the WHM Tweak Settings | "When visiting /cpanel or /whm or /webmail with ssl redirect to the servers hostname" checked and on. I think that might be what does it.

Using 9.9.9-STABLE_15
I have this turned on also. With this on, the http request is properly redirected to the secure site. The https request is the one that fails.
 

yeohbaby

Member
Nov 25, 2004
24
0
151
haze said:
Ok, here's the problem. The certificate is for the domain on that port ( thats how its been installed ). When you call using /whm its using apache to pass the user onto WHM. Since the cert is installed for WHM and apache, it doesn't see the cert as existing. There may be a way around this but i'm not sure, you may need 2 certs, one for the domain on regular apache and 1 for whm or you may be able to use the cert on both ( I haven't tried, so i can't confirm ).

Just out of curiosity, was there any reason in perticular you purchased an SSL cert for WHM ? Was it just to get rid of the popup message ?
I believe that WHM has it's own cert to provide the ssl connection, which is currently different from the one we installed into Apache.

We bought a cert for our site to provide secure connections for users to do their own transactions and submit payment to us online.

Is it just a problem of 2 different certs and I just have to install our cert into whm also?
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
Hmm, well if you installed your cert manually, I suppose that could be it... I installed my cert through WHM, so it's the cert that WHM/Cpanel uses for all its secure operations.