Sunday , 2 April 2023
Home » Bài theo kỳ » Cài đăt Mod Security trên CENTOS (p2)

Cài đăt Mod Security trên CENTOS (p2)

Giới thiệu và cài đặt Mod_security (Phần 1)

Cài đặt Mod_security (Phần 1)

Cài đặt Mod_security (Phần 2)

 

Cài đăt Mod Security trên CENTOS (phần 2)

Trước khi đọc bài này mời các bạn tham khảo thêm:

+ Các lệnh CENTOS cơ bản tại đây

+Cài đặt Webserver, PHP, Mysql, Mod Security trên CentOS 6.x  Phần 1:

+Giới thiệu và cài đặt Mod_security Phần 1:

Nội dung phần cài đặt Mod Security trên CENTOS 6.x

1. Cài đặt thư viện cần thiết:

#yum install httpd-devel libxml2-devel pcre-devel apr-devel apr-util-devel curl-devel –y

#yum install gcc

install thu vien

2. Cài đặt mod_security

# yum install mod_security 

3. Cấu hình Apache

+ #vim /etc/httpd/conf/httpd.conf

Bỏ dấu # trước dòng:

LoadModule unique_id_module modules/mod_unique_id.so

Và thêm vào dòng:

LoadModule security2_module modules/mod_security2.so

httpd

+ Tạo file cấu hình cho Mod

#vi /etc/httpd/conf.d/modsecurity.conf

Thêm vào nội dung kiểm tra xem có hoạt động hay không như hình dưới

rules of modsecurity

4. Khởi động lại dịch vụ

#service httpd restart

restart apache

 5. Kiểm tra sự hoạt động của Mod Security

+ Mở trình duyệt vào nhập http://localhost/a?=zzz

error apache

+ Mở log các sự kiện ghi lại

log apache

Kết thúc chuổi bài viết cài đặt Mod Security trên các môi trường Windows, CENTOS

Chúc các bạn thành công:

http://anninhmang.net

Lượt xem (2807)

About Nguyễn Thanh Sơn

Nguyễn Thanh Sơn
Network Security, Web Design, Computer Science

Xem thêm

Ladipage Là Gì ? Vì Sao Được Nhiều Marketer Ưa Chuộng?

Menu bài viết [hide] 1 Lịch sử phát triển : 2 Những lợi thế của Ladipage : 3 Vì …

Để lại bình luận:

Loading Facebook Comments ...

Leave a Reply

Your email address will not be published. Required fields are marked *