CentOS5 squid 基本配置文件
squid-2.6#cat /etc/squid/squid.conf
http_port 3128
cache_mem 400 MB
cache_swap_high85
cache_swap_low70
cache_log /dev/null
cache_store_log /dev/null
emulate_httpd_log on
pid_filename /var/run/squid.pid
useragent_log /var/log/squid/useragent.log
ident_timeout 1 seconds
cache_dir ufs/data/squid 30000 16 256
dns_nameservers 202.101.172.35
cache_effective_user squid
cache_effective_group squid
cache_mgr sxj@netsun.com
visible_hostname netsunDX
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 SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535# unregistered ports
acl Safe_ports port 280 # http-mgmt
acl CONNECT method CONNECT
http_access allow all
------------------------配置文件详解----------------------------
端口和网络
保持默认3128端口。 http_port 3128
其他高速缓存
如无兄弟缓存或者父缓存则不需配置。
内存使用
内存使用限制: 400M cache_mem 400 MB
磁盘高水印: 85% cache_swap_high 85
磁盘低水印: 70% cache_swap_low 70
最大高速缓存目标大小:32768 maximum_object_size 32768 KB
登录
Access log files: /var/log/squid/access.log access_log /var/log/squid/access.log
调试登录文件:/dev/null cache_log /dev/null
存储登录文件:/dev/null cache_store_log /dev/null
高速缓存原文件: cache_swap_log
使用HTTPD登录格式?:是 emulate_httpd_log on
PID文件:/var/run/squid.pid pid_filename /var/run/squid.pid
用户代理登录文件:/var/log/squid/useragent.log useragent_log /var/log/squid/useragent.log
RFC931 身份查找超时:1秒 ident_timeout 1 seconds
高速缓存选项
高速缓存目录:/data/squid 类型:ufs大小:30000 一级目录:16 二级目录:256
cache_dir ufs /data/squid 30000 16 256
帮助程序
Dns服务器地址:8.8.8.8 dns_nameservers 8.8.8.8
管理选项
以unix用户身份运行:squid cache_effective_user squid
以unix组的身份运行:squid cache_effective_group squid
高速缓存管理邮件地址:test@test.com cache_mgr test@test.com
可见主机名:netsun visible_hostname netsun
页:
[1]