(313) 649-7301
  • Facebook
  • Twitter
  • Facebook
  • Twitter
  • Your Current IP Address
encylia
  • Blog
  • Services
    • Web Hosting
    • Technical Support
  • Contact me
Select Page

Incorrect domains displayed at “Show IP Address Usage” in WHM.

by benny | Mar 14, 2014 | Account Management, command-line, cPanel, server administration, whm | 0 comments

whm

If WHM isn’t showing you the right information under ‘Show IP address usage’, it likely means that the userdata files contain incorrect information. 

For the sake of an example, let’s say that WHM »IP Functions »Show IP Address Usage is displaying domain.com and wrongdomain.com on the ip address 192.168.1.2. In order to find the incorrect information, we need to look in cPanel’s userdata files (disregarding the cached files) using this command:

grep wrongdomain.com -R -H /var/cpanel/userdata/ | grep -v .cache

That should give you output that looks something like this:

[~]# grep wrongdomain.com -R -H /var/cpanel/userdata/ | grep -v cache
/var/cpanel/userdata/$CPANELUSERNAME/main:main_domain: wrongdomain.com

Fantastic! The next step is to backup that file. I recommend /root/oldfiles/ for most of the backups that I won’t be keeping around, so in my case these are the commands to run:

mkdir /root/oldfiles/
cp /var/cpanel/userdata/$CPANELUSERNAME/main /root/oldfiles

And then you need to edit the file to remove the incorrect name. More often than that the line main_domain: actually reflects the incorrect domain. If it does, replace the incorrect domain with the correct domain, and you’ll be all set!

Leave a Reply Cancel reply

Recent Posts

  • How to reset a user’s bandwidth to 0 in WHM 11.50+ October 16, 2015
  • Installing Solr on cPanel 11.48 February 20, 2015
  • How to change the MySQL tmp location on CentOS February 6, 2015

Top Posts & Pages

How to change the MySQL tmp location on CentOS
  • Facebook
  • Twitter

designed & hosted by encylia | Powered by WordPress