Articles in this section

Web reconfiguration in Plesk fails: unknown option 'InheritBefore'

kb: bug Plesk for Linux ext: wptk

Applicable to:

  • Plesk for Linux

Symptoms

  • The server is running on the RHEL-based OS (CentOS, CloudLinux, RHEL) of version 6 with the Apache 2.2 version.  
  • WP Toolkit was upgraded to the 5.8 version.

  • In an attempt to perform web reconfiguration the following error appears:

    CONFIG_TEXT: Syntax error on line 121 of /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: RewriteOptions: unknown option 'InheritBefore'

Cause

This is the WP Toolkit bug with the ID #EXTWPTOOLK-8572, which will be fixed in the next release versions.

The InheritBefore directive is supported only in Apache starting from the 2.3.10 version and above.

Resolution

Migrate to a server with the OS that supports Apache of the 2.3.10 version.

In case migration is not an option, apply one of the workarounds below:

Workaround 1: Replace apache.php from WP Toolkit 5.7
  1. Log into the server via SSH.
  2. Download attached apache.php file with the command:

    # wget https://plesk.zendesk.com/hc/article_attachments/12387453080983/apache.php

  3. Rename /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php file:

    # mv /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php_orig_58

  4. Copy downloaded apache.php to /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/ directory:

    # cp apache.php /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php

  5. Reconfigure affected example.com domain with the command:

    # plesk repair web example.com -y

    In case it is required to reconfigure all domains on the server, execute the following:

    # plesk repair web -y

    Note: during the execution of this command the websites will be temporarily unavailable, it is recommended to execute in on the maintenance window.

Workaround 2: Disable Security measurements 
  1. Log into Plesk.

  2. Go to WordPress > Security.

  3. Select example.com instance and press the Revert button:
    revert1.jpg
  4. Select the following options and press the Revert button:

    • Forbid execution of PHP scripts in the wp-includes directory
    • Block author scan
    • Enable bot protection

    revert3.jpg

Note: to revert these settings for multiple WP instances, in WordPress > Security page select all required instances, press the Revert button, then perform the same actions that are described in step №4.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.