Welcome! Log In Create A New Profile

Advanced

Re: Best practices for solving location issues

Francis Daly
October 08, 2018 06:22PM
On Mon, Oct 08, 2018 at 09:50:36PM +0200, Gbg wrote:

Hi there,

> wanted to ask if there is a list of best practice troubleshooting
> advice or even some tool or debugging switch that can help me find out
> which location gets used for a specific URL or URL pattern

The debug log (http://nginx.org/en/docs/debugging_log.html) holds lots
of information.

For testing, a limited version like

events {
debug_connection 127.0.0.12;
}

means that it will probably only log for the one specific request you
make using curl. Make one request, see the log, pick out the bits that
say which location{} was chosen.

Or adding something like

return 200 "Location No. 9\n";

to each location{} block may be a short-term thing to confirm that you
configured nginx the way you wanted to configure nginx.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Best practices for solving location issues

Gbg October 08, 2018 03:52PM

Re: Best practices for solving location issues

Francis Daly October 08, 2018 06:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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