网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 
中国网管联盟
Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道
 当前位置: > bitsCN.com > linux > 其它unix > squid13+solaris10 反向代理配置全攻略  

squid13+solaris10 反向代理配置全攻略

2007-07-07  作者:bitsCN整理  来源:中国网管联盟  点评 投稿 收藏

1,准备工作:Solaris10,squid-2.6.STABLE13
2,开始安装和配置:

1) 查看和修改最大连接数:
  #ulimit -a
core file size        (blocks, -c) unlimited
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
open files                    (-n) 65536
pipe size          (512 bytes, -p) 10
stack size            (kbytes, -s) 8480
cpu time             (seconds, -t) unlimited
max user processes            (-u) 8485

网管联盟bitsCN_com


virtual memory        (kbytes, -v) unlimited

修改:vi /usr/include/sys/types.h

#define FD_SETSIZE 10240
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H

2)将squid软件解压和安装到制定目录:
   ./configure --prefix=/usr/local/squid --disable-internal-dns --enable-useragent-log --enable-referer-log(可以看到连接数已经修改为10240)
   make;make install;
3)在squid.conf文件里修改配置:
   vi /usr/local/squid/etc/squid.conf

   增加和修改的部分:
   http_port 80 accel vhost
   hierarchy_stoplist cgi-bin ?
   acl QUERY urlpath_regex cgi-bin \?
   cache deny QUERY
   acl apache rep_header Server ^Apache
   broken_vary_encoding allow apache
网管下载dl.bitscn.com

   cache_mem 1024 MB
   cache_dir ufs /export/home/squid/cache 4000 16 256
   access_log /export/home/squid/logs/access.log squid
   cache_log /export/home/squid/logs/cache.log
   cache_store_log /export/home/squid/logs/store.log
   pid_filename /export/home/squid/logs/squid.pid
   cache_dns_program /usr/local/squid/libexec/dnsserver
   dns_children 10
   hosts_file /etc/hosts
   refresh_pattern ^ftp:           1440    20%     10080
   refresh_pattern ^gopher:        1440    0%      1440
   refresh_pattern .jsp            0       20%     0
网管u家u.bitscn@com

   refresh_pattern .               0       20%     2
   acl acceleratedHostSCUT dstdomain .abc.com

   acl acceleratedProtocol protocol HTTP
   acl acceleratedPort port 80

   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
中国网管论坛bbs.bitsCN.com

   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 Safe_ports port 488         # gss-http
   acl Safe_ports port 591         # filemaker
   acl Safe_ports port 777         # multiling http 网管u家u.bitsCN.com
   acl CONNECT method CONNECT
   http_access allow acceleratedProtocol acceleratedPort acceleratedHostABC

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname webcache3.abc.com
logfile_rotate 10
always_direct allow acceleratedHostABC

coredump_dir /export/home/squid/cache 网管网www_bitscn_com

网管联盟bitsCN@com


TAGs   全攻略   配置   代理   echo   timeout   SQUID   RETVAL   fi   unlimited      
 上一篇:实战solaris之系统帐号管理   下一篇:克服不良的UNIX使用模式
squid13+solaris10 反向代理配置全攻略 评论:
loading.. 评论加载中…
评论:请自觉遵守互联网相关政策法规,评论不得超过250字。

验证码: 注册用户
本类热门排行:
最新推荐文章:
网管论坛交流: