本文主要是介绍ubuntu12.0.4apache安装mod_security模块,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Ubuntu 12.0.4在apache加载mod_security模块
(文档省略make和make 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
第一次写博客,多多指教啊。
这篇关于ubuntu12.0.4apache安装mod_security模块的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!