limit_req at server level gives 404 error for files rewritten at location level?
themadbeaker at gmail.com
Sun Apr 26 18:38:59 UTC 2020
> In particular, if limit_req uses a map with regular expressions,
> this might result in $1.$2 to be set to something completely
> different from what was expected from the location matching.
> The general rule is: avoid using positional captures from regular
> expressions in location and server_name matching, these can be
> used only in very simple configurations.
You were right! I forgot I had a map matching /24 of the
$binary_subnet_addr that was being used by the limit_req_zone
I went through and gave names to my capture groups just to ensure this
type of conflict doesn't happen again.
Thanks again for your help!
More information about the nginx