Welcome! Log In Create A New Profile

Advanced

Re: How to edit url and pass forward to wsgi?

Francis Daly
September 03, 2015 02:48PM
On Thu, Sep 03, 2015 at 08:40:36AM -0400, Thomas Nyberg wrote:

Hi there,

> On a related note, is there some way to log the location choices
> that are made? I tried using a debug logging mode, but it was far
> too low-level (on the level of memory allocations). Of course I
> could have the routes' outputs go to certain files to figure it out,
> but if there was a way to log something like "taking route
> `/staging/doc/.*/info/cat`" it would make things much easier.

The debug log should have a bunch of "test location:" lines, followed
by one "using configuration" line. That's the location that is being
used for this request.

Other than that, the rules at http://nginx.org/r/location and at
http://nginx.org/en/docs/http/request_processing.html should make it
straightforward to determine which location is used for this request.

And now that you know that regexes are not implicitly anchored, it should
be clear what is going on.

It's even easier if there are only prefix locations in use.

Cheers,

f
--
Francis Daly francis@daoine.org

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

How to edit url and pass forward to wsgi?

Thomas Nyberg September 03, 2015 12:46AM

Re: How to edit url and pass forward to wsgi?

Francis Daly September 03, 2015 03:46AM

Re: How to edit url and pass forward to wsgi?

Thomas Nyberg September 03, 2015 08:42AM

Re: How to edit url and pass forward to wsgi?

Francis Daly September 03, 2015 02:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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