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.

Default Domain

Discussion in 'General Discussion' started by smooch1502, Jan 9, 2010.

  1. smooch1502

    smooch1502 Member

    Joined:
    May 12, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    The first domain that i added to my server is now accessable via the main server ip address.

    Is there anyway to not have the first domain i created accessable using the ip.
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    In order to make the site inaccessible via the main IP address, you have to edit the Apache configuration file located at

    Make sure the NameVirtualHost entry of the IP is placed above the default VirtualHost of the server and not above the domains VirtualHost entry. The NameVirtualHost entry is in the below format:

    Once the changes are made, save the file and restart the httpd service.

     
  3. smooch1502

    smooch1502 Member

    Joined:
    May 12, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Thanks for your help, but i don't know where to move the:

    NameVirtualHost IP:80

    To. as it is above the default domain.
     
  4. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    It should be above the VirtualHost entry of the hostname of the server and not above the VirtualHost entry of the domain name. Don't forget to restart the httpd service once you save the file.
     
Loading...

Share This Page