Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    24

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

    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.

  2. #2
    Member
    Join Date
    Nov 2004
    Posts
    24

    Default

    Any cpanel admins able to help or point me towards something?

  3. #3
    Member
    Join Date
    Dec 2001
    Posts
    1,558

    Default

    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 ?
    Beau Henderson

  4. #4
    Member
    Join Date
    Sep 2004
    Posts
    529

    Default

    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

  5. #5
    Member
    Join Date
    Nov 2004
    Posts
    24

    Default

    Quote Originally Posted by dezignguy
    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.

  6. #6
    Member
    Join Date
    Nov 2004
    Posts
    24

    Default

    Quote Originally Posted by haze
    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?

  7. #7
    Member
    Join Date
    Sep 2004
    Posts
    529

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Replies: 0
    Last Post: 02-18-2010, 08:29 PM
  2. Replies: 2
    Last Post: 07-21-2008, 10:04 AM
  3. cgi not working Premature end of script headers
    By NoAgendas in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 10-14-2006, 09:08 PM
  4. Issue with CGI scripts: Premature end of script headers
    By Siroro in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-09-2006, 08:08 AM
  5. Permanture end of script: /usr/local/cpanel/cgi-sys/redirect.cgi
    By esupport.org.ua in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-08-2005, 12:22 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube