version: "3.8" services: apache-test: build: .. image: my_apache:7.4.33 container_name: apache-test networks: - proxy expose: - "80" restart: unless-stopped volumes: - /usr/lib/locale/:/usr/lib/locale/ - /etc/localtime:/etc/localtime:ro - ${DATA_PATH}:/var/www/ labels: - "traefik.enable=true" - "traefik.http.routers.gnouswebtest.entrypoints=websecure" - "traefik.http.routers.gnouswebtest.rule=Host(`${CN}`, `${SAN1}`)" - "traefik.http.routers.gnouswebtest.middlewares=gnouswebtest-redirectregex" - "traefik.http.middlewares.gnouswebtest-redirectregex.redirectregex.regex=^https://${SAN1}/(.*)" - "traefik.http.middlewares.gnouswebtest-redirectregex.redirectregex.replacement=https://${CN}/$${1}" networks: proxy: external: true