Squid выдает ошибка!!!

Конфигурирование прокси-сервера (Установка, настройка SQUID)
Ответить
eem-kz
Сообщения: 14
Зарегистрирован: 09 апр 2009, 13:21

Squid выдает ошибка!!!

Сообщение eem-kz » 11 апр 2009, 12:21

После настройки squid начинает нормально работать через определенный (примерно 20 минут, Последный раз даже после перезапуска не работает) время ошибка выдает «Кеш не в состояние определит IP адреса»...... Где я пропусти ошибки? Посматрите пожалуйста..

Сервере установленоLinux localhost.localdomain 2.6.17-1.2157.1asp #1 Fri Aug 11 03:02:11 EEST 2006 i686 i686 i386 GNU/Linux

Версия Сквида

[root@localhost ~]# rpm -qi squid
Name : squid Relocations: (not relocatable)
Version : 2.5.STABLE14 Vendor: ASPLinux
Release : 3.112asp Build Date: Птн 19 Янв 2007 15:11:54
Install Date: Суб 17 Янв 2009 14:06:03 Build Host: amd64.asplinux.com.ua
Group : System Environment/Daemons Source RPM: squid-2.5.STABLE14-3.112asp.src.rpm
Size : 3374480 License: GPL
Signature : DSA/SHA1, Птн 19 Янв 2007 19:54:00, Key ID c96aa8e69b3c94f4
Packager : ASPLinux Team <packages@asp-linux.com>
Summary : The Squid proxy caching server.

Конфигурация

[root@localhost squid]# cat squid.conf


http_port 2020
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?

maximum_object_size_in_memory 0 KB

cache_dir ufs /var/spool/squid 2048 64 256

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log

#cache_mgr admin@my_domain.ru
#visible_hostname mail.my_domain.ru

#cp_outgoing_address 222.222.222.222
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#redirect_program /etc/squid/redirector.pl
#redirect_children 10


#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 class src 192.168.90.0-192.168.90.100/255.255.255.255

acl SSL_ports port 443 563 25
acl Safe_ports port 80 110 # http
acl Safe_ports port 21 22 # ftp
acl Safe_ports port 443 563 # https, snews
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 CONNECT method CONNECT
#
# Squid Blocks
# http://www.hklc.com/squidblock/
#
#acl squid_block_badlang url_regex -i "/etc/squid/squidblock/badlang.block.txt"
#acl squid_unblock_badlang url_regex -i "/etc/squid/squidblock/badlang.unblock.txt"
#acl squid_block_entertain url_regex -i "/etc/squid/squidblock/entertain.block.txt"
#acl squid_unblock_entertain url_regex -i "/etc/squid/squidblock/entertain.unblock.txt"
#acl squid_block_games url_regex -i "/etc/squid/squidblock/games.block.txt"
#acl squid_unblock_games url_regex -i "/etc/squid/squidblock/games.unblock.txt"
#acl squid_block_pirate url_regex -i "/etc/squid/squidblock/pirate.block.txt"
#acl squid_block_mp3 url_regex -i "/etc/squid/squidblock/mp3.block.txt"
#acl squid_unblock_pirate url_regex -i "/etc/squid/squidblock/pirate.unblock.txt"
#acl squid_block_porn url_regex -i "/etc/squid/squidblock/porn.block.txt pron.block.txt"
#acl squid_unblock_porn url_regex -i "/etc/squid/squidblock/porn.unblock.txt"
acl bad_sites url_regex -i "/etc/squid/bad_sites.txt"
acl bigfiles urlpath_regex \.mp3$ \.avi$ \.mpeg$ \.mov$ \.dat$ \.tif$ \.bat$ \.exe$ \.zip$ \.jpg$ \.swf$ \.rar$
no_cache deny QUERY

#http_access deny squid_block_badlang
#http_access deny squid_block_entertain
#http_access deny squid_block_games
#http_access deny squid_block_pirate
#http_access deny squid_block_mp3
#http_access deny squid_block_porn
#http_access deny bad_sites
http_access deny bigfiles
http_access allow localhost
http_access allow class

#http_access allow PURGE localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
#
#http_access deny to_localhost
#http_access allow localhost
http_access deny CONNECT
#http_acces deny PURGE
http_access deny all

#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on

error_directory /etc/squid/errors/Russian-1251
coredump_dir /var/spool/squid
pid_filename /var/run/squid.pid
#delay_initial_bucket_level 50

Аватара пользователя
Роман Торопов
Администратор
Сообщения: 134
Зарегистрирован: 24 мар 2008, 10:49
Откуда: г. Пермь
Контактная информация:

Re: Squid выдает ошибка!!!

Сообщение Роман Торопов » 11 апр 2009, 13:15

1. установи стандартный порт подключения пользователей, т.е. 3128

2. Начни с простого конфига:

Код: Выделить всё

http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 80 MB
ftp_user anonymous@mail.ru
quick_abort_min 5 KB
quick_abort_max 5 KB
negative_ttl 1 minutes
read_timeout 4 minutes
client_lifetime 2 minutes
redirect_children 15
auth_param basic children 5
auth_param basic realm kontora (name)
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern .		0	20%	4320

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 20 21 22 443 563 9091 31660 28923 18229 # icq, ibank
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 22 # ssh
acl Safe_ports port 23 # telnet
acl Safe_ports port 443 563 9091 31660 28923 18229 # https, snews, icq, ibank
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
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 5001 # commplex-link
acl Safe_ports port 5002 # rfe
acl Safe_ports port 5003 # filemaker
acl Safe_ports port 1025-65535 # unregistered ports
acl CONNECT method CONNECT
http_access allow all
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_reply_access allow all

access_log /var/log/squid/access.log squid
cache_dir ufs /var/cache/squid 10240 16 256 
visible_hostname proxy
error_directory /etc/squid/errors/Russian-1251
cache_mgr admin@mail.ru
cache_effective_user squid
cache_effective_group squid

eem-kz
Сообщения: 14
Зарегистрирован: 09 апр 2009, 13:21

Re: Squid выдает ошибка!!!

Сообщение eem-kz » 11 апр 2009, 14:21

Изменил ЭТО
cache_access_log /var/log/squid/access.log

Если без авторизация тогда эти строки не нужен?

redirect_children 15
auth_param basic children 5
auth_param basic realm kontora (name)
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

Ответить