title: Configure base URL for ActiveMQ Web Console running behind a reverse proxy
body: <p>We are running ActiveMQ Web Console behind an Nginx reverse proxy. The URL clients see is of the form <code>https://host.example.org:8161/</code>. Nginx passes the following headers to the upstream ActiveMQ instance that listens on <code>127.0.0.1:8161</code>.</p>
  
  <pre><code>    proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Forwarded-Scheme $scheme;
      proxy_set_header X-Forwarded-Host $host:$server_port;
      proxy_set_header X-Forwarded-Server $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  </code></pre>
  
  <p>Basic Web GUI works, but some actions fail. E.g. sending a message to a topic seems to involve redirects to <code>http://host.example.org/...</code> which results in a HTTP 404 error.</p>
  
  <p>I think the cause is that ActiveMQ Web Console does not know its base URL.</p>
  
  <p>So how must ActiveMQ be configured to know its base URL, either through setting it explicitly or by deriving it from the headers sent by the reverse proxy?</p>