Cannot access wordpress using tunnel and zero trust

So I’m running my wordpress container on my synology NAS and I can access it locally without issues. I’ve removed all the DNS records and I’ve set up zero trust, so I only have the CNAME configured. For some reason, my browser wants to point me to domain.com:port instead of just domain.com.

Any ideas?

Do you have a custom domain for wordpress that uses the domain+port? It could be wordpress redirecting to it.

1 Like

Nothing special about the domain. My wordpress container is running on my NAS localhost:port and is accessible locally

Do you have something like site_url() – Function | Developer.WordPress.org setup for the IP and port?

In which file should I check?

The wp-config.php file

Nothing like that in that file what I can see. The only thing that maybe is relevant (?) I could find in that file is this:

// If we're behind a proxy server and using HTTPS, we need to alert WordPress of that fact
// see also https://wordpress.org/support/article/administration-over-ssl/#using-a-reverse-proxy
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
	$_SERVER['HTTPS'] = 'on';
}
// (we include this by default because reverse proxying is extremely common in container environments)

if ($configExtra = getenv_docker('WORDPRESS_CONFIG_EXTRA', '')) {
	eval($configExtra);
}

Unfortunately, I don’t know then. It seems like something is causing a redirect when attempting to load it. My guess it is the application itself. The only way Cloudflare would redirect is with redirect rules, bulk redirects and workers.

I setup a second domain yesterday and removed all my reverse proxies, then I did a clean install on wordpress for the fourth time, then it started working for some strange reason.

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