Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

List All Domains

Discussion in 'General Discussion' started by davvve, Aug 2, 2003.

  1. davvve

    davvve Member

    Joined:
    Mar 31, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Europe
    Hi

    Anyone knows a way to list all domains that are setup on a Cpanel/WHM server? Is there a backend script that can list the domains through SSH?

    /David

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. NetX

    NetX Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    166
    You can use this command:

    # more /etc/localdomains

    ;)

    cPanel.net Support Ticket Number:
     
  3. davvve

    davvve Member

    Joined:
    Mar 31, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Europe
    Thanks

    I guess I could write some perl script that excludes the subdomains...

    /David

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. NetX

    NetX Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    166
    1) Using yor favorite editor (pico, vi ..) create a file "listdom"

    2) Copy & Paste this code and save the file:

    #! /bin/sh

    clear
    cut -f "1" -d : /etc/trueuserdomains | sort | more


    3) Make the file executable:

    chmod +x listdom

    4) Run the script

    ./listdom


    ;)

    cPanel.net Support Ticket Number:
     
  5. davvve

    davvve Member

    Joined:
    Mar 31, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Europe
    That made it a little easier! Thanks! :)

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    166
    That is very useful script! Is there anyway to make it so it will lists domains along with the IP address that is attached to the domain?

    cPanel.net Support Ticket Number:
     
  7. NetX

    NetX Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    166
    #! /bin/sh

    clear
    more /etc/domainips

    :D

    cPanel.net Support Ticket Number:
     
  8. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    166
    Thanks!!!

    cPanel.net Support Ticket Number:
     
  9. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    168
    /etc/domainips seems to only display the first domain that was setup on a shared IP. And it doesn't seem to be updating itself if you rearrange the domains in httpd.conf. :(
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice