Discourse not support proxy_protocol

If discourse after haproxy ,now we use proxy_protocol,but now discourse not support it.
nginx doc:

I try to fix this problem by using template,but

Since most of them are based on similar templates, it may not be a good solution

PR for it

I think you should handle this in a similar way of how Cloudflare is being handled (after all, Cloudflare is an upstream proxy / load balancer as well). See discourse_docker/cloudflare.template.yml at ae5a223074388795e4ea073a162cbf1dc174d392 · discourse/discourse_docker · GitHub

1 Like

Is there any change concerning support for the proxy protocol ?

In our setup we currently use haproxy for ssl termination and apache2 as outer rev-proxy which then connects to a unix websocket for the web_only discourse container. I want so switch to nginx for the outer rev proxy and also implement the proxy protocol which is also supported by haproxy.

It looks like the web_only container and the nginx inside still do not support the proxy protocol. Is this correct?

I know that they use haproxy in their hosting.

Is the problem that you’re trying to solve that you want the correct ip to get to discourse? You can check topics like How to set up Discourse on a server with existing Apache sites for how to configure the internal nginx to pass through the ip address.

1 Like