Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Greetings Serverfaultians. I'm not a server guy as you can see from my noob score of 1 point. But maybe those more versed can help me.

I'm using Ubuntu v13.10 32-bit Server and Apache2 v2.4.6 and I'm trying to set up and configure modsecurity and modevasive on an internet-exposed production/test server. I am trying to follow this tutorial:

But at step 3:

Now add these rules to Apache2. Open a terminal window and enter:

sudo vi /etc/apache2/mods-available/mod-security.conf

This file does not exist. Any suggestions?

share|improve this question

closed as off-topic by Iain, Falcon Momot, Jenny D, mdpc, Tom O'Connor Jun 12 '14 at 13:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Iain, Falcon Momot, Jenny D, Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

If the file doesn't exist then you need to contact the author of the tutorial and get them to fix it. – Iain Jun 10 '14 at 21:11
Try going back to step 1. Sounds like you skipped it. – Michael Hampton Jun 10 '14 at 21:11
Don't know if you guys are being facetious--I followed all the steps. Anyway I tried to comment on that blog, but am getting 404 errors. Nevertheless, I may have found the solution in another answer. – TechMedicNYC Jun 10 '14 at 21:16
up vote 3 down vote accepted

Probably you're using Ubuntu 14.04. there are a couple of changes on that version. To add the rules you want, edit the following file instead:

sudo vi /etc/apache/mods-enabled/security2.conf
share|improve this answer
I'm using v13.10, but the solution is the same. – TechMedicNYC Jun 11 '14 at 16:44

The answer was found on stackoverflow. Strange place for a server question. Regardless, it may help others: Trying to setup mod-security but mod-security.conf is missing

The file is named /etc/apache2/mods-available/security2.conf and it is enabled by default after modsecurity install.

# make changes to security2.conf
a2dismod security2
a2enmod security2
service apache2 restart

Similarly, modevasive is now /etc/apache2/mods-available/evasive.conf.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.