-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
Description
Do you want to request a feature or report a bug?
Bug
Did you try using a 1.7.x configuration for the version 2.0?
No
What i did?
I used Traefik 2.0 with Docker-Swarm environment, Below is How i started Traefik-v2:
docker service create \
--name traefik-v2 \
--mode global \
--network docker-proxy \
--network web \
--publish mode=host,target=80,published=80,protocol=tcp \
--publish mode=host,target=443,published=443,protocol=tcp \
--publish mode=host,target=8080,published=8080,protocol=tcp \
--env 'ALICLOUD_REGION_ID=xxxxxx' \
--env 'ALICLOUD_ACCESS_KEY=this is my secret' \
--env 'ALICLOUD_SECRET_KEY=this is my super secret' \
--mount type=bind,source=/usr/share/zoneinfo,destination=/usr/share/zoneinfo,ro=1 \
--mount type=volume,source=traefik-v2,destination=/docker-volume \
traefik:v2.0 \
--providers.docker=true \
--providers.docker.endpoint="tcp://docker-proxy:2375" \
--providers.docker.swarmMode=true \
--providers.docker.swarmModeRefreshSeconds=10s \
--providers.docker.exposedByDefault=false \
--entryPoints.web.address=:80 \
--entryPoints.web-secure.address=:443 \
--log=true \
--log.level=INFO \
--accesslog=true \
--accesslog.bufferingsize=100 \
--api.insecure=true \
--certificatesresolvers.mydnschallenge.acme.dnschallenge=true \
--certificatesresolvers.mydnschallenge.acme.dnschallenge.provider=alidns \
--certificatesresolvers.mydnschallenge.acme.email=myemail@email.com \
--certificatesresolvers.mydnschallenge.acme.storage=/docker-volume/acme.json \
--certificatesresolvers.mydnschallenge.acme.dnschallenge.delaybeforecheck=10s \
--certificatesresolvers.mydnschallenge.acme.dnschallenge.resolvers=114.114.114.114:53,8.8.8.8:5
In addition, This is How my docker service started: (I copy it from your document)
docker service create \
--name whoami \
--mode global \
--network web \
--label 'traefik.enable=true' \
--label 'traefik.docker.network=web' \
--label 'traefik.http.routers.whoami.rule=Host(`whoami.mydomain.com`)' \
--label 'traefik.http.services.whoami.loadbalancer.server.port=80' \
--label 'traefik.http.routers.whoami.tls.certresolver=mydnschallenge' \
containous/whoami:latest
What's the problem?
If my server configured certresolver, It will olny work with HTTPS.
When i try to access my website with http://whoami.mydomain.com, I got 404 page not found.
By the way, The Bot is ridiculous. It always closes my issus.
Reactions are currently unavailable