"Simp_le:1446" Error Occurs After SSL Using Let's Encrypt in Docker

Asked 1 years ago, Updated 1 years ago, 75 views

Event
We are currently planning to use Docker to make the website SSL.
Therefore, I am trying to add Let's Encrypt to the Docker-compose, but
A heading error has occurred and SSLization is not successful.
Here are the details:

Environment
Conoha VPS
CentOS 7
Docker mysql —5.7.21
Error

ERROR:simp_le:1446:CA marked some of the authorizations as invalid,
which likely means it could not access
http://example.com/.well-known/acme-challenge/X.Did you set correct
path in-d example.com:path or --default_root?Are all your domains
accessible from the Internet?Please check your domains' DNS entries,
Your host's network/firewall setup and your webserver config.Ifa
domain's DNS entry has both A and AAAA fields setup, some CAs such as
Let's Encrypt will perform the challenge validation over IPv6.If your
DNS provider does not answer correctly to CAA records request, Let's
Encrypt won't issue a certificate for your domain (see
) https://letsencrypt.org/docs/caa/).Failing authorizations:
https://acme-v01.api.letsencrypt.org/acme/authz/pQw__WwGNMFP2gfsW76-lKGQCWR_7QmKk_6qOC1k2xU

Docker-compose

version: '2'
services:
  db:
    container_name —mysql
    image:mysql:5.7.21
    ports:
      - 3306:3306
    volumes:
      - /home/web/mysql:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD:password
    restart —always
    networks:
      - net-proxy

  wordpress1:
    container_name —wp_1
    depend_on:
      - db
    image —wordpress
    volumes:
      - /home/web/wordpress/wp_1/wp-content:/var/www/html/wp-content
    external_links:
      - db
    expose:
      - 80
    environment:
      VIRTUAL_HOST: [domain name]
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_PASSWORD:password
      LETSENCRYPT_HOST: [domain name]
      LETSENCRYPT_EMAIL: [*******] @g mail.com #Lets Encrypt
    restart —always
    networks:
      - net-proxy

  letsencrypt-nginx-proxy-companion:
    image —jrcs/letsencrypt-nginx-proxy-companion
    volumes:
      - /home/web/certs:/etc/nginx/certs:rw
      - /var/run/docker.sock: /var/run/docker.sock:ro
    volumes_from:
      - nginx-proxy
    restart —always
    networks:
      - net-proxy

  nginx-proxy:
    container_name —nginx_proxy
    image —jwilder/nginx-proxy
    privileged —true
    ports:
      - 80:80
      - 443:443
    volumes:
      - /etc/nginx/vhost.d
      - /usr/share/nginx/html
      - /var/run/docker.sock: /tmp/docker.sock:ro
      - /home/web/certs: /etc/nginx/certs:ro
    restart —always
    networks:
      - net-proxy
    environment:
      DEFAULT_HOST: [Domain Name]

networks:
  net-proxy:
    external —true

Please let me know if there are any other settings that need to be controlled by the OS side.
By the way, I can connect successfully with HTTP:// [Domain Name].

Thank you for your cooperation.

nginx docker docker-compose letsencrypt

2022-09-30 21:39

1 Answers

The cause was the configuration of the records in the domain. I made www correspond to it, but it seemed that I couldn't go to see Let's Encrypt because I didn't set it normally (@).It doesn't seem to work to write www. in Docker-compose.


2022-09-30 21:39

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.