Can't reach self-hosted WordPress via cloudflared tunnel

Domain: donferris.me

Have you searched for an answer? yes - I have explored each of the topics shown in the “Your topic is similar to…” popup

https://www.cloudflare.com/diagnostic-center/ just redirects me to https://support.cloudflare.com/hc/en-us

Error returned (Brave browser) is:
This site can’t provide a secure connection
homelab.donferris.me sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

On Firefox, the error is slightly different:
Secure Connection Failed
An error occurred during a connection to homelab.donferris.me:8080. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.

  1. I tried removing and recreating the tunnel using the command line procedure
  2. I’ve tried accessing the site using both http and https
  3. I’ve tried turning off the “Proxied” setting in the CNAME record.

Was the site working with SSL prior to adding it to Cloudflare? It works fine locally. This is my first attempt at making it publicly viewable using a CF tunnel.

What are the steps to reproduce the error:
Just go to https://homelab.donferris.me

Have you tried from another browser and/or incognito mode? yes

Additional info: When accessing the WordPress site locally, I use http - not https. (I made sure to specify http when setting up the tunnel.) Also (not sure if this means anything), when I try to go to https://homelab.donferris.me it automatically changes to https://homelab.donferris.me:8080. Locally, I access the site by going to [local_ip]:8080 so this is probably correct behavior but I didn’t want to leave anything out.

Disable automatic https rewrites and automatic https redirect if you absolutely must use http, but the better bet is to get the wordpress install up and running with a Cloudflare origin certificate

Thanks for your help! I initially set this up using the command line method, and at some point, it generated a cert.pem file. Is that the same thing as getting it up and running “with a Cloudflare origin certificate”?

No. You should be able to found it under Your domain > SSL/TLS > Origin Server

Thanks. I see it there; I just don’t understand how to take the cert and apply it to the running docker container that I’m trying to self-host. The container ran as http by default when I spun it up.

I have never deployed WordPress with docker but you just need to setup the configuration for whatever web server the container is using

I found a procedure here and carefully followed it. I’m still getting the same errors. Other configured public hostnames work fine; there’s something wonky about Wordpress. The cert files files as provided in SSL/TLS Origin Server specifically say “Origin Certificates are only valid for encryption between Cloudflare and your origin server.”, so I can’t really try testing this locally. Is there any way I can test that I’ve setup the certificate properly? Does anyone have any other suggestions?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.