您好!欢迎来到跃码库!

yum安装nginx报错解决nginx: [emerg] unknown directive “stream“ in /etc/nginx/nginx.conf问题

分类:IT吧 时间:2022-12-11 19:27 浏览:223
概述
yum安装nginx,其中看nginx有stream参数,但是nginx -t是报错“nginx: [emerg] unknown directive “stream“ in /etc/nginx/nginx.conf问题”# 安装nginx源curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo# 先安装yum -y install e
内容

yum安装nginx,其中看nginx有stream参数,但是nginx -t是报错“nginx: [emerg] unknown directive “stream“ in /etc/nginx/nginx.conf问题”

715460-20220905085002962-1395664197.png

# 安装nginx源

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

# 先安装

yum -y install epel-release


#应该是缺少modules模块

yum -y install nginx-all-modules.noarch

然后在用nginx -t就好了

[root@k8s-node2 ~]# nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful



评论
平台客服
Q Q :248853155
电话:400申请中
邮箱:serve@yuemaku.com
时间:09:00-21:00

咨询在线客服

248853155

服务热线

400申请中

微信服务号

微信服务号