●squid.confを編集する |
次にsquid.confの編集を行う。locateコマンドなどでsquid.confのありかを捜しておこう。RPMでインストールされているなら,
# cd /etc/squid # vi squid.conf |
のようにすればよい。squid.confを開いたら,vi上で「/redirect_program」と入力して検索し,「redirect_program」以下を下記のように変更し,保存してSquidの再起動を行う。
# TAG: redirect_program # Specify the location of the executable for the URL redirector. # Since they can perform almost any function there isn't one included. # See the Release-Notes for information on how to write one. # By default, a redirector is not used. # #Default: # none redirect_program /usr/local/squirm/bin/squirm # TAG: redirect_children |
※redirect_program リダイレクタプログラムへのパス指定
redirect_children リダイレクタプログラムを立ち上げる数。ここでは10に指定している
・Squidの再起動
squid.confの編集が終わったら,
# /etc/rc.d/init.d/squid restart |
のように入力して,Squidを再起動させよう。
・グループviralator,ユーザーviralatorの追加
最後にグループ「viralator」と,それに属するユーザー「viralator」を追加する。
# groupadd viralator |
●Apacheの設定 |
httpd.confに下記のように加えて保存し,Apacheの再起動を行う。VirtualHostの設定を行うのが目的だ。
RPMパッケージでインストールしたApacheならば,
# vi /etc/httpd/conf/httpd.conf |
として,httpd.confを編集しよう。先ほどのように,vi上で「/VirtualHost」として項目を検索して,VirtualHostにリスト3のようなパラメータを追加する。なお,環境に応じてIPアドレスやディレクトリは変更してほしい。
変更が終わったら,
# /etc/rc.d/init.d/httpd restart |
として,apacheを再起動しよう。
4/5 |