• 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.

Resolved Error in Apache configuration

Dirk

Basic Pleskian
Hi guys,

I am having a lot of errors in my domains:
New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration

I tried:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain example.com

but got the response:
[2016-12-29 22:42:23] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache-config' '-t'] with exit code [1]
[2016-12-29 22:42:24] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache-config' '-t'] with exit code [1]
[2016-12-29 22:42:24] ERR [panel] Apache config (14830477430.05547800) generation failed: Template_Exception: AH00526: Syntax error on line 178 of /etc/apache2/plesk.conf.d/server.conf:
SSLCertificateFile takes one argument, SSL Server Certificate file ('/path/to/file' - PEM or DER encoded)

file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00526: Syntax error on line 178 of /etc/apache2/plesk.conf.d/server.conf:
SSLCertificateFile takes one argument, SSL Server Certificate file ('/path/to/file' - PEM or DER encoded)

I checked /etc/apache2/plesk.conf.d/server.conf on line 178 and found following entry:
SSLEngine on
SSLVerifyClient none
SSLCertificateFile ""


So there is no entry in the SSLCertificateFile. What next step should I take? I am helfpful for any ideas.
Btw. - my server is fully functional. SSL works fine.

So I am a little scared to try this next step:
  1. Remove all entries from the psa.Configurations :
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e"delete from Configurations"
  2. Reconfigure Apache using the httpdmng utility:
    ~# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
Is it really safe to do that? And could it bring another result. Because after all the SSLCertificateFile-entry seems to be missing...
 
I checked /etc/apache2/plesk.conf.d/server.conf on line 178 and found following entry:
SSLEngine on
SSLVerifyClient none
SSLCertificateFile ""


So there is no entry in the SSLCertificateFile. What next step should I take? I am helfpful for any ideas.
Btw. - my server is fully functional. SSL works fine.

On my test Debian8 Plesk server I see:

# grep SSLCertificateFile /etc/apache2/plesk.conf.d/server.conf
SSLCertificateFile "/opt/psa/var/certificates/cert80q6EmO"
SSLCertificateFile "/opt/psa/var/certificates/cert80q6EmO"
 
Thnx Igor for pointing into the right direction.
# plesk repair web example.com
failed with the same error-message:
Repairing web server configuration
Repairing web server configuration for the domain
hxxxxxxxx.stratoserver.net ....................................... [2016-12-30 08:27:53] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/httpdmng' '--reconfigure-domain' 'hxxxxx.stratoserver.net'] with exit code [1]
[FAILED]
- httpdmng failed: [2016-12-30 08:27:53] ERR [util_exec]
proc_close() failed ['/opt/psa/admin/bin/apache-config' '-t']
with exit code [1]
[2016-12-30 08:27:53] ERR [util_exec] proc_close() failed
['/opt/psa/admin/bin/apache-config' '-t'] with exit code [1]
[2016-12-30 08:27:53] ERR [panel] Apache config
(14830828720.51206800) generation failed: Template_Exception:
AH00526: Syntax error on line 178 of
/etc/apache2/plesk.conf.d/server.conf:
SSLCertificateFile takes one argument, SSL Server Certificate
file ('/path/to/file' - PEM or DER encoded)

file:
/opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00526: Syntax error on line 178 of
/etc/apache2/plesk.conf.d/server.conf:
SSLCertificateFile takes one argument, SSL Server Certificate
file ('/path/to/file' - PEM or DER encoded)

Error messages: 0; Warnings: 0; Errors resolved: 0


exit status 1

BUT - after that I tried:
plesk repair all
and that repaired billions of things.
After that: everything worked fine again. I only had to set the ssl-cert for Emails and that's it. Amazing product, this PLESK!!!
 
Back
Top