【问题标题】:ActiveMQ Web panel behind Reverse Proxy - AmazonMQ反向代理背后的 ActiveMQ Web 面板 - AmazonMQ
【发布时间】:2018-07-26 10:13:13
【问题描述】:

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

大部分基本功能都可以正常工作,但几乎每个 Web 面板中的活动操作(将消息发送到队列、清除队列...)都会在 amazon 内部 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;
}

【问题讨论】:

标签: amazon-web-services activemq amazon-mq


【解决方案1】:

主机标头已设置,但 Active MQs Dashboard Jetty Config 无论如何都需要知道主机,并且可能无法在 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;
    }

[...]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-22
    • 2019-03-14
    • 2014-04-24
    • 2017-06-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-12
    相关资源
    最近更新 更多