Apache unable to generate configuration files

Created:

2016-11-16 12:44:53 UTC

Modified:

2017-08-16 15:41:31 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache unable to generate configuration files

Applicable to:

  • Plesk 11.x for Linux

Symptoms

  1. Domain reconfiguration fails with error:

     2013-10-25T10:52:48+01:00 ERR (3): Apache config (13826947670.42037000) generation failed: Syntax error on line 56 of /var/www/vhosts/example.com/conf/13826947670.42037000_httpd.include:
    SSLCACertificateFile takes one argument, SSL CA Certificate file (`/path/to/file' - PEM encoded)

    Syntax error on line 56 of /var/www/vhosts/example.com/conf/13826947670.42037000_httpd.include:
    SSLCACertificateFile takes one argument, SSL CA Certificate file (`/path/to/file' - PEM encoded)
  2. When click on SSL certificate of example.com the error is shown:

    Unable to get certificate info: openssl_x509_parse() failed: error:0906D066:PEM routines:PEM_read_bio:bad end line

    0: class.CertEditForm.php:131
    CertEditForm->assign(object of type SSLCertificate, array, array, object of type plesk__client__domain__certificate__properties)
    1: CertificatePropertiesUIPointer.php:590
    CertificatePropertiesUIPointer->accessItemEdit(string 'GET', NULL null)
    2: CertificatePropertiesUIPointer.php:19
    CertificatePropertiesUIPointer->accessItem(string 'GET', NULL null)
    3: UIPointer.php:595
    UIPointer->access(string 'GET')
    4: plesk.php:45

Cause

There is no entry for ca_file column in psa.certificates table for the domain example.com :

mysql> select id,ca_file,cert_file,name from certificates where id=(select id from domains where name="example.com");
+----+---------+-------------+------------+
| id | ca_file | cert_file | name |
+----+---------+-------------+------------+
| 6 | | cert-vcdIJN | example.com|
+----+---------+-------------+------------+

Resolution

  1. Backup psa database # 213904125
  2. Find proper file name of the CA file in /usr/local/psa/var/certificates/ :

    #grep SSLCACertificateFile /var/www/vhosts/example.com/conf/13826947670.42037000_httpd.include
    SSLCACertificateFile /usr/local/psa/var/certificates/cert-NfQoO0
  3. Access Plesk database # 213928465 and update psa.certificates with valid data:

    mysql> update certificates set ca_file='cert-NfQoO0' where id=(select id from domains where name="example.com");

NOTE : If CA certificate is missing you can recreate it via certificate utility .

Have more questions? Submit a request
Please sign in to leave a comment.