Deny requests of any file without authentication

I’ve asked this question before without success. So I come here begging
for help because I’m going crazy spending nights without a god damn
answer =( I really don’t know what to do, I tried some things but it’s a
big mess:

Configuration of Nginx: codeviewer.org
CheckReq.php: codeviewer.org

Posted at Nginx Forum: