Hi,
I'm kind of new to webserver admin. I'm also a little paranoid. I'm wondering which files should have access restricted by my NGINX config.
I ran a script to test unauthenticated access to every file in my test install's webroot, and these are the files I found I had access to (HTTP 200) without being redirected to the login page. I've already added a directive to block access to hidden files (files prefixed with a ".").
There are a few that stand out (db.sql, config.php). While the php files do not show any content when accessed, it's my understanding that they're still being run when accessed by HTTP. Also, the db.sql is downloaded when accessed and obviously fully readable.
Which of these files in this list are able to be or should be blocked from public access without disabling website function?
I'm genuinely asking if I missed something in the install guide about setting permissions for the config.php and db.sql files, or if the expectation is that the person setting this site up is supposed to expect this and deal with it. It seems pretty clear to me that I should add a directive to block access to db.sql, but I kind of had to stumble upon that information, which leaves me worried.
Thanks for taking the time to consider my post.