V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cevincheung
V2EX  ›  Amazon Web Services

如何完美反代 amazon s3?

  •  
  •   cevincheung ·
    cevin · 2015-07-13 11:57:35 +08:00 · 2854 次点击
    这是一个创建于 3202 天前的主题,其中的信息可能已经有所发展或是发生改变。

    s3国内被屏蔽的太厉害了,想自己做个反代玩。设置好nginx规则后,访问测试发现直接跳转到了s3的介绍页面……301跳转

    server {
        listen 80;
        server_name aws.domain.com;
        location / {
            proxy_pass http://xxxxx.xxx.amazonaws.com;
            proxy_set_header Host xxxxx.xxx.amazonaws.com;
        }
    }
    
    4 条回复    2015-07-24 18:01:08 +08:00
    cevincheung
        1
    cevincheung  
    OP
       2015-07-13 18:54:58 +08:00
    - -#难道就没人用过?
    aivier
        2
    aivier  
       2015-07-13 19:16:14 +08:00
    可能要发送User-Agnt?
    cevincheung
        3
    cevincheung  
    OP
       2015-07-13 20:15:36 +08:00
    @aivier user-agent就是当前访客的useragent,这个是没问题的
    akira
        4
    akira  
       2015-07-24 18:01:08 +08:00
    肯定是哪里配错了,例如域名没配对。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1120 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:37 · PVG 02:37 · LAX 11:37 · JFK 14:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.