An error that only happens with my wordpress

Hello to all,

I came to see you because I created a wordpress site via docker that I put in a tunnel to be able to access it from outside.

The problem is that when I connect my wordpress docker container I always have this message: ERR_TOO_MANY_REDIRECTS

I have of course looked at the different topics opened for this problem, it is said that it can come from .

1 From the cache of the browser or from cookies, so I systematically erase all the files before updating but idem.

_2 From a wordpress plugin I have to delete the plugins other than the basic ones, always the same error message.

_3 From the host, especially shared hosts, I don’t see how I can check this ? But indeed I’m with a free shared host (with only 10mo of space) (so I have, I guess the bare minimum of options and I’m especially limited in uploading for php files …)

But stop me if I’m wrong but since all my files are on my container, my hosting normally doesn’t store anything …

I made several tests to try to know where it comes from, the installation of wordpress this is done without any problem, but when this one is finished and that it is necessary to authenticate for the first time that everything goes wrong.

I specify that I have a single domain and that I have an instance of Proxmox that works very well, so the problem seems specific to wordpress, I also test to run a server apache and same everything works well.

I continue to search in the meantime but if you have any leads, I’m interested … Thanks in advance to all.

Welcome to the Cloudflare Community. :logodrop:

I like to start with curl -Iiv ${url} to test redirect issues. The first option is a capital i, not a lowercase l. The variable is there as a placeholder in my example. You could replace it with the URL you want to test, or set it to the same.

I found a promising reply in a topic you linked to in your other topic.

Thank you for your quick response!

Indeed, the link you gave me is the one I read and it’s to it, in particular, that I refer to when I talk about having read other topics.

Personally the modification in the wp-config.php didn’t change anything, and the certificate is not self-signed (it is generated automatically by what I suppose is Cloudflare and its encrypted traffic.

Here is a feedback of the command you gave me.


PS : In case I’m asked, my Cloudflare side encryption mode is set to flexible

Please repeat after me:

Repeat those words until that phrase fills your head every time you see or hear the word Flexible. That setting is one of the leading causes of ERR_TOO_MANY_REDIRECTS.

Once you have completed that self-conditioning ritual, take a look at option two in the topic I linked earlier. It recommends using a self-signed certificate. While that would certainly not be my preference, it might get you to a functional state.

2 Likes

I really liked the “repeat after me”.

So I guess I have to select the full mode?

Ok, I will take a closer look at how to generate the self-signed certificate.I will keep you informed. Thanks :slight_smile:

You could even go Full (Strict) if you used a Cloudflare Origin CA certificate instead of self-signed.

I am tempted to lab a setup similar to yours to get some cloudflared experience.

Can you keep me informed if you set up this lab? I’m thinking of using traefik on my side to generate the necessary certificate and we’ll see if it solved the problem. I will keep you informed of course

1 Like

@epic.network Well, I’m still with my self signed certificate, unfortunately I can’t get it to point to a wordpress container. Could you help me?

Here is my docker-compose file and a whoami.yml file:

I know in advance that my problem is silly and that it’s me who can’t get any back up. I have access to my domain in https (here at home it’s test.fr) but with the ports entered in the docker-compose, here 80 and 443, I would like to be able to access my wordpress container in 4400, but necessarily if I add it to the list of my docker-compose the port can’t be used 2 times

I think that the problem is very simple but I can’t find a solution because of the lack of experience.

version: '3'

services:
  reverse-proxy:
    image: traefik:v2.5
    container_name: traefik
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    ports:
      # Web
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # Map the static configuration into the container
      - ./config/static.yml:/etc/traefik/traefik.yml:ro
      # Map the dynamic configuration into the container
      - ./config/dynamic.yml:/etc/traefik/dynamic.yml:ro
      # Map the certificats into the container
      - ./certs:/etc/certs:ro
    networks:
      - proxy

networks:
  proxy:
    external: true```
version: '3'

services:
  whoami:
    image: containous/whoami
    container_name: whoami
    security_opt:
      - no-new-privileges:true
    labels:
      # Enable this container to be mapped by traefik
      # For more information, see: https://docs.traefik.io/providers/docker/#exposedbydefault
      - "traefik.enable=true"
      # Define the network that should be used
      - "traefik.docker.network=proxy"
      # URL to reach this container
      - "traefik.http.routers.whoami.rule=Host(`test.fr`)"
      # Activation of TLS
      - "traefik.http.routers.whoami.tls=true"
      # If port is different than 80, use the following service:
      # - "traefik.http.services.<service_name>.loadbalancer.server.port=<port>"
    networks:
      - proxy

networks:
  proxy:
    external: true```

EDIT : @epic.network Well I finally managed to generate a self signed certificate, I didn’t use traefik but a custom template from Proxmox, and now I have a 404 error on the wordpress ! Nothing to report on the other apps which work correctly with the tunnel.

I come back at the end of the day to give you the logs