squid 配置问题:反向代理无法访问 HTTP 网站

2017-02-07 14:17:18 +08:00
 qsnow6

手里有一批临时代理,打算全部丢进squid做反向代理,让squid自动隔离那些失效的代理; 但是配置了2天了,一直不生效,头疼。。。。

下面这个是配置

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
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny manager
http_access allow all
http_access allow localhost
http_access deny all
http_port 8888
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 (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .               0       20%     4320

# visible_hostname haha
via off
forwarded_for delete
# forwarded_for off
#follow_x_forwarded_for deny all
#request_header_access X-Forwarded-For deny all
#request_header_access From deny all
#request_header_access Referer deny all
#request_header_access User-Agent deny all
# request_header_access Via deny all

###cache_peer start

cache_peer 112.193.71.239 parent 8888 0 no-query weighted-round-robin weight=1 connect-fail-limit=2 allow-miss max-conn=5 name=119.122.93.112820

never_direct allow all

除了能访问百度搜索结果页以外,其它网站都访问不了。

返回的提示是这样的:

当尝试取回该 URL 时遇到下面的错误: http://tieba.baidu.com/p/4967277133?

    目前无法将您的请求进行转送操作

可能的问题包括:

缓存服务器的管理员 webmaster.

3494 次点击
所在节点    Linux
2 条回复
qsnow6
2017-02-07 16:43:37 +08:00
rocketman13
2018-11-02 21:10:07 +08:00
你好,你好怎么处理呢?配置文件怎么设置

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/338729

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX