Chapter 1. Installation and Configuration
This chapter deals with the installation and basic configuration of ModSecurity. In this chapter you will learn about the following, among other things:
Which additional libraries are required to compile ModSecurity
How to compile ModSecurity from source
How to integrate ModSecurity with Apache
Getting the basic configuration for ModSecurity in place
Testing that ModSecurity is working correctly
If you're new to ModSecurity I would recommend that you set it up on a test server while you get acquainted with the ins and outs of using it. You wouldn't want to deploy it on a production server only to find out a few days later that you've been blocking everyone in Europe from accessing your server because of a misconfiguration. (For more on blocking users from specific countries, see Chapter 2, Writing Rules.)
The installation instructions in this chapter show you how to compile ModSecurity from source. Some Linux distributions also make packages for ModSecurity available, but since compiling from source guarantees you will get the latest version of ModSecurity that is what we'll be doing in this chapter.