How to list/find addon domains & subdomains in whm on Linux?

postcd

Well-Known Member
Oct 22, 2010
721
21
68
What is the file or folder where are listed addon domains and main domains on WHM server?
I need to use it for my linux script. Thank you

in WHM / Account information / List subdomains
Also lists it

But for linux file, when i searched one parked domain, i found:/etc/httpd/conf/httpd.conf

this appears to list subdomains (without http, http www)
cat /etc/httpd/conf/httpd.conf | grep "ServerName" | tr -d "ServerName" | tr -d " "

But im unsure how to filter out domains from already suspended cpanels..
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

You may find these files helpful:

/etc/userdomains
/etc/userdatadomains

Also, you can see a list of suspended accounts in the following directory:

/var/cpanel/suspended/

Thank you.