location = /abc {} matches the exact uri /abc
location ~ /abc is a regex match on the uri, meaning any uri containing /abc,
you probably want: location ~ ^/abc for the uri begining with /abc
instead
location = /abc {} matches the exact uri /abc
location ~ /abc is a regex match on the uri, meaning any uri containing /abc,
you probably want: location ~ ^/abc for the uri begining with /abc
instead