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.

Hostname and Main Domain

Discussion in 'General Discussion' started by cmo, Jan 6, 2014.

  1. cmo

    cmo Member

    Joined:
    Dec 20, 2013
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi again,

    I may not have thought my setup through very well. When I setup my server I chose a hostname based on a domain I plan to use as my primary website:

    server.domain.com

    I then created an account for myself with the domain domain.com. When I browse to server.domain.com it shows the website I have setup at domain.com. I assumed (and hoped) that browsing to server.domain.com would show cPanel's default web page. The same thing happens when I visit my VPS IP (I only have 1 IP and cannot get any more for this VPS ... DigitalOcean).

    I haven't installed any certificates yet, but I am concerned that if it is showing the contents of my main website that it may pull the wrong certificate when a client goes to https://server.domain.com:2083 (or types in clientdomain.com/cpanel).

    Is it possible to setup a page for server.domain.com and IP, or at least have them show the default cPanel page instead of my main website?

    Thanks a bunch for your help,

    - cmo
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You can ensure the hostname's VirtualHost is the first in your Apache configuration file (httpd.conf). You can typically rebuild the httpd.conf file to complete this task automatically:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
  3. cmo

    cmo Member

    Joined:
    Dec 20, 2013
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for your help again, Michael. That did it :)

    How often will I need to do that to ensure server.domain.com shows the default page instead of my main website?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page