概述
系统是centos 7
问题是加入stream出现问题。文章来源:https://www.toymoban.com/news/detail-648963.html
root@localhost sbin]# ./nginx -t
nginx: [emerg] unknown directive "stream" in /usr/local/nginx/conf/nginx.conf:133
configuration file /usr/local/nginx/conf/nginx.conf test failed
[root@localhost sbin]# ./nginx -t
nginx: [emerg] dlopen() "/usr/lib64/nginx/modules/ngx_stream_module.so" failed (/usr/lib64/nginx/modules/ngx_stream_module.so: undefined symbol: SSL_CTX_set_options) in /usr/local/nginx/conf/nginx.conf:1
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
加入stream模块
- 重新编译
./configure --with-stream=dynamic
make
- nginx.conf 第一行
load_module '/usr/lib64/nginx/modules/ngx_stream_module.so';
- ./nginx -t 如果出现以下异常
[root@localhost sbin]# ./nginx -t
nginx: [emerg] dlopen() "/usr/lib64/nginx/modules/ngx_stream_module.so" failed (/usr/lib64/nginx/modules/ngx_stream_module.so: undefined symbol: SSL_CTX_set_options) in /usr/local/nginx/conf/nginx.conf:1
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
则直接拷贝源码objs中的文件文章来源地址https://www.toymoban.com/news/detail-648963.html
[root@localhost objs]# cp /home/tool/tengine-2.3.4/objs/ngx_stream_module.so /usr/lib64/nginx/modules/
cp:是否覆盖"/usr/lib64/nginx/modules/ngx_stream_module.so"? y
到了这里,关于/usr/lib64/nginx/modules/ngx_stream_module.so: undefined symbol: SSL_CTX_set_options的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!