カスタム検索
このエントリーをはてなブックマークに追加
tomo.gif (1144 ツバツイツト)line.gif (927 ツバツイツト)line.gif (927 ツバツイツト)line.gif (927 ツバツイツト)To previous pageTo home pageMailing to me

Squid (PROXYサーバ)を動かしてみる

Modified: 15 Jun 2001


設定して起動する
ブラウザの設定


 設定して起動する

"/etc/squid/squid.conf" の変更

最低限、赤いところ(4個所)変更します。

#    WELCOME TO SQUID 2
#    ------------------
#
#    This is the default Squid configuration file. You may wish
#    to look at http://cache.is.co.za/squid/ for documentation,
#    or the Squid home page (http://squid.nlanr.net/) for the FAQ.
#
#    The default Squid config file shows what the defaults for
#    various options happen to be. If you don't need to change the
#    default, you shouldn't uncomment the line. Doing so may cause
#    run-time problems. In some cases "none" refers to no default
#    setting at all, whilst in other cases it refers to a valid
#    option - the comments for that keyword indicate if this is the
#    case.
#


# NETWORK OPTIONS
# ---------------------------------------------------

# TAG: http_port
#    The port number where Squid will listen for HTTP client
#    requests. Default is 3128, for httpd-accel mode use port 80.
#    May be overridden with -a on the command line.
#
#    You may specify multiple ports here, but they MUST all be on
#    a single line.
#
http_port 3128
good.gif (1517 ツバツイツト) コメントアウト

(((途中略)))

# LOGFILE PATHNAMES AND CACHE DIRECTORIES
# ---------------------------------------------------

# TAG: cache_dir
#    Usage:
#   
#    cache_dir Directory-Name Mbytes Level-1 Level2
#
#    You can specify multiple cache_dir lines to spread the
#    cache among different disk partitions.
#
#    'Directory' is a top-level directory where cache swap
#    files will be stored. If you want to use an entire disk
#    for caching, then this can be the mount-point directory.
#    The directory must exist and be writable by the Squid
#    process. Squid will NOT create this directory for you.
#
#    If no 'cache_dir' lines are specified, the following
#    default will be used: /usr/local/squid/cache.
#
#    'Mbytes' is the amount of disk space (MB) to use under this
#    directory. The default is 100 MB. Change this to suit your
#    configuration.
#
#    'Level-1' is the number of first-level subdirectories which
#    will be created under the 'Directory'. The default is 16.
#
#    'Level-2' is the number of second-level subdirectories which
#    will be created under each first-level directory. The default
#    is 256.
#
cache_dir ufs /var/spool/squid/cache 100 16 256

(((途中略)))

# TAG: http_access
#    Allowing or Denying access based on defined access lists
#
#    Access to the HTTP port:
#    http_access allow|deny [!]aclname ...
#
#    Access to the ICP port:
#    icp_access allow|deny [!]aclname ...
#
#    NOTE on default values:
#
#    If there are no "access" lines present, the default is to allow
#    the request.
#
#    If none of the "access" lines cause a match, the default is the
#    opposite of the last line in the list. If the last line was
#    deny, then the default is allow. Conversely, if the last line
#    is allow, the default will be deny. For these reasons, it is a
#    good idea to have an "deny all" or "allow all" entry at the end
#    of your access lists to avoid potential confusion.
#
#Default configuration:
#http_access allow manager localhost
http_access allow all

http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
#http_access deny all

(((途中略)))

# ADMINISTRATIVE PARAMETERS
# ----------------------------------------------------

# TAG: cache_mgr
#    Email-address of local cache manager who will receive
#    mail if the cache dies. The default is "webmaster."
#
#cache_mgr webmaster

# TAG: cache_effective_user
# TAG: cache_effective_group
#
#    If the cache is run as root, it will change its effective/real
#    UID/GID to the UID/GID specified below. The default is to
#    change to UID to nobody and GID to nogroup.
#
#    If Squid is not started as root, the default is to keep the
#    current UID/GID. Note that if Squid is not started as root then
#    you cannot set http_port to a value lower than 1024.
#
cache_effective_user squid
cache_effective_group squid

(((途中略)))

 初期化処理をする

# /usr/sbin/squid   -z
1999/08/04 21:38:13| Creating Swap Directories
#

"squid.conf" の、"cache_dir" で設定したディレクトリ(/usr/local/squid/cache)の下に、"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0A", "0B", "0C", "0D", "0E", "0F" が作られます。

作られたディレクトリの、ユーザ/グループは、nobody/nobody となっています。


再起動で自動実行させる

"linuxconf" で設定します。


 ブラウザの設定

Netscapeの場合

「編集」、「設定」を選択し、以下のように、「詳細」、「プロキシ」を選択し、「手動でプロキシを設定する」にチェックをいれ、「表示」ボタンを押します。

sq-set1.gif (13493 ツバツイツト)

「表示」ボタンを押すと、以下のように ”squid” が起動しているIPアドレスとポート番号を入れます。

sq-set2.gif (7775 ツバツイツト)


To previous pageTo home pageMailing to meJump to Top of pageline.gif (927 ツバツイツト)line.gif (927 ツバツイツト)tomo.gif (1144 ツバツイツト)
カスタム検索



このエントリーをはてなブックマークに追加