nginx 'module "ngx_http_modsecurity_module.so" is not binary compatible' 에러 다루기

by antibiotics posted Jul 26, 2021
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

1.PNG

 

nginx 1.14.0에 modsecurity 모듈을 설치하자 위와 같이 "module ~ngx_http_modsecurity_module.so is not binary compatible ~" 에러를 뱉어내며 nginx 리로드에 실패합니다.

 

저는 nginx를 최신 버전인 1.18.0으로 업데이트하자 이 문제가 해결되었습니다.

 

# add-apt-repository ppa:nginx/stable

# apt update

# apt install nginx

 

# nginx -V

 

nginx를 업데이트하고 버전을 확인합니다.

 

# wget http://nginx.org/download/nginx-1.18.0.tar.gz

# tar xvzf nginx-1.18.0.tar.gz

# cd nginx-1.18.0/

# ./configure --with-compat --add-dynamic-module=../ModSecurity-nginx

# make modules

 

업데이트한 버전의 nginx 소스를 다운받고 동적 모듈을 다시 컴파일합니다.

 

# cp objs/ngx_http_modsecurity_module.so /usr/share/nginx/modules/

 

컴파일한 동적 모듈을 nginx에 복사합니다.

 

# systemctl restart nginx

 

nginx를 리로드하면 정상적으로 modsecurity가 적용됩니다.

 

 

nginx의 modsecurity 설정에 관한 내용은 아래 블로그에 잘 나와있어서 링크를 첨부합니다.

 

[Nginx ModSecurity 설치 및 설정 - Nginx 웹 방화벽]

https://hoing.io/archives/9487

 

 


  1. 우분투 무선 라우터(공유기) 만들기

    Date2020.08.16 Views3638
    Read More
  2. ASUS 공유기 ssh 접속

    Date2021.01.11 Views3268
    Read More
  3. [칼리리눅스 모의해킹] Xerosploit 소개 및 설치

    Date2020.01.19 Views2498
    Read More
  4. [칼리리눅스 모의해킹] Xerosploit 활용 서비스거부 공격 (Dos)

    Date2020.01.19 Views2045
    Read More
  5. Ubuntu 22.04에서 DNS 캐시 삭제(flush)하기

    Date2022.11.03 Views1963
    Read More
  6. SFTP 'Received message too long' 에러 처리

    Date2023.01.10 Views1778
    Read More
  7. dnsmasq 'failed to create listening socket for port 53' 에러 다루기

    Date2021.07.07 Views1679
    Read More
  8. Ubuntu Desktop 모니터별 배경화면 설정하기

    Date2022.11.26 Views1177
    Read More
  9. nginx 'module "ngx_http_modsecurity_module.so" is not binary compatible' 에러 다루기

    Date2021.07.26 Views933
    Read More
  10. Ubuntu Desktop 'Failed to set new fan speed' 에러 처리

    Date2023.01.15 Views848
    Read More
Board Pagination Prev 1 2 Next
/ 2

menu