So you know I said I'd tried every pattern? Well I went back, CTRL-Z in the editor and I found that actually I had skipped one:
This DOES work!
location ~* \.(pl|cgi|py|sh|lua|log|md5)$ {
return 444;
}
What had happened was that I hadn't noticed that I had left the )\$ on from another example.
Question: What is the purpose of that )\$ at the end of the closing bracket? I got the example from here:
http://www.queryadmin.com/1071/deny-access-sensitive-files-nginx/
I'd like to go back and tell the page owner that it's incorrect, but does it ever hold a valid context or is it just an annoying typo that cost me an hour?
Thanks - and sorry for taking your time, but I was copying one of the many bad configs off the internet!
This DOES work!
location ~* \.(pl|cgi|py|sh|lua|log|md5)$ {
return 444;
}
What had happened was that I hadn't noticed that I had left the )\$ on from another example.
Question: What is the purpose of that )\$ at the end of the closing bracket? I got the example from here:
http://www.queryadmin.com/1071/deny-access-sensitive-files-nginx/
I'd like to go back and tell the page owner that it's incorrect, but does it ever hold a valid context or is it just an annoying typo that cost me an hour?
Thanks - and sorry for taking your time, but I was copying one of the many bad configs off the internet!