- Plesk Onyx for Linux
The following error is shown in Plesk Home page:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: AH00526: Syntax error on line 48 of /etc/httpd/conf/plesk.conf.d/vhosts/example.test.conf: SSLCertificateFile takes one argument, SSL Server Certificate file ('/path/to/file' - PEM or DER encoded) .
Apache configuration test fails with the following error:
# apachectl -t
SSLCertificateFile takes one argument, SSL Server Certificate file ('/path/to/file' - PEM or DER encoded)
The following command returns non-empty output:
# plesk db "select d.id, d.name, h.certificate_id, c.name, c.cert_file, c.ca_file from domains d left join hosting h on h.dom_id = d.id left join certificates c on c.id = h.certificate_id where cert_file=''"
Information about the certificate file for the domain is missing from Plesk database.
Connect to the server via SSH;
Renew Let's Encrypt certificate of the affected domain:
# plesk bin extensions -e renew.php example.com
Rebuild web server configuration for the domain:
# plesk repair web example.com -y
If the reconfiguration process fails with the same error message mentioning another domain, either repeat the above steps or perform the following to resolve the issue for all domains at once.
Warning: The following process can take a significant amount of time depending on the number of domains hosted on the server.
Log in to Plesk, navigate to Tools & Settings > Scheduled Tasks and disable any tasks scheduled to run in the next 2 hours.
Connect to the server via SSH.
/usr/local/psa/admin/conf/panel.inifile. In case it does not exist, create it by copying from the
# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
Append the following lines to it:
renew-before-expiration = 999
Run the following command to renew Let's Encrypt certificates for all domains:
# plesk bin extensions -e renew.php
Reconfigure the web server:
# plesk repair web -y
Revert the changes made during steps 1 and 4.