github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/docs/content/users/extend/traefik-router.md (about)

     1  # Router Customization and Debugging (Traefik)
     2  
     3  Traefik is the default router in DDEV v1.22+.
     4  
     5  DDEV’s router plays an important role in its [container architecture](../usage/architecture.md#container-architecture), receiving most HTTP and HTTPS traffic for requests like `*.ddev.site` and delivering them to the relevant project’s web container.
     6  
     7  DDEV uses Traefik by default unless you configure the traditional router by running `ddev poweroff && ddev config global --router=nginx-proxy`.
     8  
     9  ## Traefik Configuration
    10  
    11  You can fully customize the router’s [Traefik configuration](https://doc.traefik.io/traefik/).
    12  
    13  All Traefik configuration uses the *file* provider, not the *Docker* provider. Even though the Traefik daemon itself is running inside the `ddev-router` container, it uses mounted files for configuration, rather than listening to the Docker socket.
    14  
    15  !!!tip
    16      Like other DDEV configuration, any file with `#ddev-generated` will be overwritten unless you choose to “take over” it yourself. You can do this by removing the `#ddev-generated` line. DDEV will stop making changes to that file and you’ll be responsible for updating it.
    17  
    18  ### Global Traefik Configuration
    19  
    20  Global configuration is automatically generated in the `~/.ddev/traefik` directory:
    21  
    22  * `static_config.yaml` is the base configuration.
    23  * `certs/default_cert.*` files are the default DDEV-generated certificates.
    24  * `config/default_config.yaml` contains global dynamic configuration, including pointers to the default certificates.
    25  
    26  ### Project Traefik Configuration
    27  
    28  Project configuration is automatically generated in the project’s `.ddev/traefik` directory.
    29  
    30  * The `certs` directory contains the `<projectname>.crt` and `<projectname>.key` certificate generated for the project.
    31  * The `config/<projectname>.yaml` file contains the configuration for the project, including information about routers, services, and certificates.
    32  
    33  ## Debugging Traefik Routing
    34  
    35  Traefik provides a dynamic description of its configuration you can visit at `http://localhost:10999`.
    36  When things seem to be going wrong, run [`ddev poweroff`](../usage/commands.md#poweroff) and then start your project again by running [`ddev start`](../usage/commands.md#start). Examine the router’s logs to see what the Traefik daemon is doing (or failing at) by running `docker logs ddev-router` or `docker logs -f ddev-router`.