squid反向代理安装实战

 
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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值