The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trouble with SSL and hostname

Discussion in 'General Discussion' started by lmaitland, Aug 18, 2013.

  1. lmaitland

    lmaitland Member

    Joined:
    Aug 17, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello everyone :),

    I have an issue that im not to sure about.
    After migrating to a VPC and installing cpanel i had originally set my servers host name as my domain name then changed it to the sub domain server.domain.com. I tried setting the SSL redirect to the hostnome via tweak settings - > redirection except this doesnt seem to be working.

    My reason for this is that i have an SSL certificate for the domain server.domain.com and id like all my users to have a valid certificate when logging in so theres no nasty certifcate errors.

    The certificate works when when viewing server.domain.com:2087 , but does not however work when navigating to domain.com/whm ( for the record domain.com is an account on my server ).

    The redirection works for /cpanel though?

    Thank you,
    Lewis
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Yes, it won't work with domain names. But it should get redirected to servers hostname when you use :2087 port with domain name and maintain secured connections.
     
  3. GIANT_CRAB

    GIANT_CRAB Well-Known Member

    Joined:
    Mar 23, 2012
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Turn on "Always redirect to SSL" under tweak settings.
    Set SSL redirect destination to "SSL Certificate Name".

    Then it will always redirect you to SSL even if you're not on the SSL port.

    >The certificate works when when viewing server.domain.com:2087 , but does not however work when navigating to domain.com/whm ( for the record domain.com is an account on my server ).

    Yes, that's how SSL works.
    Your SSL cert is registered on your server hostname so it is only valid when you visit it from your server's hostname.
     
  4. lmaitland

    lmaitland Member

    Joined:
    Aug 17, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yes the redirect works for for my user accounts and also my web mail etc for all user accounts.
    Its only one redirect that doesnt work and its when im accessing domain.com/whm.
    The /whm redirect works when doing it on user account domains?

    It just seems to be this one domain it doesnt work for.
     
  5. GIANT_CRAB

    GIANT_CRAB Well-Known Member

    Joined:
    Mar 23, 2012
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Yes, it will not redirect to SSL via /whm redirect.
    This is because that user account doesn't have its own private SSL.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Are you accessing the /whm and /cpanel redirects with a secure URL from the start, or are you accessing those URLs with a non-secure URL and waiting for the redirect to the secure ports? Note that you may want to try rebuilding the Apache configuration file via:

    Code:
    /scripts/rebuildhttpdconf
    Also, try clearing your browser cache to rule that out as the cause of this problem.

    Thank you.
     
  7. lmaitland

    lmaitland Member

    Joined:
    Aug 17, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for all the replies.

    Im accessing via an unsecured http port 80 url.

    As an example. I navigate to www.bytenet.co.uk -> then add /whm -> redirects to the secure :2087 port but throws the ssl certificate error 'certificate domain does not match current domain'.

    However when navigating to www.bytenet.co.uk -> then adding /cpanel -> it redirects me to server.bytenet.co.uk:2087 ( the domain i have the certificate for ).

    I have tried rebuilding my apache config file still no luck.

    It should be added that when navigating to my users accounts then /whm it will redirect to my hostname with the correct certificate.

    I have also tried from other computers but the issue persists.

    Thank you for your help
     
  8. GIANT_CRAB

    GIANT_CRAB Well-Known Member

    Joined:
    Mar 23, 2012
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Type in https://www.bytenet.co.uk/whm

    And it will redirect you to https://server.bytenet.co.uk:2087

    No, that should not be happening.
    It should be redirecting you to port 2083.

    Type in https://www.bytenet.co.uk/cpanel

    And it will redirect you to https://server.bytenet.co.uk:2083
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It sounds like there is a browser cache issue here. Have you tried with a different web browser? The URLs you provided both correctly redirect me to a valid SSL certificate that is signed.

    Thank you.
     
  10. lmaitland

    lmaitland Member

    Joined:
    Aug 17, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yeh sorry this did turn out to be a cache issue.

    Thanks for your time and support.:)
     
Loading...

Share This Page