Bobcares

Unknown option ‘InheritBefore’ | Fix Methods

by | Nov 26, 2022

Let’s work on Web reconfiguration in Plesk fails: Unknown option ‘InheritBefore’. At Bobcares our Server Management Support Services can give you a detailed note on the process.

Unknown option ‘InheritBefore’ Symptoms

Unknown option 'InheritBefore'

  • The server is running on the RHEL-based OS of version 6 with the Apache 2.2 version.
 
  • WordPress Toolkit with an upgraded version.
 

To perform web reconfiguration, the below error appears:

 

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

 

Cause

 

The WordPress Toolkit bug with the ID “#EXTWPTOOLK-8572″, which will fix in the next release versions.

 

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

 

Resolution

 

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

 

In case of migration is not an option, then apply one of the methods as shown:

 

Method 1: Replace apache.php from WordPress Toolkit 5.7

 

Log into the server via SSH.

 

Download attached apache.php file with the command:

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

 

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

 

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

 

Reconfigure affected website.com domain with the command:

plesk repair web website.com -y

 

In case if required to reconfigure all domains on the server, execute the below command:

plesk repair web -y

 

During the execution of this command, we can note that the websites will be temporarily unavailable. So it is recommended to execute in on the maintenance window.

 

Method 2: Disable Security measurements

 

First Log into Plesk.

 

Then Go to WordPress >> Security.

 

Select website.com instance and press the Revert button:

 

1. Need to forbid the execution of PHP scripts in the wp-includes directory.

 

2. Block author scan.

 

3. Enable bot protection.

 

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

 

[Looking for a solution to another query? We are just a click away.]

 

Conclusion

 

To conclude, we have checked two methods of resolution about the Unknown option ‘InheritBefore’ during the web reconfiguration in Plesk fails. InheritBefore directive is only supported in Apache.  This starting from the 2.3.10 version and above.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.