• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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 vhost SSL certificate update from cli without restarting Apache

burnley

Regular Pleskian
Hi,

I need to basically create a certificate in Plesk being given the key and the bundle (CA+cert) and update the vhost's SSL configuration accordingly. At the moment I'm doing something like this:
/usr/local/psa/bin/certificate --create "www.${MYSITE} cert" \
-domain ${MYSITE} \
-key-file /etc/ssl/keys/www.${MYSITE}.key \
-cert-file /etc/ssl/certs/www.${MYSITE}.pem \
-cacert-file /etc/ssl/certs/www.${MYSITE}.pem
/usr/local/psa/bin/site -u ${MYSITE} -certificate-name "www.${MYSITE} cert"

... which is fine, but "site" command restarts Apache and this isn't something I want. I checked its help and it doesn't support the "-no-restart" switch.
How can I get this functionality in cli without restarting the webserver(s)? I just need to rebuild the configuration, then sending httpd and nginx services the graceful & reload signals respectively. Restarting a busy webserver isn't really an option.
Thanks.
 
Igor, thanks for this, I have. However, I'm still yet to find a way to update the site configuration without restarting/reloading the webserver(s). I need to be able to do bulk updates for an array of domains, but only reload apache & nginx once the job's done. Any hint will be greatly appreciated, I'm also willing to assist with beta testing, should this be implemented as a feature :)
 
Back
Top