nginx: [emerg] unknown directive “stream“ in /etc/nginx/nginx.conf问题解决方案
在进行kubernetes 集群配置安装时出现如下问题。
错误如下:
[root@kube nginx]# nginx -t
nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf:17
nginx: configuration file /etc/nginx/nginx.conf test failed
解决方法
安装nginx stream模块,或者安装全部模块。
yum -y install nginx-all-modules.noarch
Installed:
nginx-all-modules.noarch 1:1.20.1-10.el7
Dependency Installed:
gd.x86_64 0:2.0.35-27.el7_9 libXpm.x86_64 0:3.5.12-1.el7 nginx-mod-http-image-filter.x86_64 1:1.20.1-10.el7 nginx-mod-http-perl.x86_64 1:1.20.1-10.el7 nginx-mod-http-xslt-filter.x86_64 1:1.20.1-10.el7 nginx-mod-mail.x86_64 1:1.20.1-10.el7
nginx-mod-stream.x86_64 1:1.20.1-10.el7
Complete!
再次尝试nginx -t文章来源:https://www.toymoban.com/news/detail-755516.html
完美解决。文章来源地址https://www.toymoban.com/news/detail-755516.html
到了这里,关于nginx: [emerg] unknown directive “stream“ in /etc/nginx/nginx.conf问题解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!