I am running my WordPress site with Proxmox VM. My network is behind CGNAT, so I cannot port-forward my WordPress site on my router. I cannot add an A record with it.
With the help of Cloudflare Tunnel, I can expose my servers running on the local network and behind CGNAT on the internet.
My problem is that it’s getting an error “ERR_TOO_MANY_REDIRECTS.”
Details:
Configuration of my /etc/apache2/sites-available/wordpress.conf
Thanks, @erictung. It worked, but it broke the CSS styling of WordPress, and the page loading is so slow.
Test 1: I made some changes earlier. I changed the ServerName from 192.168.254.102 to mydomain.store.
Result: Sadly, it didn’t solve the issue.
Test 2: I reverted the Site Address (URL) from http://mydomain.store to http://192.168.254.102.
Result: When the domain is visited, it redirects the website visitors to http://192.168.254.102.
Test 3: I changed WordPress Address (URL) from http://192.168.254.102 to https://mydomain.store.
WordPress Address (URL): https://mydomain.store/
Site Address (URL): https://mydomain.store/
Result: It worked. It redirects to https://mydomain.store, but I could not access my WordPress Admin Dashboard. It gets an error ERR_TOO_MANY_REDIRECTS.
Can you recommend me some additional solution? Thank you.
I tried to recall what I did previously while setting up a new WordPress site with Cloudflare Tunnel.
If I remember correctly, if you are going to serve your WordPress site via HTTPS (enabled in Cloudflare) with the use of Cloudflare Tunnel, your Apache configuration should enable a new VirtualHost that listens via port 443 (with SSL certificate of course, it can be any SSL certificate including self-signed certificate). Then, your cloudflared config.yml (particularly the url key) should point to https://localhost and add a new setting called no-tls-verify: true.