Docker Compose Setup with Caddy, WordPress, and CloudFlare SSL

Hello,

I hope this message finds you well. I am reaching out to seek assistance with a Docker Compose setup involving Caddy, WordPress, and CloudFlare SSL integration. I have provided a detailed overview of the situation and the challenges I’m facing below:

Background: I initially managed my domain on Ionos but decided to transition to CloudFlare for better compatibility. My objective is to create a Docker Compose environment consisting of Caddy, WordPress, and MariaDB. I possess a CloudFlare API token that I intend to use for generating SSL certificates through Caddy. Additionally, I want Caddy to manage the redirection from HTTP to HTTPS for my WordPress site.

Accomplishments:

  1. Successfully established a secure SSL connection by accessing my domain “lefilencouleur.com”. This involved creating an A-type record on Cloudflare pointing to my public IP and setting up NAT redirection on my router for ports 80 and 443 to the host machine.

Challenges:

  1. When I visit “mondomaine.com”, I’m redirected to Caddy’s homepage instead of accessing WordPress. WordPress is only accessible via my private IP on port 8080.
  2. The automatic redirection from HTTP to HTTPS is not working as expected for WordPress.
  3. Unable to access the Caddy management interface locally on port 2019, as the connection is not operational

As a newcomer in this field, I would greatly appreciate any guidance and assistance the community could provide. I’ve shared my progress on my GitHub repository. Your support would mean a lot to me.

Thank you for your time and consideration.

GitHub Repository Link: GitHub - kanseibusines/caddy_cloudflare: Redirection caddy vers wordpress en https

Note : This post has been edited to provide additional information and clarify certain points since its original publication.

Please fill out the help topic template as per the forum rules.

Since you’re using Docker Compose, please review the docs: Keep Caddy Running — Caddy Documentation

C’est fait ! Merci pour votre réponse.

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