参考:https://blog.csdn.net/ygqygq2/article/details/77479765
1)确认安装pcre和openssl(不知道是否有用,但是装了不出错)
yum install -y pcre openssl
2) git获取ssl module(这个和参考不一样,可能地址变了。)
git clone https://github.com/yaoweibin/nginx_upstream_check_module.git
3)编译
./configure --with-http_stub_status_module --with-stream=dynamic --with-stream_ssl_module --with-pcre --with-http_ssl_module --add-module=../nginx_upstream_check_module
make
make install
4)改配置
[root@msg6 nginx]# cat /usr/local/nginx/conf/nginx.conf
#user www;
worker_processes 8;
error_log logs/info.log info;
#pid logs/nginx.pid;
load_module modules/ngx_stream_module.so; # 此处要添加模块
events {
worker_connections 1024;
}
http {