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

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
Thanks for the tutorial. But should I exclude all pages that runs queries? Eg: Users can search for old posts and delete their own posts on my website, would modsecurity block those queries?
Off topic, I am running my application together with cloudflare (pro plan), their support told me that I dont have to install and setup modsecurity myself since its included in their plan, is that something you can confirm? I just feels safer to have it installed my self aswell.
@KiwoT: I believe Cloudflare does indeed have mod_security-like functionality included out of the box so you do not have to install it on your droplet.
<blockquote>But should I exclude all pages that runs queries? Eg: Users can search for old posts and delete their own posts on my website, would modsecurity block those queries? </blockquote> No. You should exclude phpmyadmin since the SQL queries are passed in request itself. If you page accepts input and writes the SQL query itself (i.e. most apps, such as a forum, blog, etc.) you do not need to exclude this page. It is even recommended to have mod_security enabled on those pages.
@KiwoT Even though Cloudflare claims to have something similar to mod_security it doesn’t offer that much protection.
Have a look at this report on Cloudflare vs mod_security vs Incapsula http://zeroscience.mk/files/wafreport2013.pdf
Hello.
I have a problem with symbolic links to the rules. If I create these symlinks into /usr/share/modsecurity-crs/activated_rules/ and then try reload Apache with sudo service apache2 reload, I got the following error:
Syntax error on line 25 of /usr/share/modsecurity-crs/activated_rules/modsecurity_crs_41_sql_injection_attacks.conf Error creating rule: Could not open phrase file “/usr/share/modsecurity-crs/activated_rules/modsecurity_41_sql_injection_attacks.data”: No such file or directory …fail!
Then Apache does not start.
Thanks for the tutorial. Greetings.
@Kaurer: What OS are you using? What’s the output of <pre>ls -lah /usr/share/modsecurity-crs/activated_rules/modsecurity_41_sql_injection_attacks.data</pre>?
Hi @Kamal.
The OS is Ubuntu 12.04 32bit.
Output of ls: ls: can not access /usr/share/modsecurity-crs/activated_rules/modsecurity_41_sql_injection_attacks.data: No such file or directory
Thank you.
@Kaurer: The file seems to be missing, try disabling it: <pre>mv /usr/share/modsecurity-crs/activated_rules/modsecurity_crs_41_sql_injection_attacks.conf /usr/share/modsecurity-crs/modsecurity_crs_41_sql_injection_attacks.conf.original</pre>
@Kamal, it worked. But what if I do not include anything in the directory “activated_rules”?
Thank you!
@Kaurer: No rules will be loaded, which means that it would have the same effect as disabling mod_security completely.