[Nginx] ModSecurity 網站伺服器安全性模組編譯與安裝方法

本篇文章更新時間:2019/02/16
如有資訊過時或語誤之處,歡迎使用 Contact 功能通知。
一介資男的 LINE 社群開站囉!歡迎入群聊聊~
如果本站內容對你有幫助,歡迎使用 BFX Pay 加密貨幣新台幣 贊助支持。


這套如果是用在 Apache 上可以很無痛,但要在 Nginx 架構下使用就有一點多毛了。

測試環境: Ubuntu 16.04 / nginx 1.10.3


apt update apt upgrade apt install gcc make libtool automake bison autoconf libxml2-dev libcurl4-openssl-dev pkgconf apache2-dev libpcre3-dev git clone https://github.com/SpiderLabs/ModSecurity.git cd ModSecurity ./autogen.sh ./configure --enable-standalone-module make

到這邊沒意外應該就 build 好 Nginx 模組檔案了。

下一步是重新編譯 Nginx ,把這模組給掛上去


cd /path/to/nginx/src/ ./configure --add-module=/path/to/ModSecurity/nginx/modsecurity make make install

搞定! 不過其實這中間有個雷,就是 error: couldn't find APXS 的問題,根據使用者 feedback 的 issue,他還沒有跟 Apache 解耦合,還會要用到 Apache 的資源。還需要裝 apache2-dev 這套(上述已加上)。

#技術相關 #編譯 #安裝

- Powered by Mxp.TW -FB2WP-


Share:

作者: Chun

資訊愛好人士。主張「人人都該為了偷懶而進步」。期許自己成為斜槓到變進度條 100% 的年輕人。[///////////____36%_________]

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *


文章
Filter
Apply Filters
Mastodon