Welcome! Log In Create A New Profile

Advanced

Re: How to follow request path within the config?

B.R.
November 07, 2014 09:38PM
I would use a return 200 directive to print variables in the location
context to make sure I make nginx search for existing files.

location / {
return 200 "cache_path$uri\n$uri\n$uri/";
}

If anything printed is not a valid file then you know why you end up with
the fallback value.
---
*B. R.*

On Sat, Nov 8, 2014 at 3:17 AM, cachito <nginx-forum@nginx.us> wrote:

> Hello, I'm hitting my head against a wall since a couple days ago. Last
> paragraph has the big question, the rest is context.
>
> I run a fairly big Wordpress blog, with a somewhat convoluted configuration
> rewriting legacy URLs that follow me since 2002. I use extensive caching
> via
> plugins that pregenerate HTML on disk and I rewrite requests to serve HTML
> instead of talking to PHP. Everything worked well until a domain change.
>
> Yesterday after I replaced the domain in the various configuration files,
> nginx started sending every request to the PHP processor. The location / is
> pretty standard:
> location / {
> try_files cache_path$uri $uri $uri/ /index.php;
> }
>
> Everything in the paths exists and has the correct permissions, but nginx
> keeps sending everything through /index.php and killing my server via a
> 180-200 load average.
>
> I tried everything googleable, but I can't detect WHY nginx goes that
> route.
> The debug log shows a lot of not matching rules/regexes but there's nothing
> I can do to follow the decision tree that nginx follows to end in PHP. Is
> there anything I can do to at least simulate the directive processing?
>
> Thanks in advance.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,254690,254690#msg-254690
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to follow request path within the config?

cachito November 07, 2014 09:17PM

Re: How to follow request path within the config?

B.R. November 07, 2014 09:38PM

Re: How to follow request path within the config?

Francis Daly November 10, 2014 01:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 223
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