Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

208
Visualizações
How to specify a whitelist for HTTP basic authentication (to except certain paths from requiring a password)?

Here's the essential part of my current configuration, where I protect my entire website using HTTP basic authentication:

<VirtualHost *:443>
  <Location "/">
    AuthType Basic
    AuthName "Protected Area"

    AuthBasicProvider file
    AuthUserFile /path/to/passwords_file

    Require valid-user
  </Location>
</VirtualHost>

However, I want to except certain paths so they are publicly available, specifically robots.txt, favicon.ico, manifest.json. How to do this?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Adding the following configuration block after the existing Location one will except the specified paths from requiring a password:

<Location ~ "^/favicon\.ico$|^/manifest\.json$|^/robots\.txt$">
    Require all granted
</Location>

This one uses a single regex matching string for all files, but you could also specify each of them individually, one at a time, without using regex:

<Location "/favicon.ico">
    Require all granted
</Location>

<Location "/manifest.json">
    Require all granted
</Location>

<Location "/robots.txt">
    Require all granted
</Location>
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda