[英]How to compile modsecurity on Ubuntu?
我按照modsecurity開發指南中的(Building Custom ModSecurity Modules)節中的說明進行操作 ,以便使用命令apxs -ca mod_tfn_reverse.c
編譯(mod_tfn_reverse.c) apxs -ca mod_tfn_reverse.c
,我仍然發現“致命錯誤”,例如unable to find the file modsecurity.h
C文檔的標題中提到unable to find the file modsecurity.h
。
這是github modsec上的源鏈接
我做的指示:
mod_tfn_reverse.c
所在的mod_tfn_reverse.c
。 它的路徑:ModSecurity / ext / mod_tfn_reverse.c
CD modsecurity/ext
。 apxs -ca mod_tfn_reverse.c
。 這些是我執行的指令,apxs可以工作,但是編譯失敗,因為未找到標頭中聲明的“ modsecurity.h”,我搜索了該文件,並在另一個目錄(ModSecurity / apache2 / modsecurity.h)中找到了該文件。
因此,困難在於,如何才能成功編譯該特定文件並使模塊完成並准備在apache2服務器中使用。 我還對以下其他所需的其他歸檔文件,標頭和開發工具感到困惑:
mod_tfn_reverse.c
,知道這只是為modsecurity創建自定義模塊的起點。 這包含在自述文件中:
apxs -I<MODSECURITY_SOURCE_CODE> -I/usr/include/libxml2 \
-ca mod_tfn_reverse.c
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.