Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
Why won't apache2.conf deny access to the specified directory?

I have an authentication defined in my .htaccess on my dev domain but I want to put it in apache2.conf instead. If I try to cut/paste the lines, the authentication stops working.

This is my configuration for the directory in question:

<Directory /home/dev>
    AllowOverride None

    <FilesMatch "^.*\.([Hh][Tt][AaPp])">
        Require all denied
    </FilesMatch>

     #AuthType Basic
     #AuthName "Dev Domain"
     #AuthUserFile "/home/dev/public_html/.htpasswd"
     #Require all denied

    #Previously in .htaccess
    SetEnvIf Host dev.mywebsite.com auth
    AuthType Basic
    AuthName "Dev domain"
    AuthUserFile "/home/dev/public_html/.htpasswd"
    Require valid-user

    # first, allow everybody
    Order Allow,Deny
    Satisfy any
    Allow from all
    Require valid-user
    # then, deny only if required
    Deny from env=auth
</Directory>

Any form of Require (Require all denied, Require valid-user) or Deny seems to be ignored. Even the AllowOverride None doesn't work because if I put these lines in /home/dev/public_html/.htaccess, the authentication works.

RewriteRules works though.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda