Boa Noite galera,
Seguinte uso o centos 5.6 atualizado, squid version 2.6.STABLE21 + ldap +samba.
coloquei o squid para autenticar no ldap e tudo esta funcionando.
O PROBLEMA:
sempre no primeiro acesso do dia quando o usuario coloca user e senha demora algo em torno de 4 minutos para mostrar a pagina, depois disso ele volta a velocidade normal posso fechar o browser e abrir novamente que ele acessa normalmente mais quando reinicio o pc e tento acessar novamente mais uma vez demora uma vida para ele mostrar a pagina. fica no canto da janela "aguardando pagina ....."
pensei q era dns entao configurei um dns interno e coloquei nas configurações dele. tentei dns externos etc. e nada =\ vou postar o meu squid.conf se alguem puder me da um help agradeço muitoooo.
se alguem tiver alguma ideia de otimização sera muito bem aceita.
## Squid normally listens to port 3128
http_port 8080
hierarchy_stoplist cgi-bin ?
error_directory /usr/share/squid/errors/Portuguese/
#We recommend you to use the following two lines.
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
# Apache to signal ETag correctly on such responses
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
#Default:
cache_mem 2048 MB
#Default:
maximum_object_size_in_memory 128 KB
maximum_object_size 256 MB
minimum_object_size 0 kb
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /cache 40000 16 256
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/run/squid.pid
auth_param basic program /usr/libexec/squid_ldap_auth -R -b "ou=Usuarios,o=xxx" -f "uid=%s" -d one -h 10.10.170.101
auth_param basic children 5
auth_param basic realm (controle de acesso monitorado): "Entre com seu usuario e senha."
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
###external_acl_type ldap_group %LOGIN /usr/libexec/squid_ldap_group -d -b "ou=Grupos,o=xxx" -B "ou=Usuarios,o=xxx" -f "(&(memberuid=%u)(cn=%g))" -D cn=admin,o=xxx -w xxx -h 10.10.170.101
#Suggested default:
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#Recommended minimum configuration:
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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 81 #http
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 1025-65535 #unregistered ports
acl purge method PURGE
acl CONNECT method CONNECT
acl rede_local src 10.10.170.0/255.255.255.0
##acl libera_msn url_regex -i "/etc/squid/scripts/sites_msn"
acl autenticacao proxy_auth REQUIRED
acl grupo_livre proxy_auth "/etc/squid/scripts/grp-internet-livre"
acl grupo_restrito_horario proxy_auth "/etc/squid/scripts/grp-internet-horario"
acl sites_proibidos url_regex -i "/etc/squid/scripts/sites_proibidos"
acl sites_permitidos url_regex -i "/etc/squid/scripts/sites_permitidos"
#acl grupo_msn proxy_auth "/etc/squid/scripts/grp-internet-msn"
acl horario_permitido time SMTWHFA 00:01-08:00 12:00-14:00 18:00-23:59
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
http_access allow grupo_livre
## ACL PARA LIBERAR O MSN
##http_access allow grupo_msn
##ACL PARA O GRUPO HORARIO
http_access deny sites_proibidos !sites_permitidos !horario_permitido
##http_access deny extban !horario_permitido
http_access allow grupo_restrito_horario
## ACL PARA O GRUPO RESTRITO
##http_access deny sites_proibidos !sites_permitidos
##http_access deny extban
##http_access allow grupo_restrito
## ACL PARA O GRUPO BLOQUEADO
##http_access deny all !sites_permitidos
##http_access allow grupo_bloqueado
##http_access deny sites_proibidos !sites_permitidos
##http_access allow grupo_restrito
##http_access deny horario_proibido
##http_access allow grupo_restrito_horario
##http_access allow autenticacao
http_access allow autenticacao
http_access allow rede_local
# And finally deny all other access to this proxy
http_access allow localhost
http_access deny all
tcp_outgoing_address 186.215.83.64
# Insert your own rules here.
http_reply_access allow all
#Allow ICP queries from everyone
icp_access allow all
visible_hostname lx-xxx-fw
# Leave coredumps in the first cache dir
##coredump_dir /var/spool/squid
coredump_dir /cache
dns_nameservers 127.0.0.1
##dns_nameservers 208.67.220.220
##dns_nameservers 208.67.222.222
log_fqdn off