vhost_protect-files.j2 300 B

12345678910111213141516
  1. {% if ansible_controlled is defined and ansible_controlled != "" %}
  2. #
  3. # {{ ansible_controlled }}
  4. #
  5. {% endif %}
  6. #
  7. # Protect hidden files and directories
  8. #
  9. location ~* (?:^|/)\.(?!well-known) {
  10. deny all;
  11. }
  12. location ~* (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
  13. deny all;
  14. }