nginx: [emerg] duplicate upstream "test2" in /usr/local/nginx/conf/sites-enabled/test2.conf:1
使用/usr/local/nginx/sbin/nginx -t 检查nginx配置文件时报错:
nginx: [emerg] duplicate upstream "test2" in /usr/local/nginx/sites-enabled/test2.conf:1
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
原因:有相同名称的upstream,可以grep查找一下
[root@test sites-enabled]# grep inner-upload *
test2.conf:upstream inner-upload {
test2.conf: proxy_pass http://test2;
test1.conf:upstream inner-upload {
test1.conf: proxy_pass http://test2;
解决方案:改下upstream名称,或者删除之前的upstream
nginx: [emerg] duplicate upstream "test2" in /usr/local/nginx/conf/sites-enabled/test2.conf:1的更多相关文章
- nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
iwangzheng.com tty:[0] jobs:[0] cwd:[/opt/nginx/conf] 12:45 [root@a02.cmsapi]$ /usr/local/nginx/sbin ...
- 解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错 [root@localhost nginx]/usr/local/nginx/sbin/nginx ...
- nginx: [emerg] unknown directive "stub_status" in /usr/local/openresty/nginx/conf/conf.d/ngx_metric.conf:19
问题分析 Nginx没有添加modules/ngx_http_stub_status_module.o模块. 问题解决 没有安装的话,可以在tar包安装编译的时候添加如下参数: # ./configu ...
- nginx: [error] invalid PID number "" in "/usr/local/webserver/nginx/logs/nginx.pid" (原)
进入nginx文件下,例如 :/usr/local/nginx/sbin [root@iZ25f7emo7cZ /]# cd /usr/local/nginx/sbin 运行命令: [root@iZ2 ...
- nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37
一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 1 nginx: [emerg] the "ssl" parameter requ ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理
当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload 报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/l ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/conf/vhost/XXX.conf:53报错处理
开发同事发给我一小段nginx配置,加到服务器上之后,执行nginx -s reload时,出现报错: nginx: [emerg] unknown directive “ ” in /usr/loc ...
- nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx//conf/nginx.conf:117
SSL相关的配置加到了nginx的配置文件中后,nginx竟然启动不起来了 于是用如下命令测试问题所在: /usr/local/nginx/sbin/nginx -c /usr/local/nginx ...
- 新装NGINX重启,出现错误 nginx: [error] open() "/usr/local/nginx/logs/nginx.pid"
重装nginx出现,重启出现错误 ./nginx -s reload nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" ...
- the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf
一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 原因也很简单,nginx缺少http_ssl_module模块,编译安装的时候带上--with-htt ...
随机推荐
- HDL刷题:Count clock
原题链接 要写一个12小时的时钟. 由题目得知,reset信号的优先级最高,其次是enable,这里很好实现. 我的思路: 写了一个4位的bcd计数器,并实例化了4个,对ss与mm的[7:4]与[3: ...
- Ubuntu 20.04 挂载 NTFS 硬盘 / 格式化并挂载 EXT4 硬盘
创建挂载目录 mkdir /mnt/hdd 此目录在最后一步中用得到. 确定要挂载的硬盘 fdisk -l 由于我们要挂载的是 NTFS 硬盘,根据上面的信息,可以确定 /dev/sda1 是我们要挂 ...
- python,opencv-python人脸识别,并且发邮件对镜头前未知人员进行报警
我们在任意一个硬盘的根目录下创建一个Code-project文件夹 在该文件夹下分别创建C-project和Python-project文件夹 在Python-project文件夹下创建face re ...
- nacos 安装和使用
Nacos 是阿里巴巴开源项目,用于构建微服务应用的服务发现.配置管理和服务管理. 在微服务项目中不同模块之间服务调用时,实现服务注册与发现. Nacos 使用: Nacos 是java开发的,依赖 ...
- [ABC272G] Yet Another mod M
Problem Statement You are given a sequence $A=(A_1,A_2,\dots,A_N)$ of length $N$ consisting of posit ...
- DI入门案例
1.基于IoC管理bean 2.Service中使用new形式创建的Dao对象是否保留?(不保留) 3.Service中需要的Dao对象如何进入到Service中?(提供方法) 4.Service与D ...
- Java8新特性之FlatMap&Reduce
1.FlagMap // flatMap:接收一个T返回一个R,将一个元素转为一个新的流 ;R apply(T t); <R> Stream<R> flatMap(Functi ...
- 一文讲透消息队列RocketMQ实现消费幂等
这篇文章,我们聊聊消息队列中非常重要的最佳实践之一:消费幂等. 1 基础概念 消费幂等是指:当出现 RocketMQ 消费者对某条消息重复消费的情况时,重复消费的结果与消费一次的结果是相同的,并且多次 ...
- SpringBoot 这么实现动态数据源切换,就很丝滑!
大家好,我是小富- 简介 项目开发中经常会遇到多数据源同时使用的场景,比如冷热数据的查询等情况,我们可以使用类似现成的工具包来解决问题,但在多数据源的使用中通常伴随着定制化的业务,所以一般的公司还是会 ...
- 直击云栖|践行数据化运维,云掣重新解读MSP
2020年云栖大会百城汇·杭州站,云掣MSP专场圆满落幕! 本次云栖大会·云掣MSP专场以"数据智能,智能运维"为主题,主要聚焦企业云化转型演进趋势,云上运维全景监控以及云原生云环 ...