イカリバースプロキシキャッシュサーバ----
イカが要求されたリソースのリバースプロキシサーバーをキャッシュする場合は、そのリソース要求は、直接クライアントに返される、
またはリバースプロキシサーバーは、バックグラウンドのWEBサーバのリソースを要求しますその後、クライアントの要求に対する応答を返す、
だけでなく、次の依頼者のために使用するローカルキャッシュに対応し、
1、区別する最初のページ
[root@web httpd]# cd /var/www/html/
[root@web html]# ls
[root@web html]# vim index.html
<h1>this is test1 web</h1>
2、以前の実験に基づいて、サーバーWEB2を開くには:192.168.247.161を
[root@localhost ~]# hostnamectl set-hostname web2
[root@localhost ~]# su
[root@web2 ~]#
[root@web2 ~]# systemctl stop firewalld
[root@web2 ~]# setenforce 0
[root@web2 ~]# yum install httpd -y
[root@web2 ~]# cd /var/www/html/
[root@web2 html]# vim index.html
<h1>this is test2 web2</h1>
[root@web2 html]# systemctl start httpd
[root@web2 html]# netstat -natp | grep 80
tcp6 0 0 :::80 :::* LISTEN 17713/httpd
[root@web2 html]# route add -net 192.168.10.0/24 gw 192.168.247.206
3、イカリバースプロキシ構成サーバに切り替える192.168.247.206
[root@squid sarg]# vim /etc/squid.conf
# Squid normally listens to port 3128
http_port 192.168.247.206:80 accel vhost vport //修改
//下面为增加
cache_peer 192.168.247.160 parent 80 0 no-query orginserver round-robinmax_conn=30 weight=1 name=web1
cache_peer 192.168.247.161 parent 80 0 no-query orginserver round-robin max_conn=30 weight=1 name=web2
cache_peer_domain web1 web2 www.yun.com
[root@squid sarg]# netstat -natp | grep 80
tcp6 0 0 :::80 :::* LISTEN 63454/httpd
[root@squid sarg]# systemctl stop httpd
[root@squid sarg]# netstat -natp | grep 80
[root@squid sarg]# service squid restart
正在关闭 squid...
正在启动 squid...
[root@squid sarg]# netstat -natp | grep 80
tcp 0 0 192.168.247.206:80 0.0.0.0:* LISTEN
4、ファイアウォールと強化されたセキュリティ機能をオフにします
[root@squid sarg]# systemctl stop firewalld
[root@squid sarg]# setenforce 0
図5は、クライアントのhostsファイル、使用ADMINISTER win10変更
とアクセスイカ