解决 nginx 启动错误 nginx: [emerg] host not found in upstream
解决办法来自于:https://blog.csdn.net/Hreticent/article/details/86074502
感谢这个朋友简单而清晰的解决办法。
在配置nginx支持PHP的时候,因为之前有站点,配置的比较乱。尤其是支持JSP
导致重启nginx时,一直报错 nginx: [emerg] host not found in upstream 类似这样的报错。
各种不明白为何如此,不得不到处搜索解决办法,真的是好多办法,就是没几个能看懂的,不知道都在说什么。
有很多参考做都无法实现。
后来终于看到一个简单的解决办法。
就是因为当前系统无法解析upstream后边跟着的域名。导致无法重启。
解决办法也很简单,就是修改hosts文件,像WIN系统一样。
vi /etc/hosts
127.0.0.1 www.xxx.com
添加上边一条相似的信息,在IP后边增加那个upsteam后边的那个域名。
这样问题就解决了。
解决 nginx 启动错误 nginx: [emerg] host not found in upstream的更多相关文章
- check nginx配置文件错误:[emerg]: getpwnam(“nginx”) failed
1.错误提示: [root@server include]# /application/nginx/sbin/nginx -t -c /applications/nginx/nginx/nginx.c ...
- nginx 启动错误
场景 在Windows下 启动nginx报错: nginx: [error] ReadFile() : Incorrect function) 解决 因为 nginx.conf 中存在 /* 被认为是 ...
- Nginx启动错误 Failed to read PID from file /run/nginx.pid 的处理方法
问题产生原因 因为 nginx 启动需要一点点时间,而 systemd 在 nginx 完成启动前就去读取 pid file 造成读取 pid 失败 解决方法 让 systemd 在执行 ExecSt ...
- Nginx启动错误:error while loading shared libraries: libpcre.so.1
1 # /usr/local/nginx/sbin/nginx 2 /usr/local/nginx/sbin/nginx: error while loading shared libraries: ...
- Nginx启动错误:error while loading shared libraries: libpcre.so.0
今天测试的时候,启动一个其他机器预编译好的nginx到目标测试机器(OEL 7.4)启动的时候,报了下列错误: /usr/local/nginx/sbin/nginx: error while loa ...
- 解决apache启动错误 AH00558: httpd: Could not reliably determine...
[root@localhost httpd-2.4.7]# /usr/local/httpd/bin/apachectl start AH00558: httpd: Could not reliabl ...
- 解决apache启动错误"httpd:Could not reliably determine..."
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name [root@serv ...
- 解决 spring-cloud-starter-zipkin 启动错误
应用场景:Spring Boot 服务添加 Zipkin 依赖,进行服务调用的数据采集,然后进行 Zipkin-Server 服务调用追踪显示. 示例pom.xml配置: <parent> ...
- 解决docker启动错误 error creating overlay mount to /var/lib/docker/overlay2
原文 最近在centos7.1使用docker运行redis镜像,出现下面的错误: /usr/bin/docker-current: Error response from daemon: error ...
随机推荐
- nested exception is com.mongodb.MongoWaitQueueFullException: Too many operations are already waiting for a connection. Max number of operations (maxWaitQueueSize) of 500 has been exceeded.
application.yml 添加后两行配置,增加连接池数量data: mongodb: host: *** database: *** port: 27017 username: *** pass ...
- jquery播放mp3
$("button").on("click",function(){ $('embed').remove(); $('body'). ...
- linux忘记密码
linux忘记密码 Linux进入救援模式的方法 视频 centos6.5测试通过 如下 1.开机按esc进入下面界面 2.按e 3.按e 4.DM后空格加上single再回车 5.会回到这里再按b ...
- poj_3461 KMP算法解析
A - Oulipo Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit S ...
- MySQL笔记 02
SQL对表中数据的CRUD操作: 插入数据: insert into 表名 (列名1,列名2,....) values (值1,值2,....): 插入部分: insert into xuesheng ...
- 吴裕雄--天生自然 JAVASCRIPT开发学习:语句
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 关于构造函数中的this()和super()
今天看到一个这段代码 public DataSourcePool(String driver, String url, String user, String pwd) throws Exceptio ...
- vue实现CheckBox与数组对象绑定
实现需求: 实现一个简易的购物车,页面的表格展示data数据中的一个数组对象,并提供选中商品和全选商品checkbox复选框,页面实时显示选中商品的总金额: 分析: 1:使用v-for循环渲染arra ...
- Java底层魔术类Unsafe用法简述
1 引子 Java中没有指针,不能直接对内存地址的变量进行控制,但Java提供了一个特殊的类Unsafe工具类来间接实现.Unsafe主要提供一些用于执行低级别.不安全操作的方法,如直接访问系统内存资 ...
- Sequence Models Week 1 Character level language model - Dinosaurus land
Character level language model - Dinosaurus land Welcome to Dinosaurus Island! 65 million years ago, ...