欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

apache httpd2.4.4安装mod_ssl 有大用

玩了几天httpd,今天看到https的部分 

官方文档:http://httpd.apache.org/docs/2.4/en/ssl/ssl_howto.html 

结果第一行就傻眼了 
   
Directive代码  收藏代码            
  1. LoadModule ssl_module modules/mod_ssl.so  


问题是我的modules目录下根本就没有mod_ssl.so文件,说明我的httpd没这个模块 

应该是我编译httpd的时候就没弄对,又查了下文档,应该用这个命令: 
   
Shell代码  收藏代码            
  1. ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl  


重点就是--enable-ssl 

但是又报了一个错误: 

checking for OpenSSL version >= 0.9.7… FAILED 
configure: WARNING: OpenSSL version is too old 
no 
checking whether to enable mod_ssl… configure: error: mod_ssl has been requested but can not be built due to prerequisite failures 

我的操作系统是ubuntu12.04,用openssl version -a命令看了下,明明已经安装了,版本还是1.x 

不知道怎么回事,主要是对linux不熟,只好重新装下,装到了/usr/local/openssl下 

然后用这个命令: 
   
Shell代码  收藏代码            
  1. ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl --with-ssl=/usr/local/openssl  


   

这回就可以了


   

来自  https://kyfxbl.iteye.com/blog/1902299


普通分类: