2021-05-09 22:07:17 +02:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
|
|
|
apache:
|
|
|
|
build: .
|
2022-04-19 17:38:55 +02:00
|
|
|
image: my_apache:7.4.29
|
2021-05-09 22:07:17 +02:00
|
|
|
container_name: apache
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
expose:
|
|
|
|
- "80"
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- /usr/lib/locale/:/usr/lib/locale/
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2021-11-10 16:26:54 +01:00
|
|
|
- ${DATA_PATH}:/var/www/
|
2021-05-09 22:07:17 +02:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.middlewares.apache-redirect-websecure.redirectscheme.scheme=https"
|
|
|
|
- "traefik.http.routers.apache-http.middlewares=apache-redirect-websecure"
|
2022-04-19 17:38:40 +02:00
|
|
|
- "traefik.http.routers.apache-http.rule=Host(`${CN}`, `${SAN1}`, `${TRAVAUXCN}`)"
|
2021-05-09 22:07:17 +02:00
|
|
|
- "traefik.http.routers.apache-http.entrypoints=web"
|
2022-04-19 17:38:40 +02:00
|
|
|
- "traefik.http.routers.apache-https.rule=Host(`${CN}`, `${SAN1}`, `${TRAVAUXCN}`)"
|
2021-05-09 22:07:17 +02:00
|
|
|
- "traefik.http.routers.apache-https.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.apache-https.middlewares=apache-redirectregex"
|
|
|
|
- "traefik.http.routers.apache-https.tls=true"
|
|
|
|
- "traefik.http.routers.apache-https.tls.certresolver=myhttpchallenge"
|
|
|
|
- "traefik.http.middlewares.apache-redirectregex.redirectregex.regex=^https://${SAN1}/(.*)"
|
|
|
|
- "traefik.http.middlewares.apache-redirectregex.redirectregex.replacement=https://${CN}/$${1}"
|
2022-04-19 17:38:40 +02:00
|
|
|
- "traefik.http.middlewares.apache-travaux.redirectregex.regex=^https://${TRAVAUXCN}/"
|
|
|
|
- "traefik.http.middlewares.apache-travaux.redirectregex.replacement=https://${CN}/travaux.php"
|
|
|
|
- "traefik.http.routers.apache-https.middlewares=apache-redirectregex,apache-travaux"
|
2021-05-09 22:07:17 +02:00
|
|
|
- "co.elastic.logs/module=apache"
|
|
|
|
- "co.elastic.logs/fileset=access"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|