Optimizing the Wordfence firewall results in Internal Server Error
-
It automatically selects “Apache + modphp” and as soon as I click it, I get a white error screen with “Internal Server Error” for all parts of the website.
Clicking it creates a .htaccess file with the following code in it
# Wordfence WAF <IfModule mod_php5.c> php_value auto_prepend_file '/home/y001/public_html/wordfence-waf.php' </IfModule> <Files ".user.ini"> <IfModule mod_authz_core.c> Require all denied </IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from all </IfModule> </Files> # END Wordfence WAF
It doesn’t create a .user.ini file either, only the .htaccess as far as I can tell.
Deleting the .htaccess file fixes the problem.
Please help!
Thanks
-
Hello csjamo83,
do you have access to your servers error logs? If so, could you check if there are any [error] entries that were created when this happened?Here’s a copy of the error log:
[Sun Apr 17 11:33:52 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 11:33:52 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/ [Sun Apr 17 11:33:55 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 11:33:55 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 11:34:13 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 11:34:13 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 11:39:14 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 11:39:14 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 12:16:48 2016] [alert] [client 122.20.131.138] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 12:16:53 2016] [alert] [client 122.20.131.138] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 12:16:56 2016] [alert] [client 122.20.131.138] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 12:23:20 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 12:23:20 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 12:26:22 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 12:26:22 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 12:42:28 2016] [alert] [client 122.20.131.138] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 12:42:29 2016] [alert] [client 122.20.131.138] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 13:11:34 2016] [alert] [client 122.20.131.138] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:01:22 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:01:22 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:03:00 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:03:00 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/ [Sun Apr 17 18:03:03 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:03:03 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:03:39 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:03:39 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:05:44 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration [Sun Apr 17 18:05:45 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:05:49 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration [Sun Apr 17 18:05:49 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration, referer: https://business.you-i.jp/ [Sun Apr 17 18:12:17 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:12:17 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:13:18 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:13:18 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:13:20 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:13:20 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:13:51 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:13:51 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:18:05 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:18:05 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:19:55 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend [Sun Apr 17 18:20:55 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend Sun Apr 17 18:21:57 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend [Sun Apr 17 18:23:57 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend [Sun Apr 17 18:25:57 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend [Sun Apr 17 18:26:57 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend [Sun Apr 17 18:28:51 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend [Sun Apr 17 18:29:33 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:29:33 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:30:04 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:30:04 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:30:37 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:30:38 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:34:39 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:34:39 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:37:23 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:37:23 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:39:29 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here [Sun Apr 17 18:39:29 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin [Sun Apr 17 18:46:59 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend¤tAutoPrepend [Sun Apr 17 18:46:59 2016] [alert] [client 60.35.215.88] /home/y001/public_html/.htaccess: php_value not allowed here, referer: https://business.you-i.jp/wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend&wafVerify=7a46708b5a¤tAutoPrepend= [Sun Apr 17 18:56:24 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/favicon.ico, referer: https://business.you-i.jp/wp-login.php?loggedout=true [Sun Apr 17 23:16:08 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/you-i, referer: https://business.you-i.jp/ [Sun Apr 17 23:16:08 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/favicon.ico, referer: https://business.you-i.jp/you-i/concept [Sun Apr 17 23:16:14 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/services, referer: https://business.you-i.jp/ [Sun Apr 17 23:16:36 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/kr, referer: https://business.you-i.jp/ [Mon Apr 18 08:48:44 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/favicon.ico, referer: https://business.you-i.jp/en/ [Mon Apr 18 09:12:20 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/concept, referer: https://business.you-i.jp/ [Mon Apr 18 09:12:26 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/services, referer: https://business.you-i.jp/ [Mon Apr 18 09:12:48 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/concept, referer: https://business.you-i.jp/wp-admin/post.php?post=16&action=edit [Mon Apr 18 09:13:12 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/concept, referer: https://business.you-i.jp/wp-admin/post.php?post=16&action=edit [Mon Apr 18 09:14:17 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/link, referer: https://business.you-i.jp/wp-admin/edit.php?post_type=page [Mon Apr 18 09:14:37 2016] [error] [client 60.35.215.88] File does not exist: /home/y001/public_html/contact, referer: https://business.you-i.jp/
Hello csjamo83,
okay so it looks like the code Wordfence is adding to your .htaccess is not working due to some specific configurations on your server. If you go to Wordfence “Diagnostics” page and at the very bottom click on the link that says “Click to view your system’s configuration in a new window” what does it say under the section “Server API”?Hi. It says Apache 2.0 Handler
Thanks csjamo83,
this confirms that the option Wordfence is choosing for your installation is correct. I think that your host may be blocking the method Wordfence is using to initiate the firewall. There is more information on problem solving this kind of installation issue here . Do you think you could send a link to this forum thread along with that link to your web host and see if they can help you solve the issue?My webhost is in Japan. So I doubt they could help as they can’t read English.
I don’t really have time to fix it, so I’m hoping it’s addressed in a future version.
Other than this small issue, I’m really happy using Wordfence. Thanks for the great product!
Alright csjamo83. The “auto_prepend_file” in .htaccess is needed for the feature “Web Application Firewall” (WAF) but you can run Wordfence without WAF. WAFs primary job is to intercept attacks before plugins and themes have loaded. Wordfence will still keep your site protected without it, it just won’t be doing so as effectively as possible.
- The topic ‘Optimizing the Wordfence firewall results in Internal Server Error’ is closed to new replies.