@niwla23 (Alwin Lohrie) posted a new topic, subject "Set custom certificate for entire entrypoint". It read:

   Hi,  
    I have an existing self-signed root certificate and want to use it for an entire entrypoint. My routers and services are mainly configured by docker labels and I have a static YAML config.
    
    I have found multiple syntax for specifying the certificate, but none of them seem to work.
    
    Can someone give an example YAML config for

Then @niwla23 (Alwin Lohrie) said

    I got TLS working now, but as soon as I use the https endpoint it gives me a 404 Error (over HTTPS)
    
    This is my static config:
    [code] 
        serversTransport:
          insecureSkipVerify: true
        
        entryPoints:
          # Not used in apps, but redirect everything from HTTP to HTTPS
          web:
            address: :80
        
          websecure:
            address: :443
            http:
              tls: {}
        
        providers:
          # File provider for connecting things that are outside of docker / defining middleware
          file:
            filename: /etc/traefik/fileconfig.yml
            watch: true
        
          docker:
            network: traefik
            exposedByDefault: false
        
        # Enable traefik ui
        api:
          dashboard: true
          insecure: true
        
        # Log level INFO|DEBUG|ERROR
        log:
          level: DEBUG
        
        
    [/code]
    
    Dynamic config:
    [code] 
        tls:
          stores:
            default:
              defaultCertificate:
                certFile: /certs/root.crt
                keyFile: /certs/root.key
          # certificates:
          #   - certFile: /certs/root.crt
          #     keyFile: /certs/root.key
          #     stores:
          #       - default
        http:
          routers:
            openhab:
              entryPoints:
                - web
              rule: "Host(`openhab.sweet`) || Host(`openhab.bigmac.sweet`)"
              service: openhab
        
          services:
            openhab:
              loadBalancer:
                servers:
                  - url: http://443-984-9246:8080/
        
    [/code]
    
    Labels on container:
    [code] 
                  traefik.enable: "true"
                  traefik.http.routers.authelia.rule: "Host(`auth.bigmac.sweet`)"
                  traefik.http.routers.authelia.entrypoints: "websecure"
        
    [/code]

After which, @cakiwi added

    If its the `openhab.sweet` or `openhab.bigmac.sweet` hosts then there is no matching router so you get a 404.  
    FYI `Host` takes a list so you can collapse that rule to `Host(`openhab.sweet`,`openhab.bigmac.sweet`)`
    
    The `openhab` router is configured to use the `web` entrypoint, changing that to `websecure` should see your requests going through.


{'source': 'discourse', 'url': 'https://community.traefik.io/t/set-custom-certificate-for-entire-entrypoint/15204', 'title': 'Set custom certificate for entire entrypoint', 'views': 68, 'has_accepted_answer': False, 'word_count': 284, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 3, 'tags': 'docker', 'author': '@niwla23 (Alwin Lohrie)', 'participants': '@niwla23 (Alwin Lohrie), @cakiwi', 'image_url': [None], 'created_at': '2022-07-23T13:50:09.763Z', 'last_posted_at': '2022-07-25T12:55:09.191Z'}