# HTTPS refused to connect at a direct IP address

**URL:** <https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017>\
**Category:** Self-hosting\
**Created:** [March 28, 2018, 6:11am UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017 "2018-03-28T06:11:07Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![trangchongcheng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trangchongcheng/32/120005_2.png) [@trangchongcheng](https://meta.discourse.org/u/trangchongcheng)\
**Post date:** [March 28, 2018, 6:11am UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017/1 "2018-03-28T06:11:07Z")

</div>

![40](https://global.discourse-cdn.com/meta/original/3X/6/a/6aea1c180bf4ad49f3960548d6ef35b8325c3d7e.png)

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](http://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

```

---

_[View the full topic](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017)._
