apache 2.4에 modsecurity-2.9 설치 > Security

본문 바로가기
사이트 내 전체검색

Security

apache 2.4에 modsecurity-2.9 설치

페이지 정보

profile_image
작성자 HARULIFE
댓글 0건 조회 27,386회 작성일 20-11-24 12:01

본문

apache 2.4.12 에 modsecurity 2.9.0설치
 

download : https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz
수행 명령 :
yum install  expat expat-devel
 ./configure --with-apxs=/usr/local/apache/bin/apxs
make
make install
apache 설정파일 변경

vi /usr/local/apache/conf/httpd.conf
    LoadFile /usr/lib64/libxml2.so
    LoadFile /usr/lib64/liblua-5.1.so
    LoadModule security2_module modules/mod_security2.so
 

위설정을 마친뒤 룰을 적용시켜줘야한다.

 

저같은 경우는 룰셋을 적용시킬시 all.conf 라는 룰파일을 /usr/local/apache/conf/ 위치에 옮겨놓은뒤 httpd.conf 파일에서

Include conf/all.conf 줄을 삽입후 적용시켜준다.

 

적용한뒤 확인방법은 해당 도메인(ex>harulife.co.kr/cmd.ext) 를 했을시 Not Acceptable 에러가 출력된다면 정상적용된것이다.

 

만일 Not Found 라는 에러가 출력된다면 적용이 잘안된것이다. 아니면 Log를 통해서도 확인할수 있다.

 

일단 프록시로 구동되는거기때문에 더 추가적으로 열어줘야 할것이 있다.

 

LoadModule unique_id_module modules/mod_unique_id.so

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

 

이것들을 추가해줘야 정상적용 될것이다.

 

 

[오류]

configure: *** apr library not found.

configure: error: apr library is required

 
---->>>>>  yum install apr apr-devel apr-util

 

[오류]

configure: *** apu library not found.

configure: error: apu library is required

 

--------->>>>> yum install apr-util-devel

 

./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache --with-apu=/usr/local/apache

 

 

[오류]

/bin/ld: cannot find -lexpat error

 

-------- >>>>  yum install -y expat-devel

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

회사명 : HARULIFE / 대표 : HARULIFE
주소 : 검도 홍시 방구 해동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 방구 - 123호
개인정보관리책임자 : HARULIFE

  • 게시물이 없습니다.

접속자집계

오늘
554
어제
451
최대
1,968
전체
555,728
Copyright © 소유하신 도메인. All rights reserved.