This could be the cause of your problems. Try setting up discourse on a server without any panels or reverse proxies installed and report if you experience the same problem.
As a first step, start by ammending the location block for discourse to match up with the details provided here: Run other websites on the same machine as Discourse