Traefik |没有证书的单个域

时间:2020-02-18 12:38:09

标签: ssl docker-compose lets-encrypt traefik certbot

我将Traefik与docker-compose结合使用。所有域都通过Lets Encrypt自动接收证书。

但是现在我需要外部应用程序的SSL证书。该应用程序未连接到traefik,但在同一服务器上运行。

为了使用Certbot来完成此任务,没有证书的域必须能够通过http接受连接。为了使Certbot正常工作,它尝试将文件保存在域的根目录中并通过http。

您可以禁止通过标签使用SSL吗?

Docker组成的相关部分:

version: '3'
services:
  app:
    image: traefik:1.7.20-alpine
    restart: always
    ports:
      - "80:80"
      - "443:443"
        #- "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./traefik.toml:/traefik.toml
      - ./acme.json:/acme.json
    networks:
      - webserver

  node-Domain:
    image: httpd:latest
    networks:
      - webserver
    labels:
      - "traefik.frontend.rule=Host:node.domain.tld"
      - "traefik.protocol=http"
      - "traefik.frontend.entryPoints=http"
      - "traefik.http.routers.application.tls=false"
      - "traefik.frontend.headers.SSLRedirect=false"
      - "traefik.enable=true"
    volumes:
      - ./node-Domain:/usr/local/apache2/htdocs

0 个答案:

没有答案