denied.conf 404 B

1234567891011121314151617181920212223242526
  1. # Deny *.txt, *.log, .*/*.php, .*, *.json, .lock, *.ht
  2. # Not allow txt or logs to be downloaded
  3. location ~* \.(txt|log)$ {
  4. deny all;
  5. }
  6. # Not allow execute php in hidden folders
  7. location ~ \..*/.\.php$ {
  8. return 403;
  9. }
  10. # Not allow "hidden files"
  11. location ~ (^|/)\. {
  12. return 403;
  13. }
  14. # Not allow *.json or *.lock
  15. location ~* \.(json|lock)$ {
  16. return 403;
  17. }
  18. # Deny *.ht
  19. location ~ /\.ht {
  20. deny all;
  21. }