How to work with Docker swarm?

I run traefik with docker swarm

version: '3'
services:
  reverse-proxy:
    image: traefik:v3.1
    command:
      - "--api.insecure=true"
      - "--providers.docker"
      - "--providers.swarm.endpoint=unix:///var/run/docker.sock"
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      placement:
        constraints:
          - node.role == manager

And run whoami

version: '3'
services:
  whoami:
    image: traefik/whoami
    deploy:
      labels:
        - "traefik.http.routers.whoami.rule=Host(`whoami.192.168.100.131.nip.io`) && PathPrefix(`/whoami`)"
        - "traefik.http.services.whoami-service.loadbalancer.server.port=80"

It can find http service


But got 404

$ curl 127.0.0.1:80/whoami
404 page not found

$ curl whoami.192.168.100.131.nip.io
404 page not found

You should use host and path:

http://whoami.192.168.100.131.nip.io/whoami