seo站内优化站外优化,免费给我推广,网站建设战略,wordpress抱歉您不能上传文件目录 SQUID代理服务器配置安装squid编辑squid配置文件 定义拒绝访问启动squid服务 linux客户端配置linux客户端配置正向代理测试http代理服务器上查看日志/var/log/squid/access.log windows 也可以配置网页代理 SQUID代理服务器配置
安装squid
yum install squid -y 编辑squ… 目录 SQUID代理服务器配置安装squid编辑squid配置文件 定义拒绝访问启动squid服务 linux客户端配置linux客户端配置正向代理测试http代理服务器上查看日志/var/log/squid/access.log windows 也可以配置网页代理 SQUID代理服务器配置
安装squid
yum install squid -y 编辑squid配置文件
#vim /etc/squid/squid.conf
acl local src 192.168.0.0/24 //允许192.168.0.0/24网段内所有客户机访问代理服务器http_access allow local //该记录一定要添在deny all之前
http_port 3128 定义拒绝访问
# 这一行是定义
acl {定义名字} url_regex -i {关键字}
acl deny_keyword url_regex -i jd.com# 这一行是调用自己定义的
http_access deny {定义名字}http_access deny deny_keyword# 定义好了 之后要重启 服务器
systemctl restart squid启动squid服务
systemctl start squid
systemctl enable squid linux客户端配置
linux客户端配置正向代理
export http_proxyhttp://192.168.0.109:3128
export https_proxyhttp://192.168.0.109:3128
echo export http_proxyhttp://192.168.0.109:3128 /etc/profile
echo export https_proxyhttp://192.168.0.109:3128 /etc/profile
测试http wget http://www.jd.com/index.php可以看到 403
代理服务器上查看日志/var/log/squid/access.log
cat /var/log/squid/access.logwindows 也可以配置网页代理 本章完结