Nginx location block specific file #nginx
location = /publish/domain.io.php { allow 127.0.0.1; deny all; # Gives 403 } # or location = /publish/domain.io.php { internal; # Gives 404 }