NGINX redirection issue

manish-ezest nginx-forum at nginx.us
Fri Aug 29 14:08:57 UTC 2014


Hello Maxim,

I tried enabling debug mode but still I am not able to figure out the issue
and its possible solutions. 

I disabled this rewrites which are rewriting to index.html
## Rewrite all directory lookups to 'index.html'
#rewrite ^(.*)/$ $1/index.html permanent;

## Rewrite all open strings to index.html
#rewrite ^(.*)/([^\.\?/]+)$  $1/$2/index.html permanent;

and added this one as you suggested but now it is going to
www.google.com(very strange)

location / {
        index index.html;
        try_files $uri.html $uri/ =404;
		}

Error Log Content

2014/08/29 09:40:28 [error] 935#0: *64 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /favicon.ico HTTP/1.1", upstream:
"fastcgi://127.0.0.1:8999", host: "www.aaa.com"
2014/08/29 09:40:38 [error] 935#0: *64 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /favicon.ico HTTP/1.1", upstream:
"fastcgi://127.0.0.1:8999", host: "www.aaa.com"
2014/08/29 09:40:48 [error] 935#0: *64 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /favicon.ico HTTP/1.1", upstream:
"fastcgi://127.0.0.1:8999", host: "www.aaa.com"
2014/08/29 09:40:58 [error] 935#0: *64 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /favicon.ico HTTP/1.1", upstream:
"fastcgi://127.0.0.1:8999", host: "www.aaa.com"
2014/08/29 09:41:08 [error] 935#0: *64 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /favicon.ico HTTP/1.1", upstream:
"fastcgi://127.0.0.1:8999", host: "www.aaa.com"
2014/08/29 09:44:15 [error] 957#0: *73 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /images/icons/product/chrome-48.png
HTTP/1.1", upstream: "fastcgi://127.0.0.1:8999", host: "www.aaa.com",
referrer: "http://www.aaa.com/bbb/ccc/index.html"
2014/08/29 09:44:15 [error] 957#0: *74 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /images/srpr/logo9w.png HTTP/1.1",
upstream: "fastcgi://127.0.0.1:8999", host: "www.aaa.com", referrer:
"http://www.aaa.com/bbb/ccc/index.html"
2014/08/29 09:44:15 [error] 957#0: *75 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET
/xjs/_/js/k=xjs.hp.en_US.QgXXqNe9H8s.O/m=sb_he,pcc/rt=j/d=1/t=zcms/rs=AItRSTMZ4gjPthsSL3eRaZarMVJV0YA7aQ
HTTP/1.1", upstream: "fastcgi://127.0.0.1:8999", host: "www.aaa.com",
referrer: "http://www.aaa.com/bbb/ccc/index.html"
2014/08/29 09:44:15 [error] 957#0: *76 upstream timed out (110: Connection
timed out) while reading response header from upstream, client: 11.11.11.11,
server: www.aaa.com, request: "GET /images/srpr/nav_logo80.png HTTP/1.1",
upstream: "fastcgi://127.0.0.1:8999", host: "www.aaa.com", referrer:
"http://www.aaa.com/bbb/ccc/index.html"

Access Log Content

11.11.11.11 - - [29/Aug/2014:09:44:32 +0200]"GET
/images/icons/product/chrome-48.png HTTP/1.1" 499 0
"http://www.aaa.com/bbb/ccc/index.html" "Mozilla/5.0 (Windows NT 6.1; WOW64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36"
26.375
11.11.11.11 - - [29/Aug/2014:09:44:32 +0200]"GET /images/srpr/logo9w.png
HTTP/1.1" 499 0 "http://www.aaa.com/bbb/ccc/index.html" "Mozilla/5.0
(Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/36.0.1985.143 Safari/537.36" 26.221
11.11.11.11 - - [29/Aug/2014:09:44:32 +0200]"GET
/xjs/_/js/k=xjs.hp.en_US.QgXXqNe9H8s.O/m=sb_he,pcc/rt=j/d=1/t=zcms/rs=AItRSTMZ4gjPthsSL3eRaZarMVJV0YA7aQ
HTTP/1.1" 499 0 "http://www.aaa.com/bbb/ccc/index.html" "Mozilla/5.0
(Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/36.0.1985.143 Safari/537.36" 26.222
11.11.11.11 - - [29/Aug/2014:09:44:32 +0200]"GET /images/srpr/nav_logo80.png
HTTP/1.1" 499 0 "http://www.aaa.com/bbb/ccc/index.html" "Mozilla/5.0
(Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/36.0.1985.143 Safari/537.36" 26.222

Regards,
Manish

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252379,252939#msg-252939



More information about the nginx mailing list