Apache
Codigo para o apache restringir pastas. Basta acessar /etc/httpd/conf/httpd.conf e adicionar no final do arquivo as linhas abaixo:
# Diretorio Protegido - Squid
<Directory "/var/www/html/squid">
require user root
AuthType Basic
AuthName "Área Restrita - Sena"
AuthUserFile /etc/sarg/passwd
</Directory>
Reinicie o serviço do Apache:
service httpd restart
Não esqueça de criar o arquivo de senha:
htpasswd -c /etc/sarg/passwd root