mod_security on Apache
페이지 정보
작성자
본문
mod_security on Apache
ModSecurity is a web application firewall for the Apache web server. In addition to providing logging capabilities, ModSecurity can monitor the HTTP traffic in real time in order to detect attacks. ModSecurity also operates as a web intrusion detection tool, allowing you to react to suspicious events that take place at your web systems.
Contents
Installing ModSecurity
Before you install ModSecurity, you'll want to have a LAMP stack set up on your Linode. For instructions, see the LAMP Guides.
Ubuntu / Debian
To install ModSecurity on a Linode running Ubuntu or Debian, enter the following commands, one by one:
sudo apt-get install libxml2 libxml2-dev libxml2-utils sudo apt-get install libaprutil1 libaprutil1-dev sudo apt-get install libapache-mod-security
ModSecurity is now installed on your Linode.
CentOS / Fedora
To install ModSecurity on a Linode running CentOS or Fedora, perform the following steps:
-
Install the GCC compiler and the dependancies by entering the following commands, one by one:
sudo yum install gcc make sudo yum install libxml2 libxml2-devel httpd-devel pcre-devel curl-devel
-
You'll need to install mod_security from source as there is no maintained package CentOS or Fedora yet. Grab the mod_security package and install it by entering the following commands, one by one:
cd /usr/src wget http://www.modsecurity.org/download/modsecurity-apache_2.6.2.tar.gz tar xzf modsecurity-apache_2.6.2.tar.gz cd modsecurity-apache_2.6.2 ./configure make install cp modsecurity.conf-recommended /etc/httpd/conf.d/modsecurity.conf
-
Now you'll need to modify your Apache configuration to load the ModSecurity module. Find the LoadModule section in httpd.conf and add this line to the end:File:/etc/httpd/conf/httpd.conf
LoadModule security2_module modules/mod_security2.so
-
Restart Apache by entering the following command:
sudo /etc/init.d/httpd restart
ModSecurity is now installed on your Linode.
관련링크
댓글목록
등록된 댓글이 없습니다.