• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question Trying to enable "Keep Websites Secured" via API

simonrp

New Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.60 Update #1
Hi,

I have coded a PHP script that adds new domains/subscriptions to the server using the Plesk API and also installs a Lets Encrypt SSL cert on them - That all works great.

When I check the SSL Cert in the Plesk interface it shows that the cert thinks it will auto renew but the "Keep Websites Secured" slider is turned off.

I suppose I have two questions please :

1. Do I need that slider turned on for auto renewal ?

2. If I do need it turned on then how can I do that via API (or an exec in PHP) ?

Thanks in advance for any help.
 
If a website already has an Lets Encrypt SSL certificate, it will get renewed automatically. Regardless whether the "Keep Websites Secured" is enabled or not.

The "Keep Websites Secured" option does te following:
Automatically replaces expired or self-signed SSL/TLS certificates with free valid certificates from Let's Encrypt. Covers each domain, subdomain, domain alias, and webmail belonging to the subscription. Issues a new certificate if no certificate was assigned yet.
It's up to you to decide if you want to enabled it :)
If you do want to enable it, you can configure it in the Service Plan at the "Additional Services" tab.
 
If a website already has an Lets Encrypt SSL certificate, it will get renewed automatically. Regardless whether the "Keep Websites Secured" is enabled or not.

The "Keep Websites Secured" option does te following:

It's up to you to decide if you want to enabled it :)
If you do want to enable it, you can configure it in the Service Plan at the "Additional Services" tab.
Thank you so much - that info is perfect :)

I must say, i'm loving the Plesk API - So easy to create a new account and all my customers have to do is point a CNAME record to a subdomain.
 
Back
Top