New configuration files for the Apache web server were not created: Syntax error on line 9 of /etc/apache2/mods-enabled/mpm_prefork.conf

Follow

Comments

4 comments

  • Avatar
    Tawfik Bouriche

    Hi Maxim Krasikov,

    there is an error in the command and the error is located in reconfigure

    below the rectified command line 

    plesk sbin httpdmng --reconfigure-domain example.com 

     

    thank's

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Tawfik,

    Thank you for noticing the misprint.

    The correct command is:

    # plesk sbin httpdmng --reconfigure-domain example.com

    0
    Comment actions Permalink
  • Avatar
    Farhad (Edited )

    After updating plesk.. i getting this error.. and i can not solve it.

     

    "Aufgrund folgender Fehler in den Konfigurations-Templates konnten keine neuen Konfigurationsdateien für den Apache Webserver erstellt werden: apache2: Syntax error on line 141 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/mpm_prefork.conf: No such file or directory .

     

    When I try to rebuild the config files. im gettings this error:


    ""Konfigurieren des Webservers nicht möglich:Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-all ) Details: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-server [1] => -no-restart ) Details: [2019-05-29 20:09:27.409] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache-config' '-t'] with exit code [1] [2019-05-29 20:09:28.190] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache-config' '-t'] with exit code [1] [2019-05-29 20:09:28.358] ERR [panel] Apache config (15591605660.97894600) generation failed: Template_Exception: apache2: Syntax error on line 141 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/mpm_prefork.conf: No such file or directory file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 75 code: 0 apache2: Syntax error on line 141 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/mpm_prefork.conf: No such file or directory "

    0
    Comment actions Permalink
  • Avatar
    Ekaterina Babenko

    Hi Farhad,

    Based on the error messages I can tell that file /etc/apache2/mods-enabled/mpm_prefork.conf either missing or corrupted.

    There are couple ways to resolve it:

    1. Check if the link exists under /etc/apache2/mods-enabled/mpm_prefork.conf. It should looks as follows:

      If link is missing, re-link file with the following:

      # ln -s  /etc/apache2/mods-available/mpm_prefork.conf /etc/apache2/mods-enabled/mpm_prefork.conf
    1. If file already exists and link is correct, rename it:

      # mv /etc/apache2/mods-enabled/mpm_prefork.conf /etc/apache2/mods-enabled/mpm_prefork.conf.bak

            Change MPM module to Event in Plesk > Tools & Settings > Apache Web Server and back to prefork: configuration file will be re-created.

    1. If file does not exist, change MPM module to Event in Plesk > Tools & Settings > Apache Web Server and back to Prefork: configuration file will be re-created.

      If the issue cannot be resolved, additional investigation required. To do so, please, submit ticket to the Plesk Technical Support:
      https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request