【发布时间】:2015-11-16 15:56:49
【问题描述】:
按照modsecurity dev guide 中(构建自定义ModSecurity 模块)部分中的说明使用apxs -ca mod_tfn_reverse.c 命令编译(mod_tfn_reverse.c)后,我仍然发现“致命错误”,例如unable to find the file modsecurity.h在 C 文档的标题中提到。
这里是github上的源链接modsec
我做的说明:
- 我使用的是 Ubuntu 14.4 64 位(带有更新的全新安装)。
- 我安装了“apache dev”包,在终端上运行“APXS”命令。
- 从 github 下载“modsecurity”zip 文件。
- 我提取了 zip 文件,然后找到了
mod_tfn_reverse.c所在的位置。
它的路径:ModSecurity/ext/mod_tfn_reverse.c
- 然后我把目录改成目标文件
CD modsecurity/ext当我将文件夹放在“home”中时。 - 最后,我执行了命令
apxs -ca mod_tfn_reverse.c。
这些是我做的指令,apxs 工作,但是编译失败,因为没有找到头文件中声明的“modsecurity.h”,我搜索了这个文件,我在另一个目录中找到了它(ModSecurity/apache2/modsecurity.h) .
因此,困难在于,我如何才能成功编译该特定文件并完成模块并准备好在 apache2 服务器中使用。 我还对以下所需的其他档案、标头和开发工具感到困惑:
- 编译自定义 apache 模块。
- 编译
mod_tfn_reverse.c,就我而言,知道这只是为modsecurity创建自定义模块的起点。
【问题讨论】:
-
我建议您在另一个 StackExchange 社区 askubuntu.com 上提问,在那里您将获得更专业的帮助。