# How to install Discourse behind Apache mod\_proxy?

**URL:** <https://meta.discourse.org/t/how-to-install-discourse-behind-apache-mod-proxy/130763>\
**Category:** Self-hosting\
**Created:** [October 11, 2019, 7:38am UTC](https://meta.discourse.org/t/how-to-install-discourse-behind-apache-mod-proxy/130763 "2019-10-11T07:38:52Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![hexadecagram](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hexadecagram/32/262658_2.png) [@hexadecagram](https://meta.discourse.org/u/hexadecagram)\
**Post date:** [October 16, 2019, 10:56pm UTC](https://meta.discourse.org/t/how-to-install-discourse-behind-apache-mod-proxy/130763/8 "2019-10-16T22:56:37Z")

</div>

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

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-install-discourse-behind-apache-mod-proxy/130763)._
