This curl command sends a request to port 80 on your machine but tells the server the hostname is 'whoami.localhost'. Traefik reads that hostname, matches the rule you set in step 5, and forwards the request to the whoami container. You should see the container's IP, hostname, and request headers printed back.
$ curl -H "Host: whoami.localhost" http://localhost
What you should see
Several lines starting with: Hostname: <container-id>, IP: 172.x.x.x, and a list of request headers. This confirms Traefik routed the request successfully.
This might happen
curl: command not found on Windows
Use PowerShell instead: Invoke-WebRequest -Uri http://localhost -Headers @{Host='whoami.localhost'} | Select-Object -ExpandProperty Content