Benutzer-Werkzeuge

Webseiten-Werkzeuge


projekte:docker:container:apache2:start

Dies ist eine alte Version des Dokuments!


Apache2 Container

ich brauche, um von extern auf meine Homematic zuzugreifen, einen Reverse Proxy um feindliche Zugriffe abzuwehren und den Zugriff zu limitieren. Desweiteren stelle ich damit auch intern Infoseiten wie benutzte IP-Adressen im Heimnetzwerk, Ports, Namen etc. zur Verfügung.

compose Datei

compose Datei

version: "3.8"

services:
  apache2:
    image: php:7.4-apache
    ports:
      - 81:80
      - 444:443
    volumes:
      - /docker/data/volumes/apache2/www:/var/www/html
      - /docker/data/volumes/apache2/logs:/var/log/apache2
      - /docker/data/volumes/apache2/conf/httpsusers:/etc/apache2/httpsusers
      - /docker/data/volumes/apache2/conf/chain.pem:/etc/apache2/chain.pem
      - /docker/data/volumes/apache2/conf/cert.pem:/etc/apache2/cert.pem
      - /docker/data/volumes/apache2/conf/privkey.pem:/etc/apache2/privkey.pem

      - /docker/data/volumes/apache2/conf/modules.conf:/etc/apache2/mods-enabled/mn.conf
      - /docker/data/volumes/apache2/conf/ssl.conf:/etc/apache2/conf-enabled/ssl.conf
      - /docker/data/volumes/apache2/conf/hmproxy.conf:/etc/apache2/sites-enabled/hmproxy.conf

    networks:
      - traefik_proxy
    deploy:
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik_proxy
        - traefik.http.routers.apache2.rule=Host(`apache2.beispiel.domain`)
        - traefik.http.routers.apache2.entrypoints=http
        - traefik.http.routers.apache2.service=apache2
        - traefik.http.routers.apache2.middlewares=apache2-auth
        - traefik.http.services.apache2.loadbalancer.server.port=80
        - traefik.http.middlewares.apache2-auth.basicauth.users=USER:HASHPASSWORT

        - traefik.http.routers.hmproxy.rule=Host(`hmproxy.beispiel.domain`)
        - traefik.http.routers.hmproxy.entrypoints=https
        - traefik.http.routers.hmproxy.service=hmproxy
        - traefik.http.routers.hmproxy.middlewares=apache2-auth
        - traefik.http.routers.hmproxy.tls=true
        - traefik.http.services.hmproxy.loadbalancer.server.port=443
        - traefik.http.middlewares.hmproxy-auth.basicauth.users=USER:HASHPASSWORT

networks:
  traefik_proxy:
    external: true
<code>

Apache Konfiguration



projekte/docker/container/apache2/start.1670423923.txt.gz · Zuletzt geändert: 2022/12/07 15:38 von admin