opened
madshargreave
username_0
Hi

I am hosting an application that uses websockets, and goes through CloudFlare.

Since CF does not support websockets, I have to route these seperately to a CNAME ws -> mydomain.com, and disable the CF for that specific record.

I get the following error:

```
WebSocket connection to 'wss://ws.mydomain.com/socket/websocket?vsn=1.0.0' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
```

I'm guessing that's because the SSL is not properly setup on the subdomain

How can I fix this?
Securing subdomain
issue
created
lafama
username_1
I think this could be caused by cloudflare, are you on the free plan? if yes u need to note that free plan provides Universal SSL.. Universal SSL support is defined by the OS/Browser support for two newer features:
- Server Name Indication (SNI)
- Elliptic Curve certificates (ECDSA)
Which could be causing what your experiencing
comment
created
madshargreave
username_0
Yes I'm on the free plan, but I have disabled proxying for ws.domain.com
comment
created
lafama
username_1
What about ssl, when you browse your domain, do you get your ssl cert or cloudflare? :-)
comment
created
madshargreave
username_0
Ill be damned, you're right! I get the CloufFlare cert.

How can I make it use the one on dokku?
comment
created
lafama
username_1
upgrade to paid plan 20$ a month
comment
created
madshargreave
username_0
Is that really necessary?
comment
created
lafama
username_1
Maybe try this **(i have not tried this)** [disable CF ](https://support.cloudflare.com/hc/en-us/articles/200169176-How-do-I-temporarily-deactivate-CloudFlare-)and make sure [SSL on C](https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-Off-Flexible-SSL-Full-SSL-Full-SSL-Strict-SSL-Only-mean-)F is also disabled . But this will expose you server IP
comment
created
madshargreave
username_0
Doing this results in a ERR_TOO_MANY_REDIRECTS

I am forcing HTTPS on the application level
comment
created
madshargreave
username_0
I just notice that I get 

`ACME server returned an error: urn:acme:error:malformed :: The request message was malformed :: Error creating new authz :: Issuance for IP addresses not supported`

When I run `dokku letsencrupr myapp`
comment
closed
madshargreave
username_0
issue
reopened
madshargreave
username_0
Hi

I am hosting an application that uses websockets, and goes through CloudFlare.

Since CF does not support websockets, I have to route these seperately to a CNAME ws -> mydomain.com, and disable the CF for that specific record.

I get the following error:

```
WebSocket connection to 'wss://ws.mydomain.com/socket/websocket?vsn=1.0.0' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
```

I'm guessing that's because the SSL is not properly setup on the subdomain

How can I fix this?
Securing subdomain
issue
created
sseemayer
username_2
*Regarding the failure of requesting a certificate for IP addresses:* `dokku-letsencrypt` will use the result of the `dokku urls <myapp>` to decide what domains to request certificates for. Since let's encrypt will not let you request certificates for IP adresses, it's probably a good idea for us to filter out IP addresses. This is probably a nice easy contribution for a first-time contributor, if anyone is interested.

*Regarding your original websockets problem:* If you set up cloudflare to not proxy your websockets subdomain for you, it might take up to 48 hours for the DNS caches between your ISP and CloudFlare to all get updated with the new IP address for the subdomain which might be why you're still seeing the CloudFlare-provided certificates on your `ws` subdomain. I haven't tried setting up a web socket setup like this myself but don't see a reason why this should not work with the free tier on CloudFlare, given enough waiting time. As @username_1 says, such a configuration would expose your IP address, though.
comment
created
sseemayer
username_2
@username_0 any news on this?
comment
closed
sseemayer
username_2
issue
created
sseemayer
username_2
Closing for inactivity.
comment
created
praveenperera
username_3
I wanted to get www.myapp.com to redirect to myapp.com, to do that securely with a letsencrypt certificate I did as above

1. Adding www.myapp.com with domains:add
2. Ran letsencrypt
3. Removed www.myapp.com domains:remove

Are there plans to make the process a little simpler?
comment
created
sseemayer
username_2
This was previously discussed in #21 and dokku/dokku-redirect#1 but since I've never elaborated on why this is difficult to implement for all use cases of the redirect plugin, I'm re-opening the discussion there. I'd be happy to hear your suggestions too! :+1:
comment