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

Issue Unable to repair web server configuration due to AH00526: Syntax error on line 1 of /etc/apache2/plesk.conf.d/server.conf

wesolveproblems

New Pleskian
Firstly, thank you in advance for your assistance!

I am unable to repair web server configuration due to AH00526: Syntax error on line 1 of /etc/apache2/plesk.conf.d/server.conf

This is really strange... First I got this error
Code:
New configuration files for the Apache web server were not created due to the errors in configuration templates: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:8 AH00526: Syntax error on line 1 of /etc/apache2/plesk.conf.d/server.conf: Invalid command '\xe2\x88\x91#ATTENTION!', perhaps misspelled or defined by a module not included in the server configuration . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter.

I went to the config troubleshooter and I tried to search in KB which took me to a 404 http://kb.plesk.com/en/products/?id=52&qprod=52

So, I removed those comments from being generated by editing
/usr/local/psa/admin/conf/templates/custom/server.php to comment out //echo AUTOGENERATED_CONFIGS;

Now it seems to think that there is a "-" at the beginning of my /etc/apache2/plesk.conf.d/server.conf - but there isn't one!!

The first chars in that file are `ServerName` here is the error I'm getting when I run plesk repair web:

Code:
  Repair web server configuration for all domains? [Y/n] y


    Repairing web server configuration for all domains. This aspect   


    can be used with individual domains ("plesk repair web            


    example.com"), and on the server level ("plesk repair web") ..... [2020-03-27 03:54:26.415] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/httpdmng' '--reconfigure-all'] with exit code [1] 


Error occured while sending feedback. HTTP code returned: 429


[FAILED]


    - httpdmng failed: Error occured while sending feedback. HTTP


      code returned: 429


      Execution failed.


      Command: httpdmng


      Arguments: Array


      (


          [0] => --reconfigure-server


          [1] => -no-restart


      )


      


      Details: [2020-03-27 03:54:16.435] ERR [util_exec] proc_close()


      failed ['/opt/psa/admin/bin/apache-config' '-t'] with exit code


      [1] 


      [2020-03-27 03:54:23.649] ERR [panel] Apache config


      (15853064500.55699600) generation failed: Template_Exception:


      AH00526: Syntax error on line 1 of


      /etc/apache2/plesk.conf.d/server.conf:


      Invalid command '\xe2\x88\x91', perhaps misspelled or defined


      by a module not included in the server configuration


      


      file:


      /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php


      line: 75


      code: 0


      AH00526: Syntax error on line 1 of


      /etc/apache2/plesk.conf.d/server.conf:


      Invalid command '\xe2\x88\x91', perhaps misspelled or defined


      by a module not included in the server configuration
 
I was following this guide to remove the plesk fingerprints from my http headers and I think that this has something to do with the custom configs mentioned here:

Resolved - Server header

When I remove those custom configs, I am able to rebuild.

How can I safely remove x-powered-by: PleskLin from my http headers?
 
Back
Top