• Resolved jahrat

    (@jahrat)


    My site went down for a few hours yesterday. My hosting company identified the root as the htaccess file and replaced it with a generic copy. The site is back up but I have copies of the logs at the time of failure. Two plugins wrote rules to this file. I have sent this info to the other vendor along with copies of the files. I would like to send them to you securely for review and possible identification of the cause. How do I accomplish this? A partial extract from the htaccess is below.

    Wordfence WAF
    Require all denied
    Order deny,allow
    Deny from all
    END Wordfence WAF

    I am using the free Wordfence version 7.11.7, WordPress 6.6.2 and PHP 8.3.6.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @jahrat, thanks for asking about this.

    The example from the .htaccess above has been edited by the forum to remove markup (I think), but it resembles the code we add when a scan alerts you to a publicly visible .user.ini file:

    # Wordfence WAF
    <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

    That shouldn’t prevent the site from loading, simply viewing the file in a browser. You could choose to omit this if you believe it is causing problems though. The more common problem that could prevent a site from loading is if the path to wordfence-waf.php is incorrect in .htaccess, resulting in a 500 error – which may present as a blank page in a browser:

    ; Wordfence WAF
    auto_prepend_file = '/your/path/to/wordfence-waf.php'
    ; END Wordfence WAF

    Either way, that’s not a plugin conflict, but the firewall will run in Basic Protection rather than Extended Protection if that line is omitted. To combat the problems with your site loading it’s important that the path to wordfence-waf.php is correct, although the Optimization Wizard inside the plugin should detect that path correctly. Are the hosting company able to confirm which .htaccess change was causing the errors from the server logs?

    Many thanks,
    Peter.

    Thread Starter jahrat

    (@jahrat)

    Hi Peter,

    Thanks for the reply. They did not indicate a specific line for the problem but rather replaced the entire file with an older copy of a working file. I do not see your auto prepend command in either of those files.

    As far as the server log goes, the last entries in the error log are below (redacted)
    [core:alert]…/…/gmc-mca.org/.htaccess: # without matching # section
    [core:alert]…/…/gmc-mca.org/.htaccess: # without matching # section, referer: https://gmc-mca.org
    [core:alert] …/…/gmc-mca.org/.htaccess: # without matching # section, referer: https://gmc-mca.org/events/…/
    [core:alert] …/…/gmc-mca.org/.htaccess: # without matching # section
    [core:alert] … /…/gmc-mca.org/.htaccess: # without matching # section
    [core:alert] … /…/gmc-mca.org/.htaccess: # without matching # section

    As mentioned, however, the only references in the htaccess are from waf, rsssl and cache..

    Plugin Support wfpeter

    (@wfpeter)

    Hi @jahrat,

    That’s interesting because that might suggest the # Wordfence WAF section was opened without # END Wordfence WAF following it at the end. Is there any chance it presented without the # in the file rather than just here on the forum? Having said that, because the problematic section isn’t specifically named I can’t be certain there wasn’t other code created by another plugin that also wasn’t “closed” in this way.

    Thanks again,
    Peter.

    Thread Starter jahrat

    (@jahrat)

    You are correct in that the excerpt was not accurate. The hashtags are all there.

    I will close this topic as it does not seem like a conflict caused by wordfence.

    Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.