系统相关
首页 > 系统相关> > Centos 6.4下用Squid配置反向代理多个内网WEB服务器

Centos 6.4下用Squid配置反向代理多个内网WEB服务器

作者:互联网

http_port 80 accel vport
visible_hostname bogon
cache_mem 128 MB

maximum_object_size_in_memory 2048 KB

memory_replacement_policy lru

cache_dir ufs  /usr/local/squid/var/cache/squid 512 16 256

access_log /usr/local/squid/var/logs/access.log

cache_log /usr/local/squid/var/logs/cache.log

max_open_disk_fds 0

minimum_object_size 0 KB

maximum_object_size 32768 KB

#logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h""%{User-Agent}>h" %Ss:%Sh

cache_peer 192.168.20.17 parent 80  0 no-query no-digest originserver name=oa
cache_peer 10.19.113.3 parent 80  0 no-query no-digest originserver name=ob

#需要反向代理的源WEB服务器,可以添加多个 ,若只有一个源WEB服务器,可不设name

 

#需要反向代理的源WEB服务器,可以添加多个

cache_peer_domain oa oa.XXX.com.cn
cache_peer_domain ob ob.XXX.com.cn

#若只有一个源WEB服务器,可不设cache_peer_domain


http_access allow all

cache_effective_user nobody

cache_effective_group nobody

cache_mgr zifu.199s0@163.com

#refresh_pattern ^ftp: 60 20% 10080

#refresh_pattern ^gopher: 60 0% 1440

#refresh_pattern ^gopher: 60 0% 1440

#refresh_pattern . 0 20% 1440

refresh_pattern -i \.css$      360    50%    2880

refresh_pattern -i \.js$        1440    50%    2880

refresh_pattern -i \.html$      720    50%    1440

refresh_pattern -i \.jpg$      1440    90%    2880

refresh_pattern -i \.gif$      1440    90%    2880

refresh_pattern -i \.swf$      1440    90%    2880

refresh_pattern -i \.jpg$      1440    50%    2880

refresh_pattern -i \.png$      1440    50%    2880

refresh_pattern -i \.bmp$      1440    50%    2880

refresh_pattern -i \.doc$      1440    50%    2880

refresh_pattern -i \.ppt$      1440    50%    2880

refresh_pattern -i \.xls$      1440    50%    2880

refresh_pattern -i \.pdf$      1440    50%    2880

refresh_pattern -i \.rar$      1440    50%    2880

refresh_pattern -i \.zip$      1440    50%    2880

refresh_pattern -i \.txt$      1440    50%    2880

 

Linux下配置反向代理,实现一个公网IP代理多个内网的web服务器。

 

 

转载于:https://www.cnblogs.com/daretodream/archive/2013/04/27/3046975.html

标签:WEB,2880,cache,pattern,下用,refresh,1440,50%,内网
来源: https://blog.csdn.net/weixin_34008805/article/details/93324192