title: ActiveMQ Web panel behind Reverse Proxy - AmazonMQ
body: <p>We are using the <strong>web console</strong> of <a href="https://aws.amazon.com/amazon-mq/" rel="nofollow noreferrer">https://aws.amazon.com/amazon-mq/</a> behind a reverse proxy.</p>
  
  <p>Most of the basic functionality is working, however almost every <strong>active action</strong> (send message to queue, purge queue, ...) in the web panel ends up on the <strong>amazon internal url</strong> (<a href="https://b-asdfsad-fsdfasdf-asdfasdf.mq.eu-central-1.amazonaws.com" rel="nofollow noreferrer">https://b-asdfsad-fsdfasdf-asdfasdf.mq.eu-central-1.amazonaws.com</a>), therefore evading the reverse proxy and ending up in an error since we prevent direct access to it for security reasons.</p>
  
  <p>Any idea how to tell the web console, using the available AmazonMQ Configuration options, to prevent redirecting to anything but the URL under which the reverse proxy is reachable?</p>
  
  <p><strong>Update</strong> using Nginx Reverse with this config:</p>
  
  <pre><code>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;
  }
  </code></pre>