squid做反向代理,网站无法login和post,如何解决? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zhttty
V2EX    问与答

squid做反向代理,网站无法login和post,如何解决?

  •  
      zhttty 2013-10-05 19:00:22 +08:00 4367 次点击
    这是一个创建于 4457 天前的主题,其中的信息可能已经有所发展或是发生改变。
    squid的配置如下,该配置可以浏览被反代的网站,但就是无法login、post和upload...

    squid.conf:
    http_port 80 transparent
    cache_mem 64 MB
    cache_dir ufs /var/spool/squid 4096 16 256
    cache_effective_user squid
    cache_effective_group squid
    access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log
    visible_hostname xxx
    cache_mgr [email protected]
    acl all src 0.0.0.0/0.0.0.0
    http_access allow all
    cache_peer 162.243.xxx.xxx parent 80 0 no-query originserver name=web
    cache_peer_domain web blog.xxx.com
    cache_peer_access web allow all

    题外话:我是想实现类似于cdn以及隐藏真实ip的效果...
    1 条回复    1970-01-01 08:00:00 +08:00
    zhttty
        1
    zhttty  
    OP
       2013-10-05 19:39:25 +08:00
    问完问题,转了一圈回来,再仔细翻了squid.conf里边的注释,发现了
    # TAG: nonhierarchical_direct
    # By default, Squid will send any non-hierarchical requests
    # (matching hierarchy_stoplist or not cacheable request type) direct
    # to origin servers.
    #
    # If you set this to off, Squid will prefer to send these
    # requests to parents.
    #
    # Note that in most configurations, by turning this off you will only
    # add latency to these request without any improvement in global hit
    # ratio.
    #
    # If you are inside an firewall see never_direct instead of
    # this directive.

    加了一句:nonhierarchical_direct off 解决。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2743 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 25ms UTC 14:50 PVG 22:50 LAX 06:50 JFK 09:50
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86