Plesk: How many ColdFusion sites?

A customer asked how many ColdFusion sites they had on their Plesk server. Ordinarily, the following query would make this easy to answer:

# mysql psa -e "select count(*) as 'Coldfusion Enabled' from hosting where coldfusion = 'true'"
+--------------------+
| Coldfusion Enabled |
+--------------------+
|                159 |
+--------------------+

In their case, however, they had ColdFusion support enabled for all sites, so we needed to find out how many domains actually had ColdFusion content. Here’s a quick&dirty one-liner:

# find /var/www/vhosts/ -type f | grep -i "\.cfm" | cut -d/ -f5 | sort | uniq | wc -l
   150

Leave a Reply

Your email address will not be published. Required fields are marked *