V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
qsnow6
V2EX  ›  Linux

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

  •  
  •   qsnow6 · 2017-02-07 14:17:18 +08:00 · 3446 次点击
    这是一个创建于 2641 天前的主题,其中的信息可能已经有所发展或是发生改变。

    手里有一批临时代理,打算全部丢进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.
    
    
    2 条回复    2018-11-02 21:10:07 +08:00
    qsnow6
        1
    qsnow6  
    OP
       2017-02-07 16:43:37 +08:00
    rocketman13
        2
    rocketman13  
       2018-11-02 21:10:07 +08:00
    你好,你好怎么处理呢?配置文件怎么设置
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2491 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 14:25 · PVG 22:25 · LAX 07:25 · JFK 10:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.