日历存档: 2012 年 3 月 4 日
Nginx提示host not found in upstream
分类:运维技术日期:2012-03-04 - 0:00:36评论:2条作者:老谢
今天对nginx.conf进行修改,保存后进行语法检查,配置应该没问题,但是提示下面的信息,瞬间忧桑了,
nginx: [emerg] host not found in upstream “demo1.xj123.info” in /usr/local/nginx
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
其中demo1.xj123.info是我的博客后端之一,从提示的错误和网上搜索一番来看,应该是找不到主机,于是ping了一下demo1.xj123.info,结果是可以ping通,这就令我费解了,而且cat /etc/resolv.conf里面的nameserver是正确的。
实在没头绪了,又敲了一次nginx -t竟然提示成功。
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
最后:这个问题就是由于找不到主机导致的,如果担心类似问题,可以修改hosts文件
最新评论
zwwooooo:类似以前做网站开发时,一开始有自...
老陳网志:有点高端,像我们整点nas玩玩就够...
springwood:自从 CentOS 不维护之后,我换 U...
大D:难都搞下来了,那就更得YM了
大D:只能是YM了,谢总牛啊
灰常记忆:经济不好 今年我也换了机器 一...
大峰:这是海外服务器嘛?速度挺快的。
大D:只能单走一个6了哈哈哈
zwwooooo:买特斯拉和买iPhone的人群其实相似...
平安家属子痕:一直坚持油车,看你写的心里有...