繁体   English   中英

在EC2上安装mod_security

[英]Installing mod_security on EC2

我正在尝试使用yum install mod_security安装mod_security但是我收到此错误

Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                                                           | 2.1 kB     00:00
amzn-updates/latest                                                                        | 2.3 kB     00:00
Resolving Dependencies
--> Running transaction check
---> Package mod_security.x86_64 0:2.7.3-3.23.amzn1 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_security-2.7.3-3.23.amzn1.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.2.27-1.2.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.27-1.2.amzn1 for package: httpd-2.2.27-1.2.amzn1.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.27-1.2.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.9-1.55.amzn1.x86_64 conflicts httpd < 2.4.9
--> Processing Conflict: httpd24-tools-2.4.9-1.55.amzn1.x86_64 conflicts httpd-tools < 2.4.9
--> Finished Dependency Resolution
Error: httpd24 conflicts with httpd-2.2.27-1.2.amzn1.x86_64
Error: httpd24-tools conflicts with httpd-tools-2.2.27-1.2.amzn1.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我已经删除了httpd24-tools-2.4.9-1.55.amzn1.x86_64和httpd24-2.4.9-1.55.amzn1.x86_64

sudo yum install mod24_security.x86_64

然后

sudo service httpd restart

得到了同样的错误。

使用以下命令删除apache和工具版本24和27。

yum remove httpd httpd-tools

然后能够成功安装没有任何版本冲突Check once

您可以运行命令:

# yum install mod_security

mod_security配置文件:

1)/etc/httpd/conf.d/mod_security.conf - mod_security Apache模块的主配置文件。

2)/etc/httpd/modsecurity.d/ - mod_security Apache的所有其他配置文件。

3)/etc/httpd/modsecurity.d/modsecurity_crs_10_config.conf - 在部署之前,应根据您的特定要求自定义此文件中包含的配置。

4)/var/log/httpd/modsec_debug.log - 使用调试消息来调试mod_security规则和其他问题。

5)/var/log/httpd/modsec_audit.log - 记录触发ModSecurity事件(检测到的)或serer错误的所有请求(“RelevantOnly”)都记录在此文件中。

有关更多信息,请查看有关如何设置的文章o CentoOS: http ://www.cyberciti.biz/faq/rhel-fedora-centos-httpd-mod_security-configuration/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM