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.

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

Discussion in 'General Discussion' started by postcd, May 31, 2015.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    619
    Likes Received:
    6
    Trophy Points:
    18
    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..
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page