Настройка режика с встроенным в squid http сервером
Добавлено: Пн мар 23, 2009 16:03
Поднимать свой апач только для того чтобы выложить на него страницу запрета и один гиф рисунок очень не хотелось. Да и при попытке (после обнаружения этой проблемы) страницы грузились ацки медленно. Хотелось бы доработать этот вариант.
Из настроек - стоит сквид 3 stable 13 настроенный на прокси провайдера (в squid.conf добавлено следующее:
cache_peer proxy.sky.ru parent 3128 0 no-query
prefer_direct off)
ipfw направляет всех на сквид (настроен transparent на 3128 порту)
fwd 127.0.0.1,3128 tcp from 192.168.0.0/24 to any http out via rl0
(rl0 - внешняя сетёвка)
а всё остальное идёт через нат
divert natd ip from any to any via rl0
Большинство сайтов открываются нормально, баннеры с е1 режет шикарно, с подменой проблем нет. НО, собсно суть проблемы:
при открытии некоторых страниц например izvestia.ru вместо баннеров отображаются ошибки следующего содержания:
ERROR
The requested URL could not be retrieved
While trying to process the request:
GET /squid-internal-static/icons/1x1.gif HTTP/1.0
User-Agent: Opera/9.51 (Windows NT 5.1; U; ru)
Host: 192.168.0.1:3128
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: ru-RU,ru;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://izvestia.ru/
Cookie: guid=36CE060648A960AAX1219059882
Cookie2: $Version=1
Pragma: no-cache
Via: 1.1 FreeGate.OFFICE (squid/3.0.STABLE13)
X-Forwarded-For: 192.168.0.24
Cache-Control: no-cache, max-age=259200
Proxy-Connection: keep-alive
The following error was encountered:
Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:
Missing or unknown request method
Missing URL
Missing HTTP Identifier (HTTP/1.0)
Request is too large
Content-Length missing for POST or PUT requests
Illegal character in hostname; underscores are not allowed
Your cache administrator is postmaster@sky.ru.
Generated Mon, 23 Mar 2009 11:51:55 GMT by proxy.sky.ru (squid/2.6.STABLE9)
Какие есть мысли на этот счёт?
Из настроек - стоит сквид 3 stable 13 настроенный на прокси провайдера (в squid.conf добавлено следующее:
cache_peer proxy.sky.ru parent 3128 0 no-query
prefer_direct off)
ipfw направляет всех на сквид (настроен transparent на 3128 порту)
fwd 127.0.0.1,3128 tcp from 192.168.0.0/24 to any http out via rl0
(rl0 - внешняя сетёвка)
а всё остальное идёт через нат
divert natd ip from any to any via rl0
Большинство сайтов открываются нормально, баннеры с е1 режет шикарно, с подменой проблем нет. НО, собсно суть проблемы:
при открытии некоторых страниц например izvestia.ru вместо баннеров отображаются ошибки следующего содержания:
ERROR
The requested URL could not be retrieved
While trying to process the request:
GET /squid-internal-static/icons/1x1.gif HTTP/1.0
User-Agent: Opera/9.51 (Windows NT 5.1; U; ru)
Host: 192.168.0.1:3128
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: ru-RU,ru;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://izvestia.ru/
Cookie: guid=36CE060648A960AAX1219059882
Cookie2: $Version=1
Pragma: no-cache
Via: 1.1 FreeGate.OFFICE (squid/3.0.STABLE13)
X-Forwarded-For: 192.168.0.24
Cache-Control: no-cache, max-age=259200
Proxy-Connection: keep-alive
The following error was encountered:
Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:
Missing or unknown request method
Missing URL
Missing HTTP Identifier (HTTP/1.0)
Request is too large
Content-Length missing for POST or PUT requests
Illegal character in hostname; underscores are not allowed
Your cache administrator is postmaster@sky.ru.
Generated Mon, 23 Mar 2009 11:51:55 GMT by proxy.sky.ru (squid/2.6.STABLE9)
Какие есть мысли на этот счёт?