Help regarding IPs and subdomains on cPanel/WHM

Kampreto99

Registered
Jan 2, 2014
4
0
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
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
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 <[email protected]>
</VirtualHost>


Is there another VirtualHost entry before that?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 

Kampreto99

Registered
Jan 2, 2014
4
0
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 [email protected]
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
UserDir disabled
</VirtualHost>

cPanelMicahel thanks i'll try it :D