Report this

What is the reason for this report?

403 Forbidden after installing Mod_security

Posted on November 3, 2013

Hi,

I installed Mod_security on Ubuntu 12.04 x32 following this tutorial: http://www.thefanclub.co.za/how-to/how-install-apache2-modsecurity-and-modevasive-ubuntu-1204-lts-server

and now I receive 403 Forbidden error on every page/folder on my website: You don’t have permission to access / on this server You don’t have permission to access /phpmyadmin on this server

I created /etc/modsecurity/modsecurity_custom_rules.conf and I could probably add custom rule for every specific case i.e. <Directory “/var/www/somefolder”> <IfModule security2_module> SecRuleEngine Off </IfModule> </Directory>

but is there a simpler way to add more general rules?

Also is it normal after installing Mod_security to get blocked completely or I did something wrong during the installation?

Thanks in advance



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try disabling the experimental routes.

check the status of SELinux <br> <br># vi /etc/selinux/config
<br># SELINUX=disabled -> SELINUX=enforcing <br>save & exit <br># setenforce 0 <br> <br>It will be fine! <br>

you get? Good … I had this problem installing zpanel with apache2 … and I only comment on the <directory> … / etc/apache2/apache2.conf, al the virtual host worked nicely <br> <br>OS: Ubuntu 12 LTS

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.