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.

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:
    1
    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:
     
  2. NetX

    NetX Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    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:
    1
    Location:
    Europe
    Thanks

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

    /David

    cPanel.net Support Ticket Number:
     
  4. NetX

    NetX Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    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:
    1
    Location:
    Europe
    That made it a little easier! Thanks! :)

    cPanel.net Support Ticket Number:
     
  6. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    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:
    16
    #! /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:
    16
    Thanks!!!

    cPanel.net Support Ticket Number:
     
  9. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    /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