location ~* \@5h {
log_not_found off;
}
location ~* @5h {
location ~ @5h {
location ~ @5h* {
location ~* @5h* {
To find location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations). Among them, the location with the longest matching prefix is selected and remembered. Then regular expressions are checked, in the order of their appearance in the configuration file. The search of regular expressions terminates on the first match, and the corresponding configuration is used. If no match with a regular expression is found then the configuration of the prefix location remembered earlier is used.
If the longest matching prefix location has the “^~” modifier then regular expressions are not checked.
location ~* \@5h {
log_not_found off;
}