I have an odd problem with locations not working, I'm trying to add a location something like the below (simplified for troubleshooting)
location ~* /wp-content/uploads/ {
return 403;
internal;
}
If I add this to my virtual host (wo site edit domain.tld) then it doesn't work, I've tried it above and below all of the existing entries to be sure it isn't being overridden by other locations in locations-wo.conf or other files.
I've also tried commenting out include common/locations-wo.conf;
and "include /var/www/domain.tld/conf/nginx/*.conf;
it does work if I comment out the second one but that also breaks SSL, there are no other conf files in /var/www/domain.tld/conf/nginx/*.conf;
I'm a bit stumped as to why this isn't working, I've made no edits to any of the core .conf files and its odd that removing the SSL config fixes things.
Hoping someone has some insights as to why and appreciate any help. More than happy to provide more info if required.