• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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