• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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