• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Question Obtain status of HTST with SSL/It of domain via command line

Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian 18.0.75
HI:

I want to check what domains have active HSTS, but the command of "plesk ext sslit", only active o disable the optionj, and i cant check if is enabled or not¿?

I have tried whit the command: grep -i strict-transport-security /var/www/vhosts/system/*/conf/nginx.conf and i see what is enabled, but not what is disabled

Somebody can help me¿?

Thanks!
 
To my knowledge there is no Plesk utility or build-in option to retrieve the HSTS status. I suspect that's because the status is only stored in the domain's nginx configuration. What you can do instead is use a bash/shell command to loop trough all domains and perform a grep search on the corresponding configuration file of the domain. Something like:

Code:
plesk bin domain -l | while read dom_name; do if ! grep -qi strict-transport-security /var/www/vhosts/system/$dom_name/conf/nginx.conf; then echo $dom_name; fi; done
 
Hi @Kaspar

Thanks for the command line to fine the HSTS dont actived.

Yes, i see that dont have that option, but is a good option to find the domain, because, i have server that dont have nginx, and the command failed, because only find in conf of nginx, but, i see that apache can check with this command: grep -ri --exclude='*.bak' 'strict-transport-security' /var/www/vhosts/system/*/conf/

Thanks!
 
Back
Top