![Squid实现反向代理的方法_休闲](https://s2.51cto.com/attachment/200807/200807111215755597406.jpg?x-oss-process=image/resize,m_fixed,w_1184)
![Squid实现反向代理的方法_休闲_02](https://s2.51cto.com/attachment/200807/200807111215755622609.jpg?x-oss-process=image/resize,m_fixed,w_1184)
- Last-Modified: 告诉反向代理页面什么时间被修改
- Expires: 告诉反向代理页面什么时间应该从缓冲区中删除
- Cache-Control: 告诉反向代理页面是否应该被缓冲
- Pragma: 告诉反向代理页面是否应该被缓冲.
1. Squid反向代理单个后台WEB服务器
http_port 80 # squid监听的端口 |
![Squid实现反向代理的方法_休闲_03](https://s2.51cto.com/attachment/200807/200807111215755647750.jpg?x-oss-process=image/resize,m_fixed,w_1184)
cache_peer 192.168.6.101 parent 80 0 no-query originserver |
half_closed_clients off
cache_swap_low 95
cache_swap_high 98
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_swap_log /var/log/squid/swap.log
#url_rewrite_host_header on
#http_access deny OverConnLimit
acl Localhost src 127.0.0.1 192.168.6.101
http_access allow Manager Localhost
http_access deny Manager
acl LAN src 192.168.6.0/24
acl manager proto cache_object
acl Safe_ports port 80
http_access allow LAN
http_access deny !Safe_ports
http_access allow all
cache_mgr [email]root@xxx1.com[/email]
cache_effective_group squid
tcp_recv_bufsize 65535 bytes
cache deny QUERY
#cache_peer 192.168.1.55 parent 80 0 no-query originserver name=my55
#cache_peer 192.168.1.88 parent 80 0 no-query originserver name=my88
#cache_peer_domain master .xxx1.com .xxx2.com .xxx3.cn .xxx4.com .xxx5.cn .xxx6.com .xxx7.cn
#cache_peer_domain my55 test.xxx8.com
#cache_peer_domain my88 test2.xxx8.com