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.

Help regarding IPs and subdomains on cPanel/WHM

Discussion in 'General Discussion' started by Kampreto99, Jan 2, 2014.

  1. Kampreto99

    Kampreto99 Registered

    Joined:
    Jan 2, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello admins. I just installed cPanel on my servers and its perfectly running smoothly without a problem.
    I was a got a problem just now, I'm using a VPS single IP and why while I'm tryin' to access my IP it's
    showing my primary domain's website I was found similar thread but I don't get it what they said.
    How to fix this? I want while accessing my IP its showing normal cPanel default sites page.

    and also I have a problem too with a subdomain, I was created a subdomain and while I'm accessing
    It's showing my primary domain's index too. UPDATE, It was a mistake I think, It's back normal again

    Here's the screenshot.
    /http://prntscr.com/2fu4t4

    I'm accessing my IP it's showing my primary domain's index. :
    /http://prntscr.com/2fu5rl

    Please help admin :D fast response :D
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    In the Apache config file
    /usr/local/apache/conf/httpd.conf

    the 1st VirtualHost entry should be like this:

    <VirtualHost <your_server_IP>:80>
    ServerName <your_server_IP>
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin <admin@email.com>
    </VirtualHost>


    Is there another VirtualHost entry before that?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Yes, you will need to ensure the default VirtualHost for your IP address appears first in the httpd.conf file as indicated in the previous post. You can sometimes resolve this issue by running:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
  4. Kampreto99

    Kampreto99 Registered

    Joined:
    Jan 2, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    quietFinn No there's no vHost entry before this

    <VirtualHost 50.23.xx.xx:80>
    ServerName 50.23.xx.xx
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin cyberidn999@gmail.com
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>
    UserDir disabled
    </VirtualHost>

    cPanelMicahel thanks i'll try it :D
     
  5. Kampreto99

    Kampreto99 Registered

    Joined:
    Jan 2, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    admins i try it but i got a problem

    root@srv1 [~]# /scripts/rebuildhttpdconf
    info [rebuildhttpdconf] Missing owner for domain srv1.shanjunisme.com, force loo kup to root
    Built /usr/local/apache/conf/httpd.conf OK
    root@srv1 [~]#
     
  6. Kampreto99

    Kampreto99 Registered

    Joined:
    Jan 2, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page