Hi,
I have docker 20.10.12 runing.
There is a container traefik runing traefik:latest - several containers are using this trafik container successfully.
Now I would like to run a php-script.
Therefor I set up a container test1 runing php:7.4.27-apache (see docker-compose.yml below).
I have a very simple testfile index.html in ./www
File: docker-compose.yml
version: '3'
services:
test1:
image: php:7.4.27-apache
container_name: test1
restart: unless-stopped
volumes:
- ./www:/var/www/html
- ./log:/var/log
labels:
- "traefik.enable=true"
- "traefik.http.routers.test1.entrypoints=http"
- "traefik.http.routers.test1.rule=Host(`test1.xxx.de`)"
- "traefik.http.middlewares.test1-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.test1.middlewares=test1-https-redirect"
- "traefik.http.routers.test1-secure.entrypoints=https"
- "traefik.http.routers.test1-secure.rule=Host(`test1.xxx.de`)"
- "traefik.http.routers.test1-secure.tls=true"
- "traefik.http.routers.test1-secure.tls.certresolver=http"
- "traefik.http.routers.test1-secure.service=test1"
- "traefik.http.services.test1.loadbalancer.server.port=3000"
- "traefik.docker.network=proxy"
- "traefik.http.routers.test1-secure.middlewares=secHeaders@file"
networks:
- proxy
networks:
proxy:
external: true
The container test1 seems to start nomal.
There is no error in traefik-dashboard.
But going to test1.xxx.de only gives me “Bad Gateway” (or “404 page not found” when container test1 is stoped).
I am a little bit lost - why can’t I access the testfile index.html via webbrowser.
Is there any configuration missing?
Thanks Xavier