浏览 3.6k
之前配置过很多次服务器了,第一次遇到这种诡异问题~
7月26号新买了一台阿里云的 ESC 实例,OS 是 CentOS7.9,按照老方法,根据[官网例子](https://nginx.org/en/linux_packages.html#RHEL-CentOS)添加了 .repo 源文件。
然而
```BASH
yum install nginx
```
却报告找不到 nginx 包。。。
再使用
```BASH
yum list | grep nginx
```
检索,也只看到了 **nginx-debug** 和 **nginx-module-** 等12来个软件包,就是没有单独的 **nginx** 软件包~
尝试了比对系统版本,权限,均为看出任何差异,还有人遇到过这种诡异的问题麽?

按点赞数排序
按时间排序
当出现下面这行命令行输出时,Nginx相当于启动失败,新配置文件未生效:
root@nginx-deployment-6686f596f-xhjt8:/etc/nginx/conf.d# nginx -t
2020/09/17 06:00:56 [emerg] 115#115: host not found in upstream "nginx2-deployment" in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] host not found in upstream "nginx2-deployment" in /etc/nginx/conf.d/default.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed如果新的配置文件生效,当Nginx连接nginx2-deployment时,在接收到RST报文、发生超时等,会重新选择到127.0.0.1:80这台server。
微信公众号
加入微信群