安装导致Apache服务启动失败的mod_security

我使用这个教程http://www.linuxmaza ….安装了mod安全。 安装后,我得到了错误描述,并按照步骤来解决它。 我做的唯一不同的是从回购更新Apache,而不是先卸载。

Apache重启失败,错误日志告诉我这个:

更新:我卸载了Apache并做了一个干净的安装。 仍然收到相同的错误。

[Mon Feb 20 16:45:24 2012] [notice] caught SIGTERM, shutting down [Mon Feb 20 16:45:35 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Mon Feb 20 16:45:35 2012] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "astinf" Configuration Failed 

有一点谷歌search这个错误表明,你有astinf (我猜这是你的用户名…)在您的ApacheconfigurationServerName指令。

您可以将ServerName更改为将返回IP地址(例如localhost )的内容,也可以将其中的任何内容添加到/etc/hosts文件中。

如果你有问题, 这个答案表明SELinux可以阻止Apache读取你的/etc/hosts文件。