Bonjour,
j'ai un problème avec la restriction d'acces que j'ai mis en place.
Voila ce que j'ai fait:
un fichier .htaccess
AuthUserFile /usr/login/.htpasswd
AuthGroupFile /dev/null
AuthName {"Acces restreint"}
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
J'ai créé mon fichier .htpasswe, redémarré apache et lorsque je tente d'acceder au répertoire dans lequel se trouve mon .htaccess, j'y accede sans probleme. Aucune invite ne me demande mon login et mon mot de passe, et je n'ai aucune erreur dans les logs!
Ensuite, j'ai regardé le fichier httpd.conf et j'ai remplacé la ligne suivante:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride None
par celle-ci: AllowOverride All
je ne sais pas si c'est une bonne idee. Maintenant, lorsque je tente d'acceder à mon répertoire, j'ai le message suivant qui apparait:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Et dans le fichier error_log, j'ai:
[Fri Aug 26 09:27:36 2005] [alert] [client x.x.x.x] /var/www/html/testhtaccess/.htaccess: AuthName takes one argument, The authentication realm (e.g. "Members Only")
Si vous pouvez me donner des infos pour que ca fonctionne, ce serait pas mal!
Merci d'avance
j'ai un problème avec la restriction d'acces que j'ai mis en place.
Voila ce que j'ai fait:
un fichier .htaccess
AuthUserFile /usr/login/.htpasswd
AuthGroupFile /dev/null
AuthName {"Acces restreint"}
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
J'ai créé mon fichier .htpasswe, redémarré apache et lorsque je tente d'acceder au répertoire dans lequel se trouve mon .htaccess, j'y accede sans probleme. Aucune invite ne me demande mon login et mon mot de passe, et je n'ai aucune erreur dans les logs!
Ensuite, j'ai regardé le fichier httpd.conf et j'ai remplacé la ligne suivante:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride None
par celle-ci: AllowOverride All
je ne sais pas si c'est une bonne idee. Maintenant, lorsque je tente d'acceder à mon répertoire, j'ai le message suivant qui apparait:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Et dans le fichier error_log, j'ai:
[Fri Aug 26 09:27:36 2005] [alert] [client x.x.x.x] /var/www/html/testhtaccess/.htaccess: AuthName takes one argument, The authentication realm (e.g. "Members Only")
Si vous pouvez me donner des infos pour que ca fonctionne, ce serait pas mal!
Merci d'avance