# V2 on Docker Desktop for Mac - Can see dashboard but not WordPress site

**URL:** <https://community.traefik.io/t/v2-on-docker-desktop-for-mac-can-see-dashboard-but-not-wordpress-site/6538>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [June 15, 2020, 7:43pm UTC](https://community.traefik.io/t/v2-on-docker-desktop-for-mac-can-see-dashboard-but-not-wordpress-site/6538 "2020-06-15T19:43:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shot](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/shot/32/2312_2.png) [@shot](https://community.traefik.io/u/shot)\
**Post date:** [June 15, 2020, 7:43pm UTC](https://community.traefik.io/t/v2-on-docker-desktop-for-mac-can-see-dashboard-but-not-wordpress-site/6538/1 "2020-06-15T19:43:18Z")

</div>

I'm fairly new to Docker and Traefik. My initial aim is simply to get WordPress running on my local machine (Mac running Docker Desktop).

All containers start up, and I can see and navigate the dashboard at `127.0.0.1:8080`, but visiting `127.0.0.1` gives "404 page not found".

I'm a bit unclear as to whether I need to update my hosts file. I did try that, but it made no difference.

I'm not concerned about SSL/TLS at this point - just trying to crawl before I walk. Here's my **docker-compose.yml**. Any insights appreciated!

```auto
version: '3'

services:
  reverse-proxy:
    # The official v2 Traefik docker image
    image: traefik:v2.2
    # Enables the web UI and tells Traefik to listen to docker
    command: --api.insecure=true --providers.docker
    ports:
      # The HTTP port
      - "80:80"
      - "443:443"
      # The Web UI (enabled by --api.insecure=true)
      - "8080:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - traefik

  my_db_service:
    image: 'bitnami/mariadb:10.3'
    container_name: my_db_container
    restart: unless-stopped
    env_file: .env
    environment:
      - MARIADB_ROOT_PASSWORD=$my_DB_ROOT_PASSWORD
      - MARIADB_PASSWORD=$my_DB_PASSWORD
      - MARIADB_USER=$my_DB_USER
      - MARIADB_DATABASE=$my_DB
      - ALLOW_EMPTY_PASSWORD=no
    ports:
      - 3306:3306
    volumes:
      - './my_data:/bitnami/mariadb'
    networks:
      - traefik

  my_wp_service:
    image: wordpress:5.4.2-php7.2-fpm-alpine
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.my_wp_container.entrypoints=http"
      - "traefik.http.routers.my_wp_container.rule=Host(`my_wp_container.my.local`, `www.my_wp_container.my.local`)"
      - "traefik.http.services.my_wp_container.loadbalancer.server.port=80"
      - "traefik.docker.network=traefik"
    depends_on:
      - my_db_service
    container_name: my_wp_container
    restart: unless-stopped
    env_file: .env
    environment:
      - WORDPRESS_DB_HOST=my_db_service:3306
      - WORDPRESS_DB_USER=$my_DB_USER
      - WORDPRESS_DB_PASSWORD=$my_DB_PASSWORD
      - WORDPRESS_DB_NAME=$my_DB
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./my_site:/var/www/html

networks:
  traefik:
    external: true

```

---

<div class="post-metadata">

**Author:** ![notsureifkevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/notsureifkevin/32/1940_2.png) [@notsureifkevin](https://community.traefik.io/u/notsureifkevin)\
**Post date:** [June 17, 2020, 11:16am UTC](https://community.traefik.io/t/v2-on-docker-desktop-for-mac-can-see-dashboard-but-not-wordpress-site/6538/2 "2020-06-17T11:16:04Z")

</div>

> [@shot](#):
>
> ` - "traefik.http.routers.my_wp_container.rule=Host(`my\_wp\_container.my.local`, `www.my\_wp\_container.my.local`)"`

Greetings, welcome to the forums.

This configures Traefik to only route the request when the header `Host` is present with the values defined in the rule. Browsers do this automatically, but you can test this with `curl -H 'Host: my_wp_container.my.local' http://127.0.0.1` You should set up a mask in your hosts file for this to work in your browser.

Also, be sure to declare your entrypoint configuration for Traefik on startup, as seen in this example:

> **[Traefik Docker Documentation - Traefik](https://doc.traefik.io/traefik/user-guides/docker-compose/basic-example/)**
>
> This guide covers a Docker Compose file exposing a service using the Docker provider in Traefik Proxy. Read the technical documentation.

```auto
version: "3.3"

services:

  traefik:
    image: "traefik:v2.2"
    container_name: "traefik"
    command:
      #- "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.http.address=:80" # THIS IS IMPORTANT
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  whoami:
    image: "containous/whoami"
    container_name: "simple-service"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
      - "traefik.http.routers.whoami.entrypoints=http"

```

If you continue to have issues, please turn on debug logging in Traefik and share the logs of the initialization and when you're trying to access the service so we can help.
