gpt4 book ai didi

amazon-web-services - 反向代理背后的 ActiveMQ Web 面板 - AmazonMQ

转载 作者:行者123 更新时间:2023-12-05 07:31:57 28 4
gpt4 key购买 nike

我们正在使用 https://aws.amazon.com/amazon-mq/网络控制台在反向代理之后。

大多数基本功能都可以正常工作,但是 Web 面板中的几乎每个事件操作(将消息发送到队列、清除队列...)最终都会出现在 亚马逊内部 url 上 ( https://b-asdfsad-fsdfasdf-asdfasdf.mq.eu-central-1.amazonaws.com ),因此避开反向代理并以错误结束,因为我们出于安全原因阻止直接访问它。

知道如何使用可用的 AmazonMQ 配置选项告诉 Web 控制台,以防止重定向到除可访问反向代理的 URL 之外的任何内容吗?

更新 使用 Nginx Reverse 和这个配置:

set $proxy_pass_url https://abc-def-xyz-1.mq.eu-central-1.amazonaws.com:8162;
location / {
proxy_pass $proxy_pass_url;
proxy_http_version 1.1;
proxy_set_header Authorization "Basic AUTHSTRING";
proxy_set_header X-Forwarded-User $remote_user;
proxy_set_header Host abc-def-xyz-1.mq.eu-central-1.amazonaws.com;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}

最佳答案

Host Header 已经设置,但 Active MQs Dashboard Jetty Config 无论如何都需要知道 Host,并且它可能无法在 AWS 提供的配置中执行此操作。

[...]

    set $proxy_pass_url https://abc-def-xyz-1.mq.eu-central-1.amazonaws.com:8162;

location / {
proxy_pass $proxy_pass_url;
proxy_http_version 1.1;
proxy_set_header Authorization "Basic AUTHSTRING";
proxy_set_header X-Forwarded-User $remote_user;
proxy_set_header Host abc-def-xyz-1.mq.eu-central-1.amazonaws.com:8162;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}

[...]

关于amazon-web-services - 反向代理背后的 ActiveMQ Web 面板 - AmazonMQ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51536399/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com