Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Is there a clear documentation to describe the solution?

It's very common and also necessary.

share|improve this question
up vote 0 down vote accepted

Maybe this blogpost is useful for you. It explains how to setup modsecurity2 with apache on debian BUT it is written in german. It should be understandable if you only read the "commands" which are in english anyway.

  1. Update your sources.list
  2. apt-get install libapache2-mod-security2
  3. vi /etc/apache2/apache2.conf
    Add the following:

    <IfModule mod_security2.c>
    # Basic configuration options
     SecRuleEngine On
     SecRequestBodyAccess On
     SecResponseBodyAccess Off
    # Handling of file uploads
    # TODO Choose a folder private to Apache.
    # SecUploadDir /opt/apache-frontend/tmp/
    SecUploadKeepFiles Off
  4. Restart apache /etc/init.d/apache2 restart

share|improve this answer
unwichtich, could you please add details on running clamav on uploaded files? – Deer Hunter May 21 '13 at 16:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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