CentOS5.3を利用しております。yumでsquid-2.6.STABLE21-3.el5を入れたのですが、後ほどコメントに追記しますメッセージが出て正常に動きません。

構成としてはロードバランサから画像系ファイルのみsquidサーバにリクエストを飛ばし、もしキャッシュされていなければWEBサーバへ取りに行くというものです。
この構成を実現できる設定ファイルの作成をお願い出来ませんでしょうか?

【動作させたい構成】
ロードバランサ(Pound):192.168.0.1
Squidサーバ:192.168.0.2
WEBサーバ:192.168.0.10

なお、LBとsquidを同じサーバにした場合には動きました。
ロードバランサ(Pound):192.168.0.1
Squidサーバ:192.168.0.1
WEBサーバ:192.168.0.10

不足情報等あればコメント欄にてご指摘頂けると幸いです。
お手数お掛けいたしますが、何卒よろしくお願いします。

回答の条件
  • 1人2回まで
  • 登録:
  • 終了:2009/09/15 13:18:29
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

ベストアンサー

id:b-wind No.1

回答回数3344ベストアンサー獲得回数440

ポイント60pt

MLog: [linux-users:102597] Re: [linux-users:102596] squid ホスト名解決

これじゃないの?


もともと Squid の名前解決は独自実装だし、

場合によってはリビルドの必要もあるようだが。

今日の宇宙人カウントダウン:2003年10月13日分

id:ko-takada

見落としていました。動作問題ありません。

ありがとうございます!

2009/09/15 13:18:03
  • id:ko-takada
    エラーメッセージ
    ================================
    ERROR
    The requested URL could not be retrieved

    While trying to retrieve the URL: http://****************.com/
    The following error was encountered:
    • Unable to forward this request at this time.
    This request could not be forwarded to the origin server or to any parent caches. The most likely cause for this error is that:
    • The cache administrator does not allow this cache to make direct connections to origin servers, and
    • All configured parent caches are currently unreachable.
    Your cache administrator is root.

    Generated Mon, 14 Sep 2009 14:57:45 GMT by serv2.localdomain (squid/2.6.STABLE21)
  • id:ko-takada
    現在反映されている設定ファイルは下記の通りです。
    ※/etc/hostsファイル内にWEBサーバのローカルIPを記述しています。
    ※Firewall内にある為、セキュリティは緩く記述しています。
    ================================
    # cat /etc/hosts
    (前略
    192.168.0.10 **********.com

    # cat /etc/squid/squid.conf | fgrep -v "#" | uniq

    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 localnetwork dst 192.168.0.0/255.255.255.0
    acl SSL_ports port 443
    acl CONNECT method CONNECT

    http_access allow all

    icp_access allow all

    http_port 3128 transparent

    hierarchy_stoplist cgi-bin ?

    cache_dir coss /var/spool/squid/cache_s 128 block-size=512 max-size=16384 membufs=4
    cache_dir coss /var/spool/squid/cache_m 1024 block-size=512 max-size=131072 membufs=8
    cache_dir aufs /var/spool/squid/cache_l 2048 16 64
    maximum_object_size 65536 KB
    access_log none
    cache_log /var/squid/log/cache.log
    cache_store_log none

    access_log /var/log/squid/access.log squid

    acl QUERY urlpath_regex cgi-bin \?
    cache deny QUERY

    refresh_pattern ^ftp: 1440 20% 10080
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern . 0 20% 4320

    acl apache rep_header Server ^Apache
    broken_vary_encoding allow apache

    visible_hostname serv2.localdomain

    coredump_dir /var/spool/squid

    pipeline_prefetch on

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません