出现如图所示错误,处理办法如下
去nginx解压目录下执行
./configure --with-http_ssl_module
如果报错 ./configure: error: SSL modules require the OpenSSL library.则执行
yum -y install openssl openssl-devel
./configure
./configure --with-http_ssl_module
执行
make
(切记不能 make install 会覆盖安装目录)将原来 nginx 备份
扫描二维码关注公众号,回复: 1849432 查看本文章cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
将新的 nginx 覆盖旧安装目录
cp objs/nginx /usr/local/nginx/sbin/nginx
如果报错,执行cp -rfp objs/nginx /usr/local/nginx/sbin/nginx
测试 nginx 是否正确
/usr/local/nginx/sbin/nginx -t
如图最后是测试成功的,之前遇到一个错误是我的SSL证书路径有错,修改后测试通过
https://blog.csdn.net/weiyangdong/article/details/80008543