Bad gateway when trying to use SSL

AI-generated summary

Grex315 encountered a “bad gateway” error when trying to switch their Discourse site (forums.grimreapergamers.com) to SSL. They followed guides from Discourse and DigitalOcean, and have a setup with NGINX hosting their Wordpress site (grimreapergamers.com) and proxying to their Discourse site. They created separate Let’s Encrypt certs for each site, but only the Wordpress site worked with the cert.

Grex315 later reported resolving the issue by merging the certs into a single cert and moving off port 85. They shared their working NGINX config.

Problem:

I have a DO server setup with a Wordpress site and Discourse. I have rencently made the move to SSL.

I went through and followed the guide here:

And the DO guide here

Either guide is giving me a bad gateway error when I try to go to SSL for the Discourse site.

My Setup:

Curently running NGINX 1.10.0 which is hosting my wordpress site (grimreapergamers.com) and proxy to my Discourse site (forums.grimreapergamers.com). I created two seperate certs through Let’s Encrypt. One for grimreapergamers.com and one for forums.grimreapergamers.com. My wordpress site is up and running with the cert today. When I try to change the NGINX config for the discourse site to use the cert I get a bad gateway error. Discourse is listening on port 85.

Here is my NGINX config for the discourse site. The commented out sever block is what is live today and working. The two blocks below are what I am trying to go to. Appreciate any guidance thanks.

I should point out that I have the http2 module loaded in NGINX which is why I am using that instead of SPDY.

Got it working.

Figured out my issue. Also merged into single cert. Don’t know why I thought I needed two. Also moved off port 85. figured that was not a good one to be using.

My working config