Results 1 to 5 of 5

Thread: Redirecting https://domain:2083 to https://host:2083

  1. #1
    Registered Member
    Join Date
    May 2003
    Posts
    625

    Default Redirecting https://domain:2083 to https://host:2083

    Hi,

    I have a newbee question.

    How do I get https://domain:2083 redirected to https://host:2083 so the user won't get a warning about name mismatch for the SSL certificate. Assuming there is an SSL certificate installed for the server's hostname. This is when a user types in http://domain.com/securecontrolpanel.


    The related file: /usr/local/cpanel/cgi-sys/sredirect.cgi looks like this:
    #!/usr/bin/perl -T

    open(CPCONF,"/var/cpanel/cpanel.config");
    while(<CPCONF>) {
    if (/^port=(\d+)/) {
    $port = $1;
    }
    }
    close(CPCONF);
    if ($port eq "") { $port = '2082'; }
    $port++;

    if ($ENV{'HTTP_HOST'} ne "") {
    print "Location: https://$ENV{'HTTP_HOST'}:${port}\n\n";
    exit;
    }

    print "Location: https://$ENV{'REMOTE_ADDR'}:${port}\n\n";
    I've tried to put the hostname instead of $ENV{'HTTP_HOST'}, but that didn't work.

    Is there a solution to this?

  2. #2
    OCX
    OCX is offline
    Registered Member
    Join Date
    Sep 2003
    Posts
    245

    Default

    what ive done to match the ssl/cpanel login..

    i made my hostname be (in WHM intital setup)
    secure.mydomainname.com

    i gave secure.mydomainname.com an IP #

    i created a self signed cert for secure.mysitename.com

    restarted apache and walla my clients login to there cpanel from
    https://secure.mysitename.com:2083

    rather then having 3 ! Yellow warning flags it shows 1 flag and 2 green flags

    to get it NOT to every show up the warning prompt you ll have to purchase a real SSL Cert
    not a self signed created cert..

    you can get a chainedSSL cert for about 20$ from ev1servers.net
    and just do the above settings for the real cert

    just dont create a subdomain with secure.mysite.com its not needed


    hope this helps


    OCX

  3. #3
    Registered Member
    Join Date
    May 2003
    Posts
    625

    Default

    Quote Originally Posted by OCX
    to get it NOT to every show up the warning prompt you ll have to purchase a real SSL Cert, not a self signed created cert.
    You see, the cert is not self signed. It's a Comodo cert and it works fine (no warnings) as

    https://secure.mysitename.com:2083/

    What I wanted to know is, how to get into Cpanel with

    https://userdomain.com:2083/

    without any warning popup.


    Quote Originally Posted by OCX
    restarted apache and walla my clients login to there cpanel from
    https://secure.mysitename.com:2083
    btw, how do you get your users to login with the hostname? Do you tell them the URL or do you redirect them?

  4. #4
    OCX
    OCX is offline
    Registered Member
    Join Date
    Sep 2003
    Posts
    245

    Default

    i let them know


    the only way i know of to not get a warning for
    https://domain.com:2083
    is to give every client an IP and Cert..lol..pointless really..


    thats why i only use one way of logging in.they all use it.
    and easyer to track whos loggin in too

  5. #5
    Registered Member
    Join Date
    May 2003
    Location
    sillycone valley
    Posts
    49

    Default user ssl for port 2083

    there is another way - with the cert you have now you can use https://secure.mysitename.com/~user:2083 and that won't get warnings or you can get a better cert for server wide inquires I think the call them wildcard certs or they have some other names for them. I think they start around 300.00 and you can supposedly use them on a single box, some are limmitted to a number of servers. DO some homework though cause the price is quite different and if you mess up on the start it will cost you a great deal of time and money - or get someone to help you with it.
    Last edited by concreteman; 07-27-2004 at 12:15 AM. Reason: clarification
    because the mind is a terible thing...

Similar Threads

  1. /cpanel always redirecting to :2083 even when the port is closed
    By lauer in forum cPanel & WHM Discussions
    Replies: 10
    Last Post: 05-12-2011, 11:29 AM
  2. domain:2083 get redirected to hostname:2083
    By CrumX in forum New User Questions
    Replies: 2
    Last Post: 11-20-2009, 11:38 PM
  3. domain redirecting users to https
    By almecho in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 08-20-2008, 04:51 AM
  4. SSL on https://domain.com vs https://www.domain.com
    By sbogde in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 10-02-2007, 03:22 AM
  5. Auto redirect :2082 to https :2083 is it possible?
    By hostultra in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 08-22-2003, 11:24 AM
bargain