cloudflare tunnel from docker works for most sites but not for wordpress sites
like the title says i got the dockers running and they work with the local url. they got the right configuration in docker compos so it shares the network.
i got it wright in the public hostname on my tunnel. im using a flexible ssl certificate. i read some stuff about wordpress and redirects.
the relevant part of the portfolio docker compose:
networks:
- wordpress-network-kayra
- pythonprojects_default
networks:
wordpress-network-kayra:
driver: bridge
pythonprojects_default:
external: true
name: pythonprojects_default
The 'pythonprojects_default ' is the network of my other projects and the cloudflare tunnel:
image: cloudflare/cloudflared
networks:
- pythonprojects_default
networks:
pythonprojects_default:
external: true
name: pythonprojects_default
for more info just ask already trying for a few hours every help would be amazing feels like im really close. tunnel is working perfectly for my other sites with, already tried different domains and other types of certificates. dont see any weird logs in the cloudflare tunnel:
{"hostname":"DOMAIN.com","originRequest":{},"service":"http://*CONTAINERNAME*:80\"}
1 Reply
Support AI
I'm happy to help you troubleshoot the issue.
Based on the information you provided, it seems like you have a complex setup with multiple Docker containers and networks. I'll try to break down the key points and offer some suggestions.
1. You have a WordPress container that is part of two networks:
wordpress-network-kayra
and pythonprojects_default
. The latter is an external network that is shared with the Cloudflare tunnel container.
2. The Cloudflare tunnel container is configured to use the pythonprojects_default
network and is working correctly for other sites.
3. You're using a flexible SSL certificate, which is a good choice.
4. You've mentioned that you've read about WordPress and redirects, which might be relevant to the issue.
Here are a few potential issues that might be causing the problem:
* Network configuration: Double-check that the wordpress-network-kayra
network is not interfering with the pythonprojects_default
network. Make sure that the WordPress container is correctly configured to use the pythonprojects_default
network.
* Container ports: Verify that the WordPress container is exposing the correct port (e.g., port 80) and that the Cloudflare tunnel container is configured to route traffic to that port.
* SSL certificate: Although you're using a flexible SSL certificate, it's possible that there's an issue with the certificate configuration. Check the Cloudflare dashboard to ensure that the certificate is correctly configured and that there are no errors.
* Redirects: WordPress can be finicky with redirects. Check the WordPress configuration to ensure that there are no redirects that might be causing issues with the Cloudflare tunnel.
To help you further, I'd like to ask a few questions:
* Can you provide more information about the error you're seeing when trying to access the WordPress site through the Cloudflare tunnel?
* Have you checked the Cloudflare dashboard for any errors or warnings related to the tunnel or the SSL certificate?
* Can you provide more details about the WordPress configuration, such as the wp-config.php
file or any relevant plugins that might be affecting the redirects?
Feel free to provide any additional information that might help me better understand the issue.Sources
Feedback
Feedback has been submitted! Thank you :)
This is an AI generated response, it may not be 100% accurate. Please validate the output. You can ask followups by replying to this message or mentioning me.