Traefik to a ISP config server

Discussion in 'Technical' started by Dameats1, Nov 5, 2021.

  1. Dameats1

    Dameats1 New Member

    Good day everyone ,

    I have a sever already running with ISP config 3 it was configured with the perfect server guide. Ubuntu 18.04 and Nginx.
    Last month i decided to start playing with docker in another server at home . I found useful traefik to reverse proxy in the docker enviroment
    When i was going to expose the new server to world , I find out that you cannot open the same ports is the router meaning 80 and 443 to both internal ips . So i learned that through traefik i could do the reverse proxy to my older server ( the isp config one), i have tried multiple tutorial etc ...
    but i think I am missing something in my dynamic file .
    first this is my docker-compose.yml
    version: '3'

    services:
    reverse-proxy:
    # The official v2 Traefik docker image
    image: traefik:v2.5
    networks:
    - trafik_default
    restart: unless-stopped
    command:
    --api.insecure=true
    --providers.docker
    --providers.file.directory=/dynamic_config
    --providers.file.watch=true
    --providers.docker.exposedbydefault=false
    --providers.docker.network=trafik_default
    --entrypoints.web.address=:80
    --entrypoints.websecure.address=:443
    --certificatesresolvers.myresolver.acme.tlschallenge=true
    [email protected]
    --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
    ports:
    # The HTTP port
    - "80:80"
    - "443:443"
    # The Web UI (enabled by --api.insecure=true)
    - "8080:8080"
    labels:
    # Enable Traefik for this service, to make it available in the public network
    - traefik.enable=true
    volumes:
    # So that Traefik can listen to the Docker events
    - /var/run/docker.sock:/var/run/docker.sock
    - ./dynamic_config:/dynamic_config:ro
    - ./letsencrypt:/letsencrypt
    networks:
    trafik_default:
    external: true

    and this is what i have in my dynamic ....

    http:
    routers:
    myrouter:
    service: router1
    rule: "Host(`mydomain.com`) && Path(`/var/www/clients/client0/web10`)"
    entryPoints:
    - websecure

    services:
    router1:
    loadBalancer:
    servers:
    - url: "http://192.168.0.144"

    I appreciate help.
     
    Last edited: Nov 5, 2021

Share This Page