Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!