givanildojesus
(usa Debian)
Enviado em 27/01/2010 - 13:00h
Ola Pessoal estou tentando configurar o meu squid para fazer autenticação, porem mim deparei com alguns erros e não conseguir resolver. Vou postar o meu conf abaixo e os erros que aparecem quando mando restart o squid
#>> Autenticação<<#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic credentialsttl 1 hours
auth param basic realm Login e Senha
auth param basic casesensitive off
# >> Porta padrao <<
http_port 3128 transparent
#-----------------------------------------------------------------------------
hierarchy_stoplist cgi-bin?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 128 MB
maximum_object_size_in_memory 900 KB
maximum_object_size 6144 KB
minimum_object_size 0 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
cache_replacement_policy lru
memory_replacement_policy lru
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
access_log /var/log/squid/access.log squid
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/cache/squid 3000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/spool/squid/swap.log
cache_mgr givanildojesus@gmail.com
error_directory /usr/share/squid/errors/Portuguese
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
# ACCESS CONTROLS
# -----------------------------------------------------------------------------
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl autenticados proxy_auth REQUIRED
acl site_negados url_regex -i "/etc/squid/bloqueados/block.txt"
acl nomes_proibidos url_regex -i "/etc/squid/palavras/negados.txt"
#----------------------------------------------------------------------------#
http_access allow localhost
http_access allow manager localhost
http_access allow autenticados
http_access deny site_negados
http_access deny nomes_proibidos
http_access allow all
http_access deny all
este ai e o meu conf....
quando vou usar o comando htpasswd aparece a seguinte msg: Debian:/etc/squid# htpasswd -c /etc/squid/passwd nome_user
htpasswd: cannot create file /etc/squid/passwd
e quando mando restart o squid vém as seguintes informações:
Debian:/etc/init.d# /etc/init.d/squid restart
Restarting Squid HTTP proxy: squidCreating squid cache structure (warning).
2010/01/27 10:15:50| parseConfigFile: squid.conf:9 unrecognized: 'auth'
2010/01/27 10:15:50| parseConfigFile: squid.conf:10 unrecognized: 'auth'
2010/01/27 10:15:50| Creating Swap Directories
2010/01/27 10:15:51| parseConfigFile: squid.conf:9 unrecognized: 'auth'
2010/01/27 10:15:51| parseConfigFile: squid.conf:10 unrecognized: 'auth'
.
ta ai se alguem pode me ajuda eu agradeço ou se tiver alguma tutorial legal ensinando como configurar autenticação tb será de bom proveito.