Linux與雲計算——第二階段 第一十一章:代理Proxy服務器架設—Squid配置反向代理

Linux與雲計算——第二階段Linux服務器架設

第一十一章:代理Proxy服務器架設—Squid配置反向代理

反向代理設置

[1] 配置Squid.

[root@server ~]# vim /etc/squid/squid.confvim

# 54: 添加 ( 容許全部http訪問 )後端

http_access allow all 瀏覽器

# line 63: 指定後端WEB服務器服務器

http_port 80 accel defaultsite=client.example.comide

# line 62: 取消註釋ui

# 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 256spa

# 在最後部分添加代理

cache_peer client.example.com parent 80 0 no-query originserverorm

# memory cache size

cache_mem 256 MB

# define hostname

visible_hostname www.example.com

[root@server ~]# systemctl start squid

[root@server ~]# systemctl enable squid

[2] 經過瀏覽器訪問www.example.com進行驗證

相關文章
相關標籤/搜索