Hi @robertdrost,
This can sometimes be due to the software running your webserver, so I think getting a picture of that setup would be the best place to start.
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.
Note: For the fastest response time, please make sure and add any information or questions directly to this topic and not the email address above unless asked.
Thanks,
Peter.
Hi @wfpeter
thanks for your quick response!
I sent you the report a minute ago.
Thanks a lot,
Robert
Hi @robertdrost, thanks for sending that over.
From the diagnostic, it looks like your Server API is CGI/FastCGI. If you could use FTP or a file manager to access your .htaccess file in the root directory and make sure this code is inserted:
# 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
Then also, in the same directory, edit your .user.ini file with this code:
; Wordfence WAF
auto_prepend_file = '/var/www/vhosts/robstoop.nl/httpdocs/wordfence-waf.php'
; END Wordfence WAF
Make sure you don’t have any files hidden and if the .user.ini doesn’t exist in your root directory, you can create one and add the code above.
Once you have this code in place, your firewall should be optimized. If you visit your Wordfence > Firewall page, you should see 84% (which is the max a free customer can reach).
Thanks again,
Peter.
Hi Peter,
thank you for looking at the diagnostic report.
Unfortunately we now get a 500 internal server error. Could it be that the code for the .user.ini is wrong? The path /var/www/vhosts/robstoop.nl/httpdocs/wordfence-waf.php
seems not right.
Somehow I still have the suspicion that Wordfence cannot find .htaccess at all. It is also not suggested for download in the “Optimize Wordfence Firewall” popup.
Robert
Could it be that the code for the .user.ini is wrong? The path /var/www/vhosts/robstoop.nl/httpdocs/wordfence-waf.php seems not right.
that actually was the problem. I managed to find out the right path and now it works.
Thanks a lot for your support @wfpeter
Robert
Hi @robertdrost,
That’ll teach me to grab a code snippet too eagerly, I normally insert path/to/your/site/httpdocs...
but I had recently overwritten it. Glad you spotted that and inserted the correct path. Really pleased to hear that solution worked for you and have been enjoying Worfence!
If you need help in the future, by all means start up a new topic and we’ll be glad to help any time!
Peter.