Hola. Llevo horas peleándome con el Apache y nada.
Quiero proteger una carpeta de mi servidor con contraseña. Lo he probado con .htaccess y directamente en el httpd.conf. Y no lo consigo.
Con .htaccess. Meto el .htpasswd y el .htpasswd en la carpeta que quiero proteger.
el .htaccess queda así;
Código:
AuthUserFile C:/Documents and Settings/Mark Schenzle/Mis documentos/Webs/Caleidoscopiostudio/administrador/.htpasswd
AuthGroupFile /dev/null
AuthName Mi Web Carpeta Protegida
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
He intentado poner entre comillas y entre paréntesis la ruta del AuthUserFile y nada.
Me tira el error 500
Ésto lo cojo del error.log
Código:
[Mon Mar 07 16:44:40 2011] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/
[Mon Mar 07 16:44:47 2011] [alert] [client 127.0.0.1] C:/Documents and Settings/Mark Schenzle/Mis documentos/Webs/Caleidoscopiostudio/administrador/.htaccess: AuthName takes one argument, The authentication realm (e.g. "Members Only")
[Mon Mar 07 16:45:45 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Mar 07 16:45:45 2011] [notice] Child 2708: Exit event signaled. Child process is ending.
[Mon Mar 07 16:45:46 2011] [notice] Child 2708: Released the start mutex
[Mon Mar 07 16:45:47 2011] [notice] Child 2708: All worker threads have exited.
[Mon Mar 07 16:45:47 2011] [notice] Child 2708: Child process is exiting
[Mon Mar 07 16:45:47 2011] [notice] Parent: Child process exited successfully.
[Mon Mar 07 16:45:56 2011] [notice] Digest: generating secret for digest authentication ...
[Mon Mar 07 16:45:57 2011] [notice] Digest: done
[Mon Mar 07 16:45:57 2011] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Mon Mar 07 16:45:57 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon Mar 07 16:45:57 2011] [notice] Parent: Created child process 3232
[Mon Mar 07 16:45:57 2011] [notice] Digest: generating secret for digest authentication ...
[Mon Mar 07 16:45:57 2011] [notice] Digest: done
[Mon Mar 07 16:45:57 2011] [notice] Child 3232: Child process is running
[Mon Mar 07 16:45:57 2011] [notice] Child 3232: Acquired the start mutex.
[Mon Mar 07 16:45:57 2011] [notice] Child 3232: Starting 64 worker threads.
[Mon Mar 07 16:45:57 2011] [notice] Child 3232: Starting thread to listen on port 80.
[Mon Mar 07 16:46:06 2011] [alert] [client 127.0.0.1] C:/Documents and Settings/Mark Schenzle/Mis documentos/Webs/Caleidoscopiostudio/administrador/.htaccess: AuthName takes one argument, The authentication realm (e.g. "Members Only")
También lo probé haciéndolo en el httpd.conf poniendo dentro de <Directory "C:/Documents and Settings/Mark Schenzle/Mis documentos/Webs/Caleidoscopiostudio/administrador/"
Código:
AuthUserFile C:/Documents and Settings/Mark Schenzle/Mis documentos/Webs/Caleidoscopiostudio/administrador/.htpasswd
AuthGroupFile /dev/null
AuthName Mi Web Carpeta Protegida
Require user administrador
Nada lo mismo. ¿Alguien sabe por que pasa? son las rutas que estan mal escritas? me dejo algo?
PD: tengo el modulo de apache auth_basic_module activado.
Gracias