New installation behind Litespeed reverse proxy stalls on loading screen

I am shifting an existing Discourse installation over to a new server, and the first stage of that is making a fresh Discourse installation on the new server. The new server already has a web server on ports 80 and 443, so I am running Discourse as a Unix socket behind a reverse proxy, as described here.

The only thing that I’m doing differently is that I’m not using nginx but OpenLiteSpeed as the reverse proxy. However, the configuration for OpenLiteSpeed is pretty straightforward and I’ve gotten it working with other Docker apps: you just need to configure an external application using the socket address, and then rewrite all requests to go to the socket by using a Proxy context.

The result is that Discourse is loading when you go to the proxied URL (in this case, but it only shows the loading screen with the animated dots, and gets stuck there.

Any suggestions for troubleshooting this? Thanks!

You can open the javascript console and see what’s getting loaded. Check the console and the network tab.

Did you remove the let’s encrypt template?

1 Like

Thanks, that helped. I’m seeing lots of these errors:

Refused to load the script x because it violates the following Content Security Policy directive:

When putting another Docker container in front of the same reverse proxy, I was able to solve it by setting the environment variable TRUSTED_PROXIES to **.

Worth trying the same thing, but how would I do that with Discourse?

It seems like you really screwed up your content security policy settings.

It also tries to retrieve the logos from so that might give away where things are going wrong. That is apparently what your form thinks its hostname is…

1 Like

Thanks. Honestly I don’t know where the came from. Since the installation script discourse-setup doesn’t work for this use case, all that I did was to edit containers/app.yml and then do a launcher rebuild app. I guess this missed overwriting an somewhere.

But anyway, I still managed to fix my setup. Rather than bootstrapping a fresh installation and restoring my backup, I created a tarball of the entire /var/discourse directory from my original server, did a rebuild over the top of that, and voila… everything seems to be working fine. So that’s the way that I’ll restore a backup in future. :slight_smile:

1 Like

discourse-setup can be made to work, you can:

  • temporarily turn off whatever is on 80/443
  • build on a different server and then copy across
  • use the switch to bypass the connectivity check
1 Like