Hello,
I'm was using Traefik for ~1year in a single instance configuration using docker running all the services.
Lately i moved to Proxmox and want to separate my 0-24 used services like Traefik,SearXNG,UptimeKuma,ddclient etc in 1 LXC aka 1 "computer" and all my other.
Traefik works here absolutely fine all services accessible from WAN so far.
HOWEVER; i have several other services like 3-4 web servers, experimental or temporary services to run and i want to have those separated from the 1 LXC in other containers, acting like other servers with different LAN IP addresses.
I read the documentation over and over but didnt managed to get it to work.
My setup is lets say:
192.168.0.204 - VM running dockerised Traefik with the following configuration .yml files:
- traefik.yml
api:
insecure: true
providers:
docker:
exposedbydefault: false
network: proxy
entryPoints:
web:
address: :80
http:
redirections:
entrypoint:
to: websecure
scheme: https
websecure:
address: :443
http:
tls:
# Generate a wildcard domain certificate
certResolver: letsencrypt
domains:
- main: false.webredirect.org
sans:
- '*.false.webredirect.org'
ping: true
certificatesResolvers:
letsencrypt:
acme:
email: ionized@protonmail.com
storage: /letsencrypt/acme.json
dnsChallenge:
provider: dynu
resolvers:
- '1.1.1.1'
- '1.0.0.1'
http:
routers:
my-router:
rule: "Host(`example.false.webredirect.org`)"
service: my-service
services:
my-service:
loadBalancer:
servers:
- url: "http://192.168.0.180:80"
Traefik docker-compose.yml
version: '3'
services:
reverse-proxy:
container_name: traefik
image: traefik:latest
command: --api.insecure=true --providers.docker
restart: unless-stopped
networks:
- proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- DYNU_API_KEY=5eY4g564W4WERYFALSEb36bf344Wf4f
volumes:
- ./config/traefik.yml:/etc/traefik/traefik.yml:ro
- ./config/letsencrypt:/letsencrypt:cached
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
labels:
- traefik.enable=true
- traefik.http.routers.traefik.rule=Host(`false.webredirect.org`)
- traefik.http.services.traefik.loadbalancer.server.port=8080
networks:
proxy:
external: true
Output of wget 192.168.0.180 from the Traefik VM
mato@proxy-services:~/util/traefik/config$ wget http://192.168.0.180:80
--2023-11-28 18:29:07-- http://192.168.0.180/
Connecting to 192.168.0.180:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://192.168.0.180/wp-admin/install.php [following]
--2023-11-28 18:29:07-- http://192.168.0.180/wp-admin/install.php
Reusing existing connection to 192.168.0.180:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
index.html: Permission denied
Cannot write to 'index.html' (Permission denied).
So my problem is how to "teach" Traefik to route traffic to another local ip when it gets the request?
Traefik host is located on 192.168.0.204
Other VM with the required service is at 192.168.0.180:80
Host domain is: "false.webredirect.org" = 192.168.0.204
Other service: "example.false.webredirect.org" = 192.168.0.180
I'am gratefull you spent time to read the struggle of a beginner and i hope one of you can provide me with crucial guidance! TY