Skip to content

Instantly share code, notes, and snippets.

@douglascabral
Last active May 28, 2020 21:54
Show Gist options
  • Save douglascabral/7c16b8a4fe16fa91bda3ccab19d17482 to your computer and use it in GitHub Desktop.
Save douglascabral/7c16b8a4fe16fa91bda3ccab19d17482 to your computer and use it in GitHub Desktop.
Parâmetros de segurança para o Apache
#bloqueia o acesso ao git
RedirectMatch 404 /\\.git(/|$)
#bloqueia o acesso em arquivos e pastas ocultas
RedirectMatch 404 (?i)/\..+
#bloqueia o acesso ao node_modules e vendor
RedirectMatch 403 (?i)/View/node_modules
RedirectMatch 403 (?i)/vendor
#não permite listagem de pastas sem index
Options -Indexes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment