Squid acusa erro no cache
Olá gente da lista...
Estou utilizando o FC2 e quando instalo o squid apresenta um erro na criação do cache ao digitar #squid -z:
FATAL: failed to maked swap directory /var/cache/squid/: (13) PERMISSION DENIED squid cache (version 2.5.SATABLED9). Terminate Abnormaly.
Devo alterar a permissão de alguma pasta? Caso positivo, qual?
Reinaldo
Re: Squid acusa erro no cache
Posta ai como vc configurou o seu squid.conf !!!
Squid acusa erro no cache
Segue o squid.conf
hierarchy_stoplist cgi-bin ?
http_port 3128
cache_mem 16 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 30000 KB
minimum_object_size 0 Kb
maximum_object_size_in_memory 4096 KB
cache_dir ufs /var/cache/squid/ 128 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/log/squid/swap.log
debug_options ALL, 2
acl all src 0.0.0.0/24
acl manager proto cache_object
acl localhost src 192.168.0.0/24
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_portS port 21
acl Safe_ports port 22
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025 - 65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Bloqueio_domains url_regex "/etc/squid/bloqueadas"
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow all
http_access deny manager
http_access deny ! Safe_ports
http_access deny bloqueadas
Http_access deny CONNECT ! SSL_ports
icp_access allow all
visible_hostname squid.servidor.intranet
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
Reinaldo
Squid acusa erro no cache
Segue o squid.conf
hierarchy_stoplist cgi-bin ?
http_port 3128
cache_mem 16 MB # Aqui dependendo do numero de maquinas e pouco
cache_swap_low 90
cache_swap_high 95
maximum_object_size 30000 KB # Essa linha vc poderia ter deixado a default do propio squid
minimum_object_size 0 Kb
maximum_object_size_in_memory 4096 KB
cache_dir ufs /var/cache/squid/ 128 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/log/squid/swap.log
debug_options ALL, 2# Essa linha eu acredito que seja desnecessaria
acl all src 0.0.0.0/24
acl manager proto cache_object
acl localhost src 192.168.0.0/24
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_portS port 21
acl Safe_ports port 22
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025 - 65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Bloqueio_domains url_regex "/etc/squid/bloqueadas"# Nessa linha domains e regra pra bloquear sites e url_regex e pra bloquear palavras, vc pode acrescentar url_regex -i pra que o proxy nao distingua minuscula de maiscula
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow all
http_access deny manager
http_access deny ! Safe_ports
Http_access deny CONNECT ! SSL_ports
http_access deny bloqueadas
icp_access allow all
visible_hostname squid.servidor.intranet
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
Qulaquer coisa posta ai !!!
Squid acusa erro no cache
Notei a falta de duas entradas neste conf que são
cache_effective_user squid
cache_effective_group squid
nessas duas linhas vc defina que é o usuario e o grupo responsavel pelo squid, este mesmo deve estar setados nas permissões do seu diretorio cache
chown squid.squid <diretorio do cache> -R
teste ai pode ser que funcione
[]´s
Squid acusa erro no cache
e ai os seus squid.conf estão errados
acl all src 0.0.0.0/24
é
acl all src 0.0.0.0/0.0.0.0
e
acl localhost src 192.168.0.0/24
é
acl localhost src 127.0.0.1/255.255.255.255
Squid acusa erro no cache
olhe bom é muito importante as definicoes das regra
deixe assim seu squid.conf
hierarchy_stoplist cgi-bin ?
http_port 3128
cache_mem 16 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 30000 KB
minimum_object_size 0 Kb
maximum_object_size_in_memory 4096 KB
cache_dir ufs /var/cache/squid/ 128 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/log/squid/swap.log
debug_options ALL, 2
acl rede src 192.168.0.0/24
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/8
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_portS port 21
acl Safe_ports port 22
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025 - 65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow localhost
http_access deny manager
http_access deny ! Safe_ports
Http_access deny CONNECT ! SSL_ports
acl Bloqueio_domains url_regex "/etc/squid/bloqueadas"
http_access deny bloqueadas
http_access deny all
icp_access allow all
visible_hostname squid.servidor.intranet
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
Squid acusa erro no cache
olhe bom é muito importante as definicoes das regra
deixe assim seu squid.conf
hierarchy_stoplist cgi-bin ?
http_port 3128
cache_mem 16 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 30000 KB
minimum_object_size 0 Kb
maximum_object_size_in_memory 4096 KB
cache_dir ufs /var/cache/squid/ 128 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/log/squid/swap.log
debug_options ALL, 2
acl rede src 192.168.0.0/24
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/8
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_portS port 21
acl Safe_ports port 22
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025 - 65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow localhost
http_access deny manager
http_access deny ! Safe_ports
Http_access deny CONNECT ! SSL_ports
acl Bloqueio_domains url_regex "/etc/squid/bloqueadas"
http_access deny bloqueadas
http_access deny all
icp_access allow all
visible_hostname squid.servidor.intranet
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
Squid acusa erro no cache
Squid acusa erro no cache
# chown -R squid:squid /var/cache/squid
# chmod -R 770 /var/cache/squid
Squid funciona bem, muito bem
Pessoal da lista...
Com a ajuda de vcs consegui fazer com que o squid filtre acessos a sites indesejados.
Valeu mesmo...!
Segue a configuração para Fedora 2 e 3:
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir ufs /var/spool/squid 128 16 256
cache_mem 16 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
minimum_object_size 0 Kb
maximum_object_size_in_memory 4096 KB
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
client_netmask 255.255.255.0
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/log/squid/swap.log
acl rede src 192.168.4.0/24
acl SSL_ports port 443 563
acl Safe_portS port 21
acl Safe_ports port 22
acl Safe_ports port 80
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 771
acl Safe_ports port 1025-65535
acl CONNECT method CONNECT
acl permitir_rede src 192.168.4.0
acl proibir_sitios url_regex -i "/etc/squid/sitios"
acl proibir_palavras url_regex -i "/etc/squid/palavras"
acl all src 0.0.0.0/0.0.0.0
http_access deny proibir_sitios
http_access deny proibir_palavras
http_access allow manager localhost
http_access allow permitir_rede
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
icp_access allow all
miss_access allow all
cache_effective_user squid
cache_effective_group squid
visible_hostname squid.servidor.intranet
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
Espero que possa ajudar!