• 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

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