Squid反向代理多tomcat配置
Squid反向代理多tomcat配置
http_port 83 accel vhost vport hierarchy_stoplist cgi-bin ? acl apache rep_header Server ^Apache #broken_vary_encoding allow apache cache_mem 2048 MB maximum_object_size_in_memory 2048 KB cache_dir ufs /opt/cache 5120 128 128 strip_query_terms off logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh acl nolog urlpath_regex \.gif \.jpg \.css \.js \.swf \.png \.ico \.GIF \.JPG \.CSS \.JS \.SWF \.PNG \.ICO access_log /var/log/squid/access.log combined !nolog cache_log /var/log/squid/cache.log cache_store_log none hosts_file /etc/hosts url_rewrite_children 200 refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern ^http: 30 50% 60 refresh_pattern . 0 20% 60 connect_timeout 2 minute peer_connect_timeout 120 seconds #acl 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 CONNECT method CONNECT #acl monitor12530 src 10.25.136.105/255.255.255.255 #acl mall-admin url_regex -i ^http://mall\.mydomain\.cn\/admin #acl mclub-admin url_regex -i ^http://mclub\.mydomain\.cn\/admin #http_access allow manager monitor12530 #http_access deny manager #http_access deny mall-admin #http_access deny mclub-admin #http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow all icp_access allow all follow_x_forwarded_for allow all #cache_mgr redcloud_tech_op@redcloud.mobi cache_effective_user squid cache_effective_group squid visible_hostname web4.mydomain.cn #snmp_port 3401 #acl snmppublic snmp_community xxxxxxxxxx #snmp_access allow snmppublic localhost snmp_access deny all coredump_dir /usr/local/squid/var/cache cache_peer 192.168.3.103 parent 8080 0 no-query originserver name=www1 round-robin cache_peer 192.168.3.106 parent 8080 0 no-query originserver name=www2 round-robin cache_peer_domain www1 cache_peer_domain www2 cache_peer_access www1 allow all cache_peer_access www2 allow all # rul 重写规则 #url_rewrite_children 200 # #acl rewriteurl url_regex -i ^http://mclub\.mydomain\.cn\/rts #acl rewriteurl url_regex -i ^http://mydomain\.cn # #url_rewrite_access allow rewriteurl
目录 返回
首页