Linux與雲計算——第二階段Linux伺服器架設
第一十一章:代理Proxy伺服器架設—Squid配置反向代理
反向代理設定
[1] 配置Squid.
[root@server ~]# vim /etc/squid/squid.conf
# 54: 添加 ( 允許所有http通路 )
http_access allow all
# line 63: 指定後端WEB伺服器
http_port 80 accel defaultsite=client.example.com
# line 62: 取消注釋
# number means [disk cache size] [number of directories on top level] [number of directories on 2nd level]
cache_dir ufs /var/spool/squid 100 16 256
# 在最後部分添加
cache_peer client.example.com parent 80 0 no-query originserver
# memory cache size
cache_mem 256 MB
# define hostname
visible_hostname www.example.com