0

docker-composeを使用しnginx-proxyて自分のウェブサイトにアクセスできませんletsencrypt...私はこのチュートリアルに従っていました: https://github.com/fatk/docker-letsencrypt-nginx-proxy-companion-examples

これが私の設定です(もちろんexample.com、私が使用している値ではありません):

./docker-compose.yml:

version: "2"

services:
  nginx:
    image: nginx
    container_name: nginx
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/etc/nginx/conf.d"
      - "/etc/nginx/vhost.d"
      - "/usr/share/nginx/html"
      - "./volumes/proxy/certs:/etc/nginx/certs:ro"
    networks:
      - proxy-tier

  nginx-gen:
    image: jwilder/docker-gen
    container_name: nginx-gen
    volumes:
      - "/var/run/docker.sock:/tmp/docker.sock:ro"
      - "./volumes/proxy/templates/nginx-compose.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
    volumes_from:
      - nginx
    entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -only-exposed -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf

  letsencrypt-nginx-proxy-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt-nginx-proxy-companion
    volumes_from:
      - nginx
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./volumes/proxy/certs:/etc/nginx/certs:rw"
    environment:
      - NGINX_DOCKER_GEN_CONTAINER=nginx-gen

  blog:
    image: nginx
    container_name: blog
    volumes:
      - "./volumes/blog/conf.d/:/etc/nginx/conf.d"
      - "./volumes/blog/public/:/usr/share/nginx/html"
    environment:
      - VIRTUAL_HOST=example.com
      - VIRTUAL_NETWORK=nginx-proxy
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=example.com
      - LETSENCRYPT_EMAIL=contact@example.com
    networks:
      - proxy-tier

networks:
  proxy-tier:
    external:
      name: nginx-proxy

./volumes/blog/conf.d/blog.conf:

server {
    listen                  80;
    server_name             example.com;
    root                    /usr/share/nginx/html;
}

私のブログは の下にあり./volumes/blog/public/ます。によって生成されたサイトHexoです。

https://example.comは読み込みエラー ページを返します。

何か案が?

4

1 に答える 1