Ho provato a mettere in una cartella "protetta" il cui percorso è "D:\Programmi\Apache Software Foundation\Apache2.2\htdocs\giancarlo\protetta" un file .htaccess per limitarne l'accesso.
Il file è scritto così:
AuthType Basic
AuthUserFile /usr/local/Apache2.2/htdocs/giancarlo/htpasswd
AuthName "Restricted"
<LIMIT GET POST>
require valid-user
</LIMIT>
e dovrebbe puntare al file htpasswd che risiede nella directory superiore: "D:\Programmi\Apache Software Foundation\Apache2.2\htdocs\giancarlo".
Ho settato httpd.conf (che si trova al percorso "D:\Programmi\Apache Software Foundation\Apache2.2\conf") sostituendo la direttiva 'AllowOverride None' con 'AllowOverride AuthConfig'.
Ecco dopo aver fatto tutto questo quando richiamo la cartella dalla barra degli indirizzi del browser mi esce prima la richiesta di autenticarmi, dato l'invio mi esce la seguente pagina di errore:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost.local 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.
Questo sia che utilizzi un nome ed una password validi oppure no.

Rispondi quotando