依赖情况
- ngx_http_modsecurity_module
ldd ./ngx_http_modsecurity_module.so
linux-vdso.so.1 => (0x00007fffb6be9000)
libmodsecurity.so.3 => /usr/local/modsecurity/lib/libmodsecurity.so.3 (0x00007fcdf8934000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcdf8566000)
librt.so.1 => /lib64/librt.so.1 (0x00007fcdf835e000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fcdf80fc000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fcdf7df4000)
libm.so.6 => /lib64/libm.so.6 (0x00007fcdf7af2000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcdf8f6e000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fcdf78dc000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcdf76c0000)
- ngx_http_security_headers_module
ldd ./ngx_http_security_headers_module.so
linux-vdso.so.1 => (0x00007ffe37e8a000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb369deb000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb36a3bc000)
[root@iZj6ca3rrzc8abfbfmestyZ modules]# client_loop: send disconnect: Broken pipe
构建
推荐直接基于源码构建,对于rpm包需要依赖libmodsecurity,此模块可以独立为一个rpm 或者直接一起安装
参考资料
https://github.com/GetPageSpeed/ngx_security_headers
https://github.com/SpiderLabs/ModSecurity-nginx
https://github.com/SpiderLabs/ModSecurity
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
https://www.cnblogs.com/rongfengliang/p/8453031.html
https://github.com/patsevanton/ModSecurityV3-Nginx-rpm
https://nginx-extras.getpagespeed.com/modules
https://www.nginx.com/blog/creating-installable-packages-dynamic-modules/
https://nginx.org/packages/mainline/centos/7/SRPMS/
https://fedoraproject.org/wiki/Archive:BuildingPackagesGuide?rd=Docs/Drafts/BuildingPackagesGuide#Case_Study:_OpenEXR