I have a Wordpress site running as a Docker stack.
If I access it directly through DNAT (using a valid IP address just for this site), everything works well.
If I try to access it through Traefik (so I can share a valid IP address with other HTTP services), I can only access the home page of the site and Wordpress admin pages for this same site but for all other regular pages I get a error message like this:
Unable to connect
Firefox can’t establish a connection to the server at 192.168.109.236.
The other (non-Wordress) sites that share the IP address used by Traefik work just fine. Only this Wordpress driven one has this issue.
The 192.168.109.236 IP address is the address of the Docker worker configured as a backend for this site in Traefik as you can see in this traefik.toml snippet:
[file]
[frontends]
[frontends.site]
backend = "site"
[frontends.site.routes.site1]
rule = "Host:www.EXAMPLE.com,www.EXAMPLE.com.br,EXAMPLE.com,EXAMPLE.com.br"
[backends]
[backends.site]
[backends.site.loadbalancer.stickiness]
[backends.site.healthcheck]
path = "/"
interval = "10s"
[backends.site.servers.c1]
url = "http://192.168.109.236:9003"
[backends.sita.servers.a1]
url = "http://192.168.109.233:9003"
[backends.site.servers.a2]
url = "http://192.168.109.219:9003"
How to make Wordpress links point to site URL instead of Docker worker's IP address when being accessed through Traefik?