Plesk for Linux
kb: auxiliary
ABT: Group A
Applicable to:
- Plesk for Linux
Symptoms
How to enable/disable SSL support for a Subscription via CLI?
Resolution
via Plesk GUI
- Log in to Plesk
- Go to Domains > example.com > Hosting Settings and enable/disable
SSL/TLS support
option.
via CLI
- Connect to the server using SSH;
- To disable SSL support for subscription:
# /usr/local/psa/bin/subscription -u example.com -ssl false
To enable SSL support for subscription:
# /usr/local/psa/bin/subscription -u example.com -ssl true
Note: this utility only enables/disables the SSL support for a subscription. To assign a certificate for a domain, check this article.
Comments
3 comments
Can we have the command to do this for all; domains on a server via cli?
Hello, @Shawn Carron
It is possible to perform using the following steps:
Generate list of subscriptions:
# plesk bin subscription --list > subs.txt
Apply changes to all subscriptions listed in the file subs.txt:
# cat subs.txt | while read i; do plesk bin subscription --update $i -ssl true; done
Thanks! It can also be done using the following:
# for i in `plesk db -Nse "select d.name from domains as d join hosting as h where h.ssl='false' and h.dom_id=d.id;"`; do plesk bin domain -u $i -ssl true; done
Please sign in to leave a comment.