• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Global sttings of HSTS via CLI

MartinT

Basic Pleskian
Server operating system version
Debian 10.13 Buster
Plesk version and microupdate number
Plesk Obsidian Version 18.0.49
Hi,
on my plesk admin-web-server I got many many Subscriptions. After a Server Issue I had to backup, but now all subscritions are not resolveable. I tested out why, its something with HSTS. A switch of will make everything fine. So is it possible to switch global all subscriptons on "false" via cli plesk-bin-site? And when it work the step back to "true". I did not find anything. At How to enable HTTP Strict-Transport-Security (HSTS) and OCSP Stapling for all domains in Plesk? - Support Cases from Plesk Knowledge Base is something to switch it on, but for switch off?
 
Tried it out. Here is the outcome:

Invalid command: 'default'
exit status 3
Invalid command: 'default'
exit status 3
Invalid command: 'default'
exit status 3
Invalid command: 'default'
exit status 3
 
The domains.txt file contains a list of your domains? Does it? Or does it also contain empty lines or something else but domains?
 
Ah, yes, I just noticed there is an additional dash (-) missing in hsts option of the CLI command. It should be --hsts. (The dash is also missing in the example code in the support article, which I copied). So the whole command should be:
Code:
# for i in `cat domains.txt`; do plesk ext sslit --hsts -enable -domain $i; done
 
Last edited:
@Peter Debik
No empty lines
@Kaspar
That was it, except ...; do plesk ...." not only plesk like in your first answer.
By the way the Plesk solution site has same "bash" mistake at "list". So in whole no it works.

If it interupts the building its because sql database got an empty subscription id. my work around is to overwork domain.txt and restart at that place where in interrupts.

So far thanks Kaspar and Peter
 
Ah, yes, I just noticed there is an additional dash (-) missing in hsts option of the CLI command. It should be --hsts. (The dash is also missing in the example code in the support article, which I copied). So the whole command should be:
Code:
# for i in `cat domains.txt`; do plesk ext sslit --hsts -enable -domain $i; done
I remember that a similar case happened here on the forum recently. It seems to be a formatting issue for all these excerpts. I have informed the responsible team here to look into it and correct these code examples. Thank you for explaining it here again.
 
Back
Top