簡體   English   中英

如何在Ubuntu上編譯modsecurity?

[英]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上的源鏈接

我做的指示:

  1. 我正在使用Ubuntu 14.4 64位(帶有更新的新安裝)。
  2. 我安裝了“ apache dev”軟件包,以便在終端上運行“ APXS”命令。
  3. 從github下載了“ modsecurity” zip文件。
  4. 我解壓縮了zip文件,然后找到了mod_tfn_reverse.c所在的mod_tfn_reverse.c

它的路徑:ModSecurity / ext / mod_tfn_reverse.c

  1. 然后,將文件夾放置在“ home”中,然后將目錄更改為目標文件CD modsecurity/ext
  2. 最后,我執行了命令apxs -ca mod_tfn_reverse.c

這些是我執行的指令,apxs可以工作,但是編譯失敗,因為未找到標頭中聲明的“ modsecurity.h”,我搜索了該文件,並在另一個目錄(ModSecurity / apache2 / modsecurity.h)中找到了該文件。

因此,困難在於,如何才能成功編譯該特定文件並使模塊完成並准備在apache2服務器中使用。 我還對以下其他所需的其他歸檔文件,標頭和開發工具感到困惑:

  1. 編譯自定義的apache模塊。
  2. 在我的情況下,要編譯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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM