Plesk – get information about aliases

To get a list of all existing aliases defined for the respective system, you can connect to the MySQL database of Plesk as admin via key file:

$> mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

Afterwards you can get a list of all aliases by the following select statement:

select * from domain_aliases;

This will give you something like that:

+----+--------+-------------+--------+---------------------------------+---------------------------------+------+------+------+--------+-------------+-------------+-----------+-----------+
| id | dom_id | dns_zone_id | status | name                            | displayName                     | dns  | mail | web  | tomcat | seoRedirect | external_id | icpStatus | icpPermit |
+----+--------+-------------+--------+---------------------------------+---------------------------------+------+------+------+--------+-------------+-------------+-----------+-----------+
|  1 |      2 |           5 |      3 | shop.zmp.asksheldon.de          | shop.zmp.asksheldon.de          | true | true | true | false  | false       | NULL        |         0 | NULL      |
|  2 |      5 |          12 |      0 | asksheldonshop.se               | asksheldonshop.se               | true | true | true | false  | false       | NULL        |         0 | NULL      |
|  3 |      5 |          13 |      0 | asksheldonshop.fi               | asksheldonshop.fi               | true | true | true | false  | false       | NULL        |         0 | NULL      |
|  5 |      5 |          15 |      0 | asksheldonshop.dk               | asksheldonshop.dk               | true | true | true | false  | false       | NULL        |         0 | NULL      |
|  6 |      5 |          16 |      0 | asksheldonshop.no               | asksheldonshop.no               | true | true | true | false  | false       | NULL        |         0 | NULL      |
|  7 |      5 |          17 |      0 | asksheldonshop-nordic.com       | asksheldonshop-nordic.com       | true | true | true | false  | false       | NULL        |         0 | NULL      |
|  8 |      5 |          18 |      0 | asksheldonscandinavia.com       | asksheldonscandinavia.com       | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 13 |      5 |          25 |      0 | asksheldonshop.au               | asksheldonshop.au               | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 14 |      5 |          26 |      0 | asksheldonusa.com               | asksheldonusa.com               | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 15 |      8 |          27 |      0 | cms.asksheldonshop.au           | cms.asksheldonshop.au           | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 16 |      8 |          28 |      0 | cms.asksheldonusa.com           | cms.asksheldonusa.com           | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 17 |      4 |          29 |      0 | stage.asksheldonshop.se         | stage.asksheldonshop.se         | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 18 |      4 |          30 |      0 | stage.asksheldonshop.fi         | stage.asksheldonshop.fi         | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 19 |      4 |          31 |      0 | stage.asksheldonshop.dk         | stage.asksheldonshop.dk         | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 20 |      4 |          32 |      0 | stage.asksheldonshop.no         | stage.asksheldonshop.no         | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 21 |      4 |          33 |      0 | stage.asksheldonshop.au         | stage.asksheldonshop.au         | true | true | true | false  | false       | NULL        |         0 | NULL      |
| 22 |      4 |          34 |      0 | stage.asksheldonusa.com         | stage.asksheldonusa.com         | true | true | true | false  | false       | NULL        |         0 | NULL      |
+----+--------+-------------+--------+---------------------------------+---------------------------------+------+------+------+--------+-------------+-------------+-----------+-----------+

To get more information about a specific alias you can use:

$> /usr/local/psa/bin/domalias -i cms.asksheldon.au

This will end up in an output like that:

[root@plesksuperserver ~]#  /usr/local/psa/bin/domalias -i cms.asksheldon.au
   Name             cms.asksheldon.au
   Domain           sheldon-cms.asksheldon.de
   Status           disabled
   Mail             On
   Web              On
   DNS              On
   Seo redirect     Off

 

One thought on “Plesk – get information about aliases

Leave a Reply

Your email address will not be published.

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.