In chrome when i type https://smokeping.domain.xyz/ i get 404 page not found and the address changes to http://smokeping.domain.xyz/smokeping/ . If i press f5 to refresh nothing changes, still 404. If i click the address and press enter now its https://smokeping.domain.xyz/smokeping/ and smokeping webui is up and working fine. Why the weird behavior, how do you make just https://smokeping.domain.xyz/ work to begin with?
If I had to guess it has something todo with traefik interacting with another web server according to this Improved default apache config such that fresh users directly get redirected to the smokeping "subsite" by DavyLandman · Pull Request #52 · linuxserver/docker-smokeping · GitHub
version: '3.4'
networks:
proxy:
external: true
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- 80:80
- 443:443
environment:
- CF_API_EMAIL=$CLOUDFLARE_EMAIL
# - CF_DNS_API_TOKEN=YOUR_API_TOKEN
- CF_API_KEY=$CLOUDFLARE_API_KEY
# be sure to use the correct one depending on if you are using a token or key
- DOMAINNAME # from .env
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- $DOCKERDIR/data/traefik.yml:/traefik.yml:ro
- $DOCKERDIR/data/acme.json:/acme.json
- $DOCKERDIR/data/config.yml:/config.yml:ro
# - $DOCKERDIR/.env:/.env:ro
command:
- "--serversTransport.insecureSkipVerify=true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`traefik.$DOMAINNAME`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=admin:admin"
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`traefik.$DOMAINNAME`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=cloudflare"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=$DOMAINNAME"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.$DOMAINNAME"
- "traefik.http.routers.traefik-secure.service=api@internal"
extra_hosts: # https://community.home-assistant.io/t/home-assistant-in-docker-hosts-mode-with-traefik-2-and-lets-encrypt-working-sample/190476/7
- host.docker.internal:172.19.0.1 # I don't know why this is needed
smokeping:
image: lscr.io/linuxserver/smokeping
container_name: smokeping
networks:
- proxy
environment:
- PUID=$PUID
- PGID=$PGID
- TZ=$TZ
labels:
- "traefik.enable=true"
- "traefik.http.routers.smokeping.rule=Host(`smokeping.$DOMAINNAME`)"
- "traefik.http.routers.smokeping.entrypoints=https"
- "traefik.http.routers.smokeping.tls.certresolver=cloudflare"
- "traefik.http.services.smokeping.loadbalancer.server.port=80"
volumes:
- $DOCKERDIR/smokeping/config:/config
- $DOCKERDIR/smokeping/data:/data
# ports:
# - 8080:80
restart: unless-stopped
########### config.yaml
http:
#region routers
#endregion
middlewares:
addprefix-pihole:
addPrefix:
prefix: "/admin"
https-redirect:
redirectScheme:
scheme: https
default-headers:
headers:
frameDeny: true
sslRedirect: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 15552000
customFrameOptionsValue: SAMEORIGIN
customRequestHeaders:
X-Forwarded-Proto: https
idrac:
headers:
frameDeny: true
sslRedirect: true
browserXssFilter: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsSeconds: 15552000
customFrameOptionsValue: SAMEORIGIN
customRequestHeaders:
X-Forwarded-Proto: https
default-whitelist:
ipWhiteList:
sourceRange:
- "10.0.0.0/8"
- "192.168.0.0/16"
- "172.16.0.0/12"
secured:
chain:
middlewares:
- default-whitelist
- default-headers
############## traefik.yaml
api:
dashboard: true
debug: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
idrac: # for idrac console
address: ":5900/tcp"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /config.yml
certificatesResolvers:
cloudflare:
acme:
email: email@gmail.com
storage: acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"