Problem setting up Discourse with docker behind Nginx reverse proxy. Encountering SPDY protocol error

AI-generated summary

The user yookoala is experiencing SPDY protocol errors when setting up Discourse with Docker behind an Nginx reverse proxy, resulting in failed loading of CSS and JS files and a non-functional activation button. Initially, the issue persisted even after adjusting the reverse proxy to point to localhost:3000, suggesting the Docker Nginx wasn’t the cause. After further investigation, yookoala discovered that the problem was due to Cloudflare’s CDN, which was interfering with the connection. Disabling Cloudflare resolved the issue, and the user reported the problem on the Cloudflare community forum here.

I’m trying to setup Discourse on my existing server that has a running Nginx. I’ve used the Discourse Docker launcher program for my setup, which seems to have another intermediate Nginx proxy inside.

After the setup, I can see the account setup page properly.

But after I clicked the email link, I’ve been directed to an account activation page with JS error. Turning on my developer console on Chrome, Ive got these errors:

  • Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR
    /stylesheets/desktop_…css:1
  • Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR
    /vendor-…js:1
  • Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR
    /ember_jquery-…js:1
  • Uncaught ReferenceError: $ is not defined
    at …:81

And apparently, the “Click here to activate your account” button does nothing because the js files are failed to loaded.

What is going on? Any advice on how to fix this?


Update 1: I have changed the reverse proxy to point to localhost:3000 (the rails port). The problem still exists. So the nginx in the docker plays no role in the error. In case it it relevant, I have Let’s Encrypt certificate setup on the host’s Nginx.

Update 2: I forgot I also have a Cloudflare in front of my Nginx. And apparently, the problem is gone when I disable the CDN there.

After some test, I found that the problem related to neither nginx nor discourse. It seems to be a Cloudflare issue. I have filed the issue here if you’re interested.