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. Ubuntu에서 키보드 백라이트(조명) 밝기 설정하기

    Date2023.08.03 Views80
    Read More
  2. ident 데몬(oidentd) 활용한 ident 서비스 구축하기

    Date2023.07.05 Views62
    Read More
  3. Pop!_OS 22.04 LUKS 파티션에서 수동 TRIM이 작동하지 않는 문제

    Date2023.04.08 Views57
    Read More
  4. Ubuntu Desktop 'Failed to set new fan speed' 에러 처리

    Date2023.01.15 Views163
    Read More
  5. SFTP 'Received message too long' 에러 처리

    Date2023.01.10 Views789
    Read More
  6. Ubuntu Desktop 모니터별 배경화면 설정하기

    Date2022.11.26 Views391
    Read More
  7. ZFS trim 실행 및 autotrim 설정하기

    Date2022.11.03 Views103
    Read More
  8. Ubuntu 22.04에서 DNS 캐시 삭제(flush)하기

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

    Date2021.07.26 Views283
    Read More
  10. dnsmasq 'failed to create listening socket for port 53' 에러 다루기

    Date2021.07.07 Views905
    Read More
Board Pagination Prev 1 2 Next
/ 2

menu