关闭

squid反向代理安装实战

1169人阅读 评论(0) 收藏 举报
 
1,以yum方式安装
  
2,配置:
   #squid.conf
http_port 8080

#max link per client
acl OverConnLimit maxconn 16
http_access deny OverConnLimit

#access limit
acl myip dst 192.168.155.36
http_access deny !myip

#allow admin from local
acl Manager proto cache_object
acl Localhost src 127.0.0.1 192.168.155.36
http_access allow Manager Localhost
http_access deny Manager

#only for port 80
acl all src 0.0.0.0/0.0.0.0
acl Safe_ports port 80
http_access deny !Safe_ports
http_access allow all

#Squid info
visible_hostname www.mydomain.com.cn
cache_mgr info@cnfoto.com.cn

#base setup
cache_dir ufs /usr/local/squid/cache 1024 16 256
cache_mem 512 MB
cache_effective_user squid
cache_effective_group squid
tcp_recv_bufsize 65535 bytes

httpd_accel_host 192.168.155.36
httpd_accel_port 80
httpd_accel_single_host on
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
#2.6 cache
#cache_peer 192.168.155.36 parent 80 0 no-query originserver

#error document
error_directory /usr/share/squid/errors/Simplify_Chinese

#for single
icp_port 0

3,备注:
   /usr/local/squid/cache目录应该设置为chown squid.squid /usr/local/squid/cache
   squid -z 创建cache的目录
  
4,todo list
   1,编译安装2.6
   2,cronolog
   3,设置
   4,优化
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:3122258次
    • 积分:32850
    • 等级:
    • 排名:第145名
    • 原创:76篇
    • 转载:1209篇
    • 译文:0篇
    • 评论:200条
    最新评论
    牛逼的网站