I'd like some help with a brain melting problem please. Lots of docs read, lots of searches made, but can't work out what else to try. My setup is as follows. Note this is just an http setup and no https is involved.
So the problem/challenge I have is getting traefik working as a simple reverse proxy for an external service to the traefik VM, a wordpress website (also running on a separate docker proxmox VM) and exposed through port 8001. The behaviour I'm trying to achieve is when I enter a url of wordpress.home.arpa in the browser. It should provide a reverse proxy to the wordpress server which is available on docker01.home.arpa:8001 hiding the port number.
pfsense is handling the DNS resolution from wordpress.home.arpa and apache.home.arpa to the same IP address of the traefik proxy server.
The proxing on apache.home.arpa (running on port 80 on the external server), works correctly.
However when I try to access wordpress.home.arpa all I get in the browser is " The site cannot be reached, wordpress.home.arpa refused to connect, ERR_CONNECTION_REFUSED" and the address bar changes to wordpress.home.arpa:8001
My docker compose file for setting up traefik is:
services:
reverse-proxy-traefik:
image: traefik:v2.10.5
container_name: reverse-proxy-traefik
restart: always
networks:
- proxy
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/configs:/configs:ro
- ./data/logs:/logs:rw
read_only: true
labels:
- traefik.enable=true
- traefik.http.routers.traefik-http.entrypoints=http
- traefik.http.routers.traefik-http.rule=Host(`traefik.home.arpa`)
- traefik.http.routers.traefik-http.service=api@internal
networks:
proxy:
external: {}
My traefik.yml file is
api:
dashboard: true
insecure: true
entryPoints:
http:
address: ":80"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
network: proxy
file:
directory: "/configs"
watch: true
accessLog:
filePath: "/logs/access.log"
fields:
headers:
names:
User-Agent: keep
log:
level: DEBUG
The traefik configuration file for the apache web site is
http:
routers:
apache-http:
entryPoints:
- "http"
rule: Host(`apache.home.arpa`)
service: "svcApache"
services:
svcApache:
loadBalancer:
servers:
- url: "http://docker01.home.arpa/"
The traefik configuration file for the wordpress web site is
http:
routers:
wordpress-http:
entryPoints:
- "http"
rule: Host(`wordpress.home.arpa`)
service: "svcWordpress"
services:
svcWordpress:
loadBalancer:
servers:
- url: "http://docker01.home.arpa:8001/"
The file structure for these files on the traefik server are:
./compose.yml
./data
./data/traefik.yml
./data/configs
./data/configs/apache.yml
./data/configs/wordpress.yml
./data/logs
A docker network was setup from the command line by this command
docker network create proxy
Would be very grateful if anybody can suggest a solution to this.
Regards.