[root@centos ~]# yum install -y httpd.i386
[root@centos ~]# chkconfig httpd on
[root@centos ~]# service httpd start
2. Yum needed packages
[root@centos ~]# yum install pcre* libxml2* libcurl* lua* libtool openssl -y
3. Download mod_security source file at http://www.modsecurity.org/download/. In this case I will download modsecurity-apache_2.6.2.tar.gz :
[root@centos ~]# cd /usr/local/src
[root@centos ~]# tar -xzf modsecurity-apache_2.6.2.tar.gz
4. Extract the downloaded files, navigate to the folder, configure and install:
[root@centos ~]# cd modsecurity-apache*
[root@centos modsecurity-apache]# ./configure
[root@centos modsecurity-apache]# make
[root@centos modsecurity-apache]# make install
5. Copy the ModSecurity configuration file into Apache configuration directory:
[root@centos ~]# cp modsecurity.conf-recommended /etc/httpd/conf.d/modsecurity.conf
6. Activate the mod_security and unique_id modules in Apache configuration file. Open /etc/httpd/conf/httpd.conf via text editor and add following line:
LoadModule security2_module modules/mod_security2.so
LoadModule unique_id_module modules/mod_unique_id.so
7. Now we need to turn on the protection in ModSecurity configuration file. Open /etc/httpd/conf.d/modsecurity.conf via text editor and change following line:
SecRuleEngine DetectionOnly
To:
SecRuleEngine On
8. Restart Apache so mod_security can be loaded into Apache environment:
[root@centos ~]# service httpd restart
Done! Your website now has been protected with Apache ModSecurity. You can tweak the rules inside modsecurity.conf files to suit your website requirement.
Oracle voyance astrologie vie anterieure
ReplyDeleteAlso visit my web site :: voyance gratuite par telephone