Unable to display http Wordpress page (http://192.168.1.59:32768/)

Hello,
I would be very grateful for any help on how to display a Wordpress site using a Zero Trust Tunnel.

I have setup a tunnel for my domain
I have a Ubuntu server running Portainer and Wordpress.

Subdomains:
Portainer https --------> Works
Wordpress http --------> Does not work

On Youtube there are plenty of people who have had the same problem

What is the error you are seeing?

I see that https://self-host.xyz is redirecting to https://self-host.xyz:32768/. This port is not open on Cloudflare’s servers, so the connection times out. You will have to either configure cloudflared to connect to Wordpress over HTTPS or disable the HTTP → HTTPS redirect in Wordpress.

$ curl -i https://self-host.xyz
HTTP/2 301 
date: Wed, 05 Apr 2023 19:53:37 GMT
content-type: text/html; charset=UTF-8
location: https://self-host.xyz:32768/
x-powered-by: PHP/8.0.28
x-redirect-by: WordPress
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=UJbMV0amRLUPuFu7v3dYwL9idnm9UZK5ZnBUiB2sGQjQ1jp%2FWTSu%2F%2Fwd9dHtRMKQU0%2BJqZto97jesOK1Ym4NkyeqAIm%2FxM8qgw5RwoEoVh69LahguYi%2Bz8RNLscch2eH"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 7b3456808a59b527-OSL
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

Thanks albert! Are you exposing my real URLs to the world and his wife? Or did I? (does not matter anyway because it is disposable)
How strange!
There is no http —> https redirect on Wordpress it only has port 80 exposed.


I also have the same problem if I try to connect another http host. For example Home Assistant.
So what you are saying, I think, is that Cloudflare likes https targets, not http.

The Chrome error screenshot you sent above contains the domain :slightly_smiling_face: I can remove the domain from my message if you want?

The response headers include

x-redirect-by: WordPress

so I assume it is done by Wordpress.

Don’t worry about the URL. It was free and only to figure out this tunnel through to a portainer/WP site.

If I try the curl command locally no errors.

root@self-host:~# curl -i http://192.168.1.59:32768
HTTP/1.1 200 OK
Date: Wed, 05 Apr 2023 20:34:21 GMT
Server: Apache/2.4.56 (Debian)
X-Powered-By: PHP/8.0.28
Link: <http://192.168.1.59:32768/wp-json/>; rel="https://api.w.org/"
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html>
<html lang="en-GB">
<head>

I am not able to configure any other http services on the subnet/LAN.
Have you managed to do it.

I will put NPM on Portainer and put the machine on a public IP for long enough to get ssl certificates and then reconfigure the tunnel with https/no TLS verify.

Could you please run the following cURL command and let me know the output?

$ curl -i --connect-to self-host.xyz:80:192.168.1.59:32768 http://self-host.xyz/
root@self-host:~# curl -i --connect-to self-host.xyz:80:192.168.1.59:32768 http://self-host.xyz/
HTTP/1.1 301 Moved Permanently
Date: Wed, 05 Apr 2023 20:53:17 GMT
Server: Apache/2.4.56 (Debian)
X-Powered-By: PHP/8.0.28
X-Redirect-By: WordPress
Location: http://self-host.xyz:32768/
Content-Length: 0
Content-Type: text/html; charset=UTF-8

Looks like Wordpress is redirecting to include the port for some reason. I don’t have experience with Wordpress, so I unfortunately cannot help you debug this.

That is OK. http to Home Assistant is also not smooth sailing so will try tricking it into doing what I want by going the https route. Thanks for your help.

Oh and Thanks Albert!

1 Like

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