Welcome! Log In Create A New Profile

Advanced

Re: NGINX redirection issue

Maxim Dounin
August 30, 2014 10:48PM
Hello!

On Fri, Aug 29, 2014 at 10:08:57AM -0400, manish-ezest wrote:

> 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"

[...]

From the logs it looks like the loop is caused by error_page you
use, and recursive_error_pages set somewhere in your
configuration. As long as your error handler script times out
(likely because it can't cope with load), nginx tries to call it
again, then again, then again. This continues till nginx reaches
the redirections limit and logs the message about it.

Find where recursive_error_pages is set and switch it off - or,
rather, just remove it from the configuration. As previously
said, the default is correct and should not be changed unless you
understand what you are doing. This should resolve your problem.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

NGINX redirection issue

manish-ezest August 06, 2014 11:37PM

Re: NGINX redirection issue

Maxim Dounin August 07, 2014 04:06AM

Re: NGINX redirection issue

manish-ezest August 07, 2014 12:02PM

Re: NGINX redirection issue

manish-ezest August 08, 2014 06:01AM

Re: NGINX redirection issue

Maxim Dounin August 08, 2014 10:52AM

Re: NGINX redirection issue

manish-ezest August 08, 2014 10:49PM

Re: NGINX redirection issue

Maxim Dounin August 09, 2014 09:12PM

Re: NGINX redirection issue

manish-ezest August 29, 2014 04:05AM

Re: NGINX redirection issue

Maxim Dounin August 30, 2014 10:48PM

Re: NGINX redirection issue

manish-ezest September 01, 2014 02:05PM

Re: NGINX redirection issue

Maxim Dounin September 02, 2014 10:00AM

Re: NGINX redirection issue

manish-ezest September 03, 2014 03:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready