今天公司产品一个功能突然挂掉了。。。向客户演示之前出现了,手机端显示不能获取下载资源,可是急坏了一票人。。

通过手机端,调查服务器地址调用了http:/2342342.domain.hostname.cn/apis/stickydataurls/接口,服务器返回502和500错误,去查看服务器前端Nginx错误日志显示:

2014/08/13 16:11:00 [error] 23851#0: *10303771 connect() failed (111: Connection refused) while connecting to upstream, client: 12.12.12.12, server: *.domain.hostname.cn, request: "POST /apis/pl/getStickGoInfo HTTP/1.0", upstream: "http://10.8.1.10:8080/apis/pl/getStickGoInfo", host: "00e06f26db47.domain.hostname.cn"
.........................
2014/08/13 16:21:48 [error] 24149#0: *9354 invalid URL prefix in "http://", client: 14.205.27.34, server: *.domain.hostname.cn, request: "GET / HTTP/1.1", host: "123456789012.domain.hostname.cn" 2014/08/13 16:21:49 [error] 24149#0: *9363 invalid URL prefix in "http://", client: 14.205.27.34, server: *.domain.hostname.cn, request: "GET / HTTP/1.1", host: "123456789012.domain.hostname.cn", request: "GET /favicon.ico HTTP/1.1", host: "123456789012.domain.hostname.cn" 2014/08/13 16:21:49 [error] 24149#0: *9365 invalid URL prefix in "http://", client: 14.205.27.34, server: *.domain.hostname.cn, request: "GET / HTTP/1.1", host: "123456789012.s.234g.cn", request: "GET /favicon.ico HTTP/1.1", host: "123456789012.domain.hostname.cn" 2014/08/13 16:25:32 [error] 24151#0: *12008 directory index of "/var/www/" is forbidden, client: 36.103.170.240, server: host, request: "GET / HTTP/1.0", host: host

这个时候再去看Nginx配置,也没有错。对于路径/  和/apis/stickydataurls/都有重定向,

server_name   *.domain.hostname.cn;
location /{
    ................
}
location = /apis/stickydataurls/ {
    include /etc/nginx/conf.d/PhyLink;
    proxy_pass  http://do.host.cn/apis/pl/getStickGoInfo;
}

但是访问一直出现问题。
再去查看日志,发现最早的日志,出现了不应该出现的8080端口,这个端口是在 location / 分支才应该出现的,但是在这个配置里边,出现这个情况是完全不能理解的,手机端调用/apis/stickydataurls/应该进入do.host.cn域下的/apis/pl/getStickGoInfo。而不应该出现10.8.1.10:8080/apis/pl/getStickGoInfo。

 

posted on 2014-08-13 16:59  tom_zhao_vip  阅读(5540)  评论(0编辑  收藏  举报