squid.confのaclの引数をファイルで指定する

スポンサーリンク
スポンサーリンク

ちょっとはまってしまったのでメモ。
キャッシュサーバ squid の設定ファイル squid.conf で、aclを記述する際にファイル中に書いた内容を指定できますが、ダブルクォーテーションでくくらないとファイル名として認識されません。

acl blacklist dstdomain "/etc/squid/blacklist.txt"

ダブルクォーテーションつけずに書いて、うまく動かずにしばらく原因がわからず。

確かに、squidのaclの説明で、ファイル名はくくるように書かれてましたね・・

Every access list definition must begin with an aclname and acltype,
followed by either type-specific arguments or a quoted filename that they are read from.

acl aclname acltype argument …
acl aclname acltype “file” …

When using “file”, the file should contain one item per line.

http://www.squid-cache.org/Doc/config/acl/

コメント

タイトルとURLをコピーしました