Page 1 of 1

How to list all website domains and subdomains on server

Posted: Mon Aug 14, 2023 1:35 pm
by myVesta

Code: Select all

for user in $(grep '@' /etc/passwd |cut -f1 -d:); do
    if [ ! -f "/usr/local/vesta/data/users/$user/user.conf" ]; then
        continue;
    fi
    for domain in $(/usr/local/vesta/bin/v-list-web-domains $user plain |cut -f 1); do
        echo $domain
    done
done