nginx配置相关问题

1. nginx配置ssl相关问题

1.1 报错nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /qqc_pack/nginx-1.1.10/conf/nginx.conf:30

切换到nginx源码包位置:
[root@localhost sbin]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.1.10
configure arguments:
注:configure中没有 http_ssl_module,现在将http_ssl_module加进去

切换到nginx解压的目录:
[root@localhost /]# cd qqc_pack/nginx-1.1.10
[root@localhost nginx-1.1.10]# ls
auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  Makefile  man  objs  README  src
# 有configure执行下面操作:
[root@localhost nginx-1.1.10]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
[root@localhost nginx-1.1.10]#make

对原来的nginx备份:
[root@localhost nginx-1.1.10]# cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

然后将刚刚编译好的nginx覆盖掉原有的nginx:
[root@localhost nginx-1.1.10]# cp ./objs/nginx /usr/local/nginx/sbin/
cp:是否覆盖"/usr/local/nginx/sbin/nginx"? y

检查:
[root@localhost nginx-1.1.10]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.1.10
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

注:http_ssl_module已加进来
posted @ 2019-08-21 17:19  朝朝哥  阅读(241)  评论(0编辑  收藏  举报