搜索
您的当前位置:首页正文

nginx: [emerg] unknown directive “stream“ in /etc/nginx/nginx.conf问题解决方案

来源:易榕旅网

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

完美解决。

因篇幅问题不能全部显示,请点此查看更多更全内容

Top