Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Server hostname is resolving to a customers site when using HTTPS

Discussion in 'Bind/DNS/Nameserver' started by mikefromnz, Feb 19, 2017.

  1. mikefromnz

    mikefromnz Active Member

    Joined:
    Feb 9, 2017
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New Zealand
    cPanel Access Level:
    Root Administrator
    Got a strange issue going on with my server. The hostname for example sake is server.example.com

    When I use a web browser, and navigate to http:// server.example.com I get the default page "defaultwebpage.cgi" which is perfect

    If I then use HTTPS:// server.example.com I see the contents of one of my customers pages (a totally separate hosting account in WHM) I also get a certificate error saying that server.example.com is not authorised to use mycustomerssite.com's SSL cert.

    Any ideas?
     
    #1 mikefromnz, Feb 19, 2017
    Last edited by a moderator: Feb 19, 2017
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Its because the server uses SNI, any non SSL domains will automatically load using the SSL of the first virtualhost in apache conf that reside on the same IP.

    What you can do is, generate a self signed certificate, unless you already have a signed certificate for the hostname, OR if you are using AutoSSL you should already have an SSL generated for server.example.com but its only installed on cPanel services, not on port 443.

    Go into WHM:

    Home » SSL/TLS » Install an SSL Certificate on a Domain

    In the "Domain:" field, put in server.example.com and click Autofill. If you already have a cert for the hostname, then it will autofill, then click Install.

    Now go to:

    Home » SSL/TLS » Manage SSL Hosts

    scroll down to server.example.com and click "Make Primary".

    Now anytime someone goes to the HTTPS for a site that does NOT have an SSL installed, it will go to your cPanel default page instead of bringing up someone else's website.

    Hope this helps!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    mikefromnz and cPanelMichael like this.
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    The instructions in the previous post should help. Let us know if you encounter any difficulties or have additional questions.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mikefromnz

    mikefromnz Active Member

    Joined:
    Feb 9, 2017
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New Zealand
    cPanel Access Level:
    Root Administrator
    You literally are a genius, thank you so much! perfect instructions and immediately solved the issue, awesome!!!!
     
    cPanelMichael likes this.
  5. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Glad to hear it :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    mikefromnz likes this.
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,339
    Likes Received:
    402
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks for updating your thread. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice