List domains in Plesk server:
You can list domains in Plesk and their IP addresses using the following command.
Run the following command from command line:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e"SELECT dom.id, dom.name, ia.ipAddressId, iad.ip_address FROM domains dom LEFT JOIN DomainServices d ON (dom.id = d.dom_id AND d.type = 'web') LEFT JOIN IpAddressesCollections ia ON ia.ipCollectionId = d.ipCollectionId LEFT JOIN IP_Addresses iad ON iad.id = ia.ipAddressId"
The sample output is shown below:
+----+-------------------------------+-------------+------------+ | id | name | ipAddressId | ip_address | +----+-------------------------------+-------------+------------+ | 10 | domain_name1 | 1 | IP_Address1| | 38 | domain_name2 | 1 | IP_Address1| | 45 | domain_name3 | 2 | IP_Address2| | 24 | domain_name4 | 3 | IP_Address3| +------------------------------------+-------------+------------+
That’s it!
If you like this post and wish to receive more articles from us, please like our FB page: Grepitout
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at info@grepitout.com
Add Comment