Plesk

De Sn4kY
Révision datée du 27 juin 2018 à 14:58 par Sn4kY (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

Lister les domaines

plesk bin domain --list

Lister les redirections emails

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) --batch psa -e "SELECT CONCAT_WS('@',mail.mail_name,domains.name) AS adresse ,mail_redir.address AS redirection FROM domains,mail,mail_redir WHERE domains.id=mail.dom_id AND mn_id=mail.id ORDER BY domains.name ASC,mail.mail_name ASC;" | sed 's/\t/\t->\t/g'

Lister les domaines par IP

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -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 WHERE iad.ip_address='<THE.IP.ADDRESS.HERE>'"

Lister les handlers PHP

plesk bin php_handler --list

Lister les id de domaines par version/handler PHP

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -e "select dom_id,php_handler_id from hosting where php_handler_id LIKE '%5.2%';"

Lister les domaines qui ont une version spécifique de PHP

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa --batch -e "select name from domains, hosting WHERE domains.id=hosting.dom_id AND hosting.php_handler_id LIKE '%72%';"