Traefik nginx not able to use only HTTP

Hello Team,

I am trying to use http only for some testing, but I not able to make it to work. I am getting self signed Traefik certificate. I use Docker-compose for this.
Thank you in advance for your assistance.

version: '3.7'

# The latest official supported Traefik docker image
image: traefik:v2.5
# Enables the Traefik Dashboard and tells Traefik to listen to docker
# enable --log.level=INFO so we can see what Traefik is doing in the log files
# Exposes port 80 for incomming web requests
- "80:80"
- "443:443"
# The Web UI port (enabled by --api.insecure=true)
- "8080:8080"
- brokenbyte-network
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- "./ssl:/etc/ssl"
- ./traefik.yml:/etc/traefik/traefik.yml
- ./letsencrypt:/letsencrypt

  - "traefik.enable=true"
  - "traefik.http.routers.traefik.rule=Host(``)"
  - "traefik.http.routers.traefik.entrypoints=web"
  - "traefik.http.routers.traefik.service=traefik"
  - ""
  - "traefik.http.routers.traefik.tls.certresolver=myresolver"
  - "traefik.http.middlewares.traefik.redirectscheme.scheme=https"
  - "traefik.http.middlewares.traefik.redirectscheme.permanent=true"

image: "nginx"


- "80:80"

- "443:443"

   - brokenbyte-network
restart: unless-stopped
  - "./config/:/etc/nginx/conf.d/"
  - "./app:/var/www/html/"
  - "./letsencrypt:/letsencrypt"


- "443"

- "80"

  - "traefik.http.routers.web.rule=Host(``)"
  - "traefik.http.routers.web.entrypoints=web"
  - "traefik.http.routers.web.service=web"
  - ""
 - "traefik.http.routers.web.tls.certresolver=myresolver"
 - "traefik.http.middlewares.web.redirectscheme.scheme=http"
 - "traefik.http.middlewares.web.redirectscheme.permanent=true"

Not sure what you are trying to do here. Are you trying to get to the Traefik administration page or are you trying to publish a web page via Traefik?

Just a note, if you are trying to http on .dev, that subdomain is require https only. For more information on that .dev subdomain: Show your stuff with .dev – Google Domains

So if you are trying to access a .dev using only http, then it might not work.

Hello @webmastadj, I managed to configure requested behavior with nginx and certbot.
Anything, thank you for your assistance.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.