HTTPS refused to connect at a direct IP address

AI-generated summary

The user trangchongcheng is experiencing issues with setting up HTTPS on their Discourse installation on DigitalOcean, resulting in a “refused to connect” error. They have successfully set up HTTPS on Vultr.com in the past, but are having trouble with DigitalOcean.

vinothkannans pointed out that the issue is due to attempting to obtain Let’s Encrypt SSL certificates on an IP address, which is not supported. They recommended using a domain name instead, and advised against installing Discourse on an IP address.

trangchongcheng expressed gratitude for the advice and plans to use a domain to resolve the issue.

Today, i created 2 VPS on DigitalOcean.
I using for install Discourse.
But it only working with http
When i setup https for Discourse then refused to connect error.
I try on two VPS both are faulty.
I had use the Discourse One-Click Application but only working http and error when setup https.

I have done this many times, it is ok on VPS at Vultr.com
But DigitalOcean is faulty.
Cant you help me!

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80"   # http
  - "443:443" # https

Letsencrypt SSL certificates can’t be delivered to an IP address. You must use a domain name. Also installing Discourse in an IP address is not recommended.

Oh my god! Thanks so much!
i will use domain <3