Nginx配置https,一直提示the “ssl“ parameter requires ngx_http_ssl_module in
Nginx配置https,一直提示the “ssl” parameter requires ngx_http_ssl_module in
原因
配置https时报错,因为nginx安装的时候缺少安装ngx_http_ssl_module模块,原因很多反正就是缺少安装这个模块
流程说明:
重新在原有源码nginx服务器中安装ngx_http_ssl_module这个模块,然后编译,编译成功后把nginx这个可执行文件替换现在的nginx文件
步骤1:进入源码nginx文件夹中(或者自己重新下载一个都可以)
cd /root/nginx-1.17.1
步骤2:添加配置http_ssl_module模块
/usr/local/nginx
是当前运行中的nginx服务器目录
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
如果出现
linux -bash: ./configure: Permission denied
):执行
chmod 777 configure
步骤3:编译
make
步骤4:停止现在运行的nginx
nginx -s stop
如果出现:
nginx/logs/nginx.pid" failed (2: No such file or directory)
:执行(如果不行,多次执行)
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
步骤5:覆盖
cp -f /root/nginx-1.17.1/objs/nginx /usr/local/nginx/sbin/
步骤6:重启nginx
nginx -s reload
还没有评论,来说两句吧...