ubuntu12.0.4apache安装mod_security模块

Ubuntu 12.0.4apache加载mod_security模块

(文档省略makemake install)

1.安装apr

 ./configure --prefix=/usr/local/apr

出现这句话 cannot remove `libtoolT': No such file or directory 

打开configure文件

gedit configure

修改大概29525行  RM='$RM  -f' 

2.安装apr-util

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

3.安装libxml2

apt-get install libxml2-dev

4.安装Libssh

apt-get install libssh-dev

5.安装Curl

apt-get install curl libcurl3 libcurl3-dev php5-curl 

6.安装lua

apt-get install liblua5.1-0-dev

7.安装Mysql

apt-get install mysql-server mysql-client php5-mysql

8安装mod_security模块

1./configure --prefix=/usr/mod

1)configure: looking for Apache module support via DSO through APXS

configure: error: couldn't find APXS

apt-get install apache2-dev

(2)make

(3)make install

 

9.安装php

apt-get install php5 libapache2-mod-php5

10安装Apache2

apt-get install apache2

模块在/usr/lib/apache2/modules

重启Apache的时候出现apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

解决办法:当httpd.conf为空时在/etc/apache2/apache2.conf中加上

ServerName localhost

然后重启,错误消失

./apachectl -t -D DUMP_MODULES

查看安装的模块

/etc/apache2/mods-enabled中创建一个文件modsecurity.load,

在里面加上

LoadModule security2_module /usr/lib/apache2/modules/mod_security2.so

httpd.conf中加上

Include /etc/apache2/mod_security.conf

Include /root/modsecutiry-apache_2.7.7/iis/wix/modsecurity_crs_10_setup.conf

第一次写博客,多多指教啊。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值