Страница 1 из 1

SQUID - не могу ограничить размер скачиваемого файла

Добавлено: 2006-11-10 12:17:26
FreePascal
Всем привет!!!
Итак читаю ФАК по сквиду

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

7. Could not upload files of size more than 1MB in the squid proxy server ?	

The problem is due to the configuration parameter request_body_max_size 1 MB in squid.conf file

Please change the configuration parameter to:
request_body_max_size 0 in squid.conf file and restart the squid server.
Соответственно добавляю ету строчку в свой конф, перезагружаю и всеравно качаю
файлы любого размера :(
Некто не сталкивался с етим???

Re: SQUID - не могу ограничить размер скачиваемого файла

Добавлено: 2006-11-10 12:26:15
lexy
FreePascal писал(а):Всем привет!!!
Итак читаю ФАК по сквиду

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

7. Could not upload files of size more than 1MB in the squid proxy server ?	

The problem is due to the configuration parameter request_body_max_size 1 MB in squid.conf file

Please change the configuration parameter to:
request_body_max_size 0 in squid.conf file and restart the squid server.
Соответственно добавляю ету строчку в свой конф, перезагружаю и всеравно качаю
файлы любого размера :(
Некто не сталкивался с етим???

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

request_body_max_size 0 
означает, что можно качать любой размер

Добавлено: 2006-11-10 12:38:32
FreePascal
Так я не правильно выразился, написал я ето в конфе

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

request_body_max_size 1 MB
И качаю файлы любого размера

Добавлено: 2006-11-10 13:07:46
FreePascal
Нашел в конфиге вот такую конструкцию

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

#  TAG: reply_body_max_size     bytes allow|deny acl acl...
#        This option specifies the maximum size of a reply body in bytes.
#       It can be used to prevent users from downloading very large files,
#       such as MP3's and movies. When the reply headers are received,
#       the reply_body_max_size lines are processed, and the first line with
#       a result of "allow" is used as the maximum body size for this reply.
#       This size is checked twice. First when we get the reply headers,
#       we check the content-length value.  If the content length value exists
#       and is larger than the allowed size, the request is denied and the
#       user receives an error message that says "the request or reply
#       is too large." If there is no content-length, and the reply
#       size exceeds this limit, the client's connection is just closed
#       and they will receive a partial reply.
#
#       WARNING: downstream caches probably can not detect a partial reply
#       if there is no content-length header, so they will cache
#       partial responses and give them out as hits.  You should NOT
#       use this option if you have downstream caches.
#
#       If you set this parameter to zero (the default), there will be
#       no limit imposed.
#
Соответственно пишу

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

reply_body_max_size 100 deny all
И снова качаю что хочю :?

Добавлено: 2006-11-10 13:54:37
Sapsan
а чтонить типа
acl all src 10.0.0.0/24
не надо случаем?
и не маловато ли ограничение в 100 байт?)

Добавлено: 2006-11-10 14:20:16
FreePascal
Sapsan писал(а):а чтонить типа
acl all src 10.0.0.0/24
не надо случаем?
и не маловато ли ограничение в 100 байт?)
acl all src 0.0.0.0/0.0.0.0 есть, но я и пробывал с другими ацл где у меня явно мой ИП указан

Ограничение менялось, было и 100 и 1000 и 1.5М всеравно нечего.
Но если бы ето работало то ано бы работало с любым ограничением

Добавлено: 2006-11-10 15:44:22
Sapsan
попробуй заменить deny на allow)

Добавлено: 2006-11-10 16:36:34
lexy
squid -k reconfigure ?

Добавлено: 2006-11-10 16:48:38
FreePascal
Sapsan писал(а):попробуй заменить deny на allow)
Да действительно заработало, но написано то на оборот :?:

Добавлено: 2006-11-11 13:34:54
sidor-r
У меня не х... не заработало нормально.
ставлю и так:

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

reply_body_max_size 1024 allow all
и так:

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

reply_body_max_size 10240 allow all
При этом любая страница грузится не до конца.
Пробовал и так:

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

reply_body_max_size 10 MB allow all
На это во время перезагрузки squid'а ругается:

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

2006/11/11 13:29:08| squid.conf line 2069: reply_body_max_size 10 MB allow all
2006/11/11 13:29:08| aclParseAccessLine: expecting 'allow' or 'deny', got 'MB'.
Как всё таки можно ограничеть пользователей десятью мегабайтами скачиваемого файла?

Добавлено: 2006-11-11 18:25:06
lexy
должно быть

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

reply_body_max_size 10MB allow all
а не

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

reply_body_max_size 10 MB allow all 

Добавлено: 2006-11-11 18:55:52
sidor-r
lexy писал(а):должно быть

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

reply_body_max_size 10MB allow all
а не

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

reply_body_max_size 10 MB allow all 
Так тоже пробовал, но всё равно страници загружаются не до конца.
С чем это может быть связано?

Добавлено: 2006-11-11 20:18:40
FreePascal
lexy писал(а):должно быть

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

reply_body_max_size 10MB allow all
а не

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

reply_body_max_size 10 MB allow all 
В данном случае размер нужно указывать в байтах как и написано
в описании к етой опции, при указании "MB" без пробела страницы
недогружаются