How to install Discourse behind Apache mod_proxy?

HAProxy does what I’m after and looks like a very polished and useful tool. Thanks for the pointer.

However, it seems that editing templates/web*.yml to listen on ports other than the defaults of 80 and 443 was where the trouble was. I restored the default configs then edited containser/app.yml to have lines similar to the following, and the 404 errors went away:

expose:
  - "127.0.0.1:1234:80"    # http