squid服务

回复 收藏
本帖最后由 licengceng 于 2015-12-15 00:27 编辑

在搭建正向代理的时候没有出现什么错误 但是在做反向代理的时候有些问题 配置如下
http_port 80 accel vhost vport
cache_peer 180.97.33.108 parent 80 0 originserver name=a
cache_peer 101.226.103.106 parent 80 0 originserver name=b
cache_peer_domain a www.qq.com
cache_peer_domain b www.baidu.com
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80 8080         # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access allow al
cache_dir aufs /data/cache 1024 16 256
cache_mem 128 MB
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern \.(jpg|png|gif|mp3|xml) 1440    50%     2880    ignore-reload
refresh_pattern .               0       20%     4320

这些都是按着教程资料上面写的 配置好以后 用ie浏览器设置代理端口为80 发现不管浏览什么网页都不能访问
求解答
2015-12-15 00:21 举报
已邀请:
0

licengceng

赞同来自:

问题已解决 浏览器上面不需要设置代理 要在hosts里面加上相应的域名就行了
0

杭州小白

赞同来自:

http_access allow al这一行最后一个应该是all吧
0

licengceng

赞同来自:

杭州小白 发表于 2015-12-15 09:13
http_access allow al这一行最后一个应该是all吧

额 确实是all  疏忽了这一点

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: