Error 523 Origin is unreachable due to Cloudflare Docker/oznu redirect

I have set up two servers for the same domain, using domain.com at Server1 and m.domain.com at Server2.

Server1 is running on Docker-Oznu/docker image for cloudfare API and Nginx Proxy Manager.
Server2 is on Apache2, plain and simple.

All certificates have been issued and are valid.

I installed certbot and generated an SSL certificate successfully, created an A record on Cloudflare for m.domain.com > Server2 IP.

On server1, Cloudflare API is automatically changing the Server2 IP to Server1 IP, so even Nginx pointing m.domain.com to server2 IP, the page returns error 523 Origin is unreachable.

Here are the log registries for server1 Cloudflare API:

    

crond: USER root pid 296 cmd /etc/cont-init.d/50-ddns
No DNS update required for m.domain.com (yyy.www.www.x).

On Nginx Proxy Manager I set m.domain.com pointing to server2 IP: 129.213.www.37 and used a valid ssl cert.

domain.com is loading with no problems.

Can you point me to an article or suggest a configuration for the API? I thought I would get off Docker and use plain old Apache on server1 as well, but you only have Certbot dns-Cloudflare request for new certificates, I have never seen a method for subdomain creation on the API out of docker, could you point me to the place in the documentation for this or let me know what to do please?

I solved it by adding the info: -e DNS_SERVER=10.0.0.2
To oznu new stack:

version: '2'
services:
  cloudflare-ddns:
    image: oznu/cloudflare-ddns:latest
    restart: always
    environment:
      - API_KEY=my token
      - ZONE=domain.app
      - SUBDOMAIN=m
      - e DNS_SERVER=vvvv
      - PROXIED=true
      - e CRON=*/5 * * * *
1 Like