400 Error + no https redirect when I try to log into DirectAdmin through Cloudflare WAF using http

open4biz

Verified User
Joined
Mar 22, 2009
Messages
125
Hi All,

When I try to log into the control panel through Cloudflare's WAF using http I get the following error:

400 Bad Request
The plain HTTP request was sent to HTTPS port

cloudflare

I am using a non-standard port (2087) that's allowed by Cloudflare's WAF to keep it slightly tucked away from your average bots (i.e. slight security theater).

In Cloudflare I have the connection to the server set up as 'SSL/TLS encryption: Full (strict)', I have the edge certificate set to 'Always Use HTTPS', and even set up a Rule to 301 permanent redirect http://sub.mydomain.com:2087/ to https://sub.mydomain.com:2087/ and I still get the same error.

Edit: I forgot to mention that the subdomain is proxied in Cloudflare's DNS area.

On the server - am I crazy or did there used to be a directadmin.conf setting to redirect http to https? I can't find it there, nor an related setting in Server Manager > Administrator Settings.

Any help fixing the problem would be appreciated so I can put this one to bed.

Cheers
 
Last edited:
I heard from a Cloudflare MVP and they reminded me that a port can either support HTTP or HTTPS, they can’t do both, and a 400 error is expected if you talk HTTP to it.

So this thread can be closed/ignored.
 
Back
Top