Nginx disallows access to a directory or file setting method
- 2020-05-06 12:14:05
- OfStack
location = /config/ {
return 404;
}
location =/config.ini{
return 404;
}
Such only forbidden access / / www. jb51. net/path/
location = /path/ {
return 404;
}
Forbidden access / / www. jb51. net/path/test php
location ^~ /test
{
deny all;
}
Maybe test should be replaced by path.
That's it