您的位置:首页 > 运维架构 > 反向代理

如何部署一个squid代理

2016-04-13 00:00 495 查看
摘要: linux squid代理安装过程

1. 检查是否安装 rpm -qa|grep squid

2.安装 yum -y install squid

3.chkconfig --level 35 squid on //开机启动

mv /etc/squid/squid.conf /etc/squid/squid.conf.bak

4.修改配置文件 vim /etc/squid/squid.conf

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
via off
request_header_access X-Forwarded-For deny all
request_header_access user-agent deny all
reply_header_access X-Forwarded-For deny all
reply_header_access user-agent deny all
http_port 8080
http_access allow all
access_log /var/log/squid/access.log
visible_hostname squid.david.dev
cache_mgr 2151@qq.com

5.初始化squid –z

6.启动 service squid start

7.查看 squid access 日志 tail -f /var/log/squid/access.log

8.squid -s reload修改配置后重载
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息