Plugin Support
WFAdam
(@wfadam)
Hello @pyoorkate and thanks for reaching out to us!
Sometimes setting up Wordfence on Google VM can be tricky at first.
Let’s start with a diagnostic. 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.
Thanks!
Unfortunately, when I click send e-mail it fails – reporting “There was an error while sending the email.”
Plugin Support
WFAdam
(@wfadam)
I know with Google VM you are generally on your own for setting up SMTP / WP_mail as they don’t provide a ton of assistance.
On the diagnostic page, click “Export” and then could you email me at wftest @ wordfence . com the txt file it exports. If you could make the subject line your forum username.
Thanks!
I’ve added the SMTP sender – and theoretically at least, it’s sent the diagnostic report! 🙂
Plugin Support
WFAdam
(@wfadam)
Perfect! Thank you for sending that @pyoorkate
The first step we will need to take is to alter an apache config file to AllowOveride All.
Open your wordpress.conf file and add:
<Directory /var/www/html>
Options -Indexes
AllowOverride All
</Directory>
Navigate and check the config files in /etc/apache2/sites-available/ if one of those has its own AllowOverride set to a different value for /var/www/html, it would need to be changed in that file instead.
Once you have this setup, you should be able to optimize the firewall as normal. Open Wordfence > Firewall > Optimize the Firewall and select Apache + mod_php in the popup to complete.
Let me know how it goes or if you have any questions!
Thanks!
Hi,
I have two wordpress.conf files –
/etc/apache2/sites-available/wordpress.conf
/etc/apache2/sites-enabled/wordpress.conf
I edited both of them to include:
<Directory /var/www/html>
Options -Indexes
AllowOverride All
</Directory>
Then allowed wordfence to modify the .htaccess file and unfortunately returned to the 500 – Internal Server Misconfiguration error. Returning .htaccess to it’s previous configuration allows me to access the site, but obviously then I don’t have the firewall enabled…
Do you have any other thoughts, or did I miss something I need to edit first?
Thanks!
-
This reply was modified 5 years, 3 months ago by
pyoorkate.
Plugin Support
WFAdam
(@wfadam)
Let’s make sure that the other portion is correct as well.
So after you input that code into the conf files and then restart apache, let’s set the rest up manually.
Before we do this next step, back up your current htaccess file. Make sure nothing # Wordfence WAF currently exists in it.
Make sure anything
# Wordfence WAF
<IfModule mod_php7.c>
php_value auto_prepend_file '/path/to/waf/wordfence-waf.php'
</IfModule>
# END Wordfence WAF
Make sure to adjust the path to your path of the wordfence-waf.php which should be in your root directory along side your htaccess file.
Let me know how this does!
Thanks!
I’d actually forgotten to restart apache after updating .htaccess – sorry! Doing that seems to have fixed it 🙂