• Resolved winterstreet

    (@winterstreet)


    We host two websites at WP Engine. The first had Wordfence installed and working fine. To start the second site we duplicated the first, now I see an error message on the second site about corrupt config files and Wordfence can’t access …/wflogs to do something. But the path it references is for the 1st installation. I’ve looked all over but can’t find where that is, except maybe in a “BLOB” in the database. I’ve deleted the plugin and reinstalled it but I get the same error.

    The Wordfence Web Application Firewall cannot run. The configuration files are corrupt or inaccessible by the web server, which is preventing the WAF from functioning. Please verify the web server has permission to access the configuration files. You may also try to rebuild the configuration file by clicking here. It will automatically resume normal operation when it is fixed.

    We were unable to write to /nas/content/live/jjusadev/wp-content/wflogs/ which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support WFAdam

    (@wfadam)

    Hello @winterstreet and thanks for reaching out to us!

    This looks like the WAF is being pointed to the wrong location. It’s possible that the code in “.user.ini”, “.htaccess”, and/or “php.ini” related to the firewall optimization still mentions the previous path for the other site.

    https://www.wordfence.com/help/advanced/remove-or-reset/#migrate-with-wordfence is a good reference as well for moving a site over and activating the WAF.

    Let me know if this helps!

    Thanks!

    Thread Starter winterstreet

    (@winterstreet)

    Of those the only one I see on the server is a .htaccess file, and there isn’t a path specified in there. Is it possible the setup is different since it’s on WP Engine? Thanks for the assistance.

    Plugin Support WFAdam

    (@wfadam)

    Hello again @winterstreet

    Check your “WFWAF_LOG_PATH“ variable in wordfence-waf.php, is it set to anything?

    Could you go to the Tools > Diagnostics page and make sure that all checks in the Filesystem and Wordfence Config sections read OK?

    Can you see a wflogs directory being created under /wp-content and populated with several .php files?

    If it exists can you confirm the owner of the /wp-content/wflogs directory is the same as the user the web server runs as?

    In case it hasn’t been created please make sure that the wp-content/ directory is writable by the webserver, at least during the setup process; you can make wp-content/ unwritable as long as wp-content/wflogs/ has been created and remains writable by the webserver user.

    Let me know if this helps!

    Thanks!

    Thread Starter winterstreet

    (@winterstreet)

    Where would I look for wordfence-waf.php?

    For Diagnostics I see in red:

    PHP Environment PHP version, important PHP extensions.
    Process Owner – Unavailable

    Connectivity Ability to connect to the Wordfence servers and your own site.
    wp_remote_post() test back to this server failed! Response was: 401 Unauthorized
    This additional info may help you diagnose the issue. The response headers we received were:

    I see /wpcontent/wflogs but I don’t see any logs in there.

    But I think the issue is just that wrong path, I just don’t know where it’s coming from.

    Plugin Support WFAdam

    (@wfadam)

    @winterstreet

    For the 401 issues, you will have to check with WP Engine to make sure Wordfence isn’t being blocked. On WP Engine you wont be able to read or write to the wflogs. That is why we require MySQLi Storeage Engine on WP Engine.

    https://www.wordfence.com/help/firewall/mysqli-storage-engine/

    Can you send a diagnostic report to wftest @ wordfence . com? You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    We will review the diagnostic to see what is going on exactly.

    Thanks in advance!

    Thread Starter winterstreet

    (@winterstreet)

    Just sent.
    Thanks

    Plugin Support WFAdam

    (@wfadam)

    Hello @winterstreet

    Did you mean you sent the diagnostic? I am not able to locate it. Could you try again?

    Thanks!

    Thread Starter winterstreet

    (@winterstreet)

    I sent again, thanks.

    Thread Starter winterstreet

    (@winterstreet)

    Now when I try and update Woocommerce the update times out. I think because the site is looking for files it can’t reach. Also with Wordfence deactivated.

    [Fri Aug 21 18:56:15.799189 2020] [php7:notice] [pid 6723] [client 24.10.9.54:16070] Unable to open /nas/content/live/jjusadev/wp-content/wflogs/config-synced.php for reading and writing., referer: https://jeepadventureacademy.com/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [Fri Aug 21 18:56:15.800280 2020] [php7:notice] [pid 6723] [client 24.10.9.54:16070] Unable to open /nas/content/live/jjusadev/wp-content/wflogs/ips.php for reading and writing., referer: https://jeepadventureacademy.com/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [Fri Aug 21 18:57:08.380676 2020] [php7:notice] [pid 20530] [client 54.245.11.44:17284] Unable to open /nas/content/live/jjusadev/wp-content/wflogs/config-synced.php for reading and writing.

    Thread Starter winterstreet

    (@winterstreet)

    Not sure how I overlooked wordfence-waf.php in the root directory, I guess I didn’t look close enough. But that was it. Thanks for your help.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Firewall configuration problem on duplicated WP Engine site’ is closed to new replies.