我必须使用AWS负载均衡器将请求转发给ha代理,后者负载平衡码头容器。
我还需要将非http请求重定向到https。
AWS在其对haproxy的请求中包含了X转发-For,但haproxy不转发X转发.如何配置that来转发该标头。
我用的是https://github.com/tutumcloud/tutum-docker-clusterproxy
最后,我想摆脱AWS负载均衡器,但目前,我需要接受它。
谢谢你的任何想法!
这里的编辑是HA代理转发给web容器的内容:
headers { host: 'idelog.me',
Apr 10 22:30:47 Web_XMPP 3dec26a7-0440-4569-a945-1a7cfa5a9d11: cookie: 'connect.sid=s%3AwXyBf3CCQQIl10cQPaxRyb_xe-ExbGkY.Xjy9vKCTaLZJ3MQLfxG2PrAWVKJC%2F9hToKvj8Ue74gk; AWSELB=5D3B1B0B1857AD2EE7B7A30BE969AF569B1E08E8E3952851007566E67148E417431500E40BE8450431DBBBC243214A643166CD10E6A4FC839D82B6EB5EC83338C7C88E58FF; _ga=GA1.2.455486669.1425248270; _gat=1',
Apr 10 22:30:47 Web_XMPP 3dec26a7-0440-4569-a945-1a7cfa5a9d11: 'cache-control': 'max-age=0',
Apr 10 22:30:47 Web_XMPP 3dec26a7-0440-4569-a945-1a7cfa5a9d11: 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36',
Apr 10 22:30:47 Web_XMPP 3dec26a7-0440-4569-a945-1a7cfa5a9d11: referer: 'http://idelog.me/',
Apr 10 22:30:47 Web_XMPP 3dec26a7-0440-4569-a945-1a7cfa5a9d11: 'x-forwarded-for': '73.162.39.215, 172.31.13.227',
Apr 10 22:30:47 Web_XMPP 3dec26a7-0440-4569-a945-1a7cfa5a9d11: 'x-forwarded-proto': 'http' } 您可以看到,x转发-for是连接的,但x转发-proto只包含AWS和HA代理之间请求的值,它始终是http而不是https。
如何告诉HA代理将x转发-proto的AWS值中继到我的web容器?
发布于 2015-04-12 16:26:07
解决办法是-不要试图连锁负载平衡器,这是愚蠢的。
https://stackoverflow.com/questions/29572363
复制相似问题