Invalid Response from zapto.org

I have tried to get SSL from this tutorial but it don't work:

How To Secure a Containerized Node Application with Let's Encrypt | DigitalOcean

My domain is: ndk2021.zapto.org, this is the free domain I found from noip.com

I ran this command from docker, here is the part of it:

  nginx_:
    image: nginx:stable-alpine 
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
      - certbot-etc:/etc/letsencrypt
      - certbot-var:/var/lib/letsencrypt
      - web-root:/var/www/html
    depends_on:
      - server
      #- client
    networks:
      - dev
   
  certbot:
    image: certbot/certbot:latest
    command: certonly --webroot --webroot-path=/var/www/html --email xukamunnam@gmail.com --agree-tos --no-eff-email --staging -d ndk2021.zapto.org
    volumes:
      - certbot-etc:/etc/letsencrypt
      - certbot-var:/var/lib/letsencrypt
      - web-root:/var/www/html
    depends_on:
      - nginx_
    networks:
      - dev
      
volumes:
  certbot-etc:
  certbot-var:
  web-root:
    driver: local
    driver_opts:
      type: none
      device: /home/ndk2020/Work/doantotnghiep/OnlineExam2/views
      o: bind

It produced this output:

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
certbot_1 | Domain: ndk2021.zapto.org
certbot_1 | Type: unauthorized
certbot_1 | Detail: Invalid response from http://ndk2021.zapto.org /.well-known/acme-challenge/g_Zg41LYzXgYbmqpaUIWPv8nUTWQ3RWSYCdTgzyFYU0 [34.199.8.144]: "\n\n<!-- WEB REDIRECTIO"
certbot_1 |
certbot_1 | Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
certbot_1 |
certbot_1 | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot_1 | Some challenges have failed.
certbot_1 | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version):

The operating system my web server runs on is (include version): MX Linux KDE 19.4

My hosting provider, if applicable, is: I try to host it on my personal machine

I can login to a root shell on my machine (yes or no, or I don't know): I don't know

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): latest version on Docker Hub (maybe 1.20)

I have been forwarding port on my router to 80 and ping it fine.

Hi @xukamunnam welcome to the LE community forum :slight_smile:

Q1: Is this the first time for you trying to get a cert within docker?

Q2: Is that the IP of the server trying to get the cert ("34.199.8.144")?

Q3: What is?:
[is there some HTML script based redirection at play?]

[note: LE won't follow web such redirections]

Q4: Have you looked through the logs?:

2 Likes

Q1: Is this the first time for you trying to get a cert within docker?

YES

Q2: Is that the IP of the server trying to get the cert ("34.199.8.144")?

I think because I host on my local computer so that is 27.78.36.190

Q3: What is?:
[is there some HTML script based redirection at play?]

I really don't know what is html script based redirection, I copied the folder "views" from this repo of the aforementioned tutorial

nodejs-image-demo/views at master · do-community/nodejs-image-demo · GitHub

and use it as volumes in docker-compose with name "web-root"

Here is my nginx.conf:

server {
  listen 80 ;
  listen [::]:80;
  
  root /var/www/html;
  index index.html index.htm index.nginx-debian.html;
  server_name ndk2021.zapto.org, www.ndk2021.zapto.org;

  location ~ /\. {
    access_log off;
    log_not_found off;
    deny all;
  }
 
 location / {
   proxy_pass http://server:3001;
 }
  location ~ /.well-known/acme-challenge/ {
    allow all;
    root /var/www/html;
  }

  #location / {
  #  return 301 https://$server_name$request_uri;
  #}
  
  #if ($scheme != https) {
    # Redirection automatique sur le HTTPS
    #return 301 https://$host$request_uri;
  #}
}

server {
  listen 443 ;
  #ssl_certificate /etc/nginx/ssl/cert/server-cert.crt;
  #ssl_certificate_key /etc/nginx/ssl/cert/server-cert.key;
  #ssl_certificate /etc/nginx/ssl/live/ndk2021.zapto.org/fullchain.pem;
  #ssl_certificate_key /etc/nginx/ssl/live/ndk2021.zapto.org/privkey.pem;
  #ssl_certificate /etc/letsencrypt/live/ndk2021.zapto.org/fullchain.pem;
  #ssl_certificate_key /etc/letsencrypt/live/ndk2021.zapto.org/privkey.pem;
  #include /etc/letsencrypt/options-ssl-nginx.conf;
  #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
  

  #ssl_session_cache builtin:1000 shared:SSL:10m;
  #ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
  #ssl_ciphers "HIGH !aNULL !eNULL !EXPORT !CAMELLIA !DES !MD5 !PSK !RC4";
  #ssl_prefer_server_ciphers on;
  #ssl_verify_client on;
  access_log	/var/log/nginx/nginx-2443.log;

  location / {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_http_version 1.1;
    proxy_set_header Connection $http_connection;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
    proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
    proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
    proxy_cache_bypass $http_upgrade;
    proxy_read_timeout 900;
    client_max_body_size 0;
    proxy_buffering off;
    add_header X-Accel-Buffering no;
    if ($request_method = 'OPTIONS') {
      add_header 'Access-Control-Allow-Origin: $http_origin');
      add_header 'Access-Control-Allow-Origin: GET, POST, DELETE, PUT, PATCH, OPTIONS');
      add_header 'Access-Control-Allow-Credentials: true');
      add_header 'Vary: Origin');
    }
    add_header 'Access-Control-Allow-Origin' '$http_origin' always;
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always;
    add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With'
    always;
    #proxy_pass http://client:3000;
  }

  #location /api/ {
  #  proxy_pass http://server:3001/;
  #}

}

Q4: Have you looked through the logs?:

I can't view the logs in docker because the container is exited with code 1

onlineexam2_certbot_1 exited with code 1

I don't understand your answer to Q2.

I would try reversing this order:

1 Like

I don't understand your answer to Q2.

I mean "34.199.8.144" may not correct, so I give you the IP of my personal machine.

I would try reversing this order:

Still get the same error

Is this correct?:

Name:    ndk2021.zapto.org
Address: 34.199.8.144

If not, you won't be able to get a cert via HTTP authentication.

1 Like

Here is the IP I set for the domain

According to your answer, are there any free domain that compatible with LE?

Thanks.

There are others, but NO-IP should work.
You probably haven't set it correctly:

2 Likes

I have switch to another hostname in no-ip, and don't use the web redirect function. It still not work :sob:

Requesting a certificate for ndk2020.zapto.org

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: ndk2020.zapto.org
Type: unauthorized
Detail: Invalid response from http://ndk2020.zapto.org/.well-known/acme-challenge/iuwnQsrBGA02VKgICpN84WXnC3ujmLZE2otTXKairQc [27.78.36.190]: "\r\n403 Forbidden\r\n\r\n

403 Forbidden

\r\n
nginx/1.20.1</ce"

Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

Well you are making progress; don't be sad.

Name:    ndk2020.zapto.org
Address: 27.78.36.190

Please show:

  • the vhost config that serves that name for HTTP requests.
  • the complete command you ran
  • the log file it created

And make sure the site is functional via HTTP before trying to obtain a cert (via HTTP authentication).
And since your are now troubleshooting, please use the staging environment for all such testing.

the vhost config that serves that name for HTTP requests.

How to find that? you mean files in /etc/apache2/sites-available/ in the host machine ?

the complete command you ran

after setting docker-compose I just ran docker-compose up normally. here is the Dockerfile I build for server images.

FROM node:16.10-alpine3.11

WORKDIR /app

COPY package.json .
COPY yarn.lock . 

RUN yarn install

COPY . .

the log file it created

Successfully built 95b1a190b59c
Successfully tagged onlineexam2_server:latest
Creating onlineexam2_postgres__1 ... done
Creating onlineexam2_server_1 ... done
Creating onlineexam2_nginx__1 ... done
Creating onlineexam2_certbot_1 ... done
Attaching to onlineexam2_postgres__1, onlineexam2_server_1, onlineexam2_nginx__1, onlineexam2_certbot_1
postgres__1 |
postgres__1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres__1 |
nginx__1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx__1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
postgres__1 | 2021-10-06 00:27:58.275 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres__1 | 2021-10-06 00:27:58.275 UTC [1] LOG: listening on IPv6 address "::", port 5432
server_1 | yarn run v1.22.5
nginx__1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
server_1 | $ nodemon ./src/index.ts
server_1 | [nodemon] 2.0.7
nginx__1 | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
server_1 | [nodemon] to restart at any time, enter rs
nginx__1 | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx__1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
server_1 | [nodemon] watching path(s): .
nginx__1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
server_1 | [nodemon] watching extensions: ts,json
postgres__1 | 2021-10-06 00:27:58.280 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
server_1 | [nodemon] starting ts-node ./src/index.ts
postgres__1 | 2021-10-06 00:27:58.297 UTC [22] LOG: database system was shut down at 2021-10-06 00:27:44 UTC
nginx__1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: using the "epoll" event method
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: nginx/1.20.1
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: built by gcc 10.2.1 20201203 (Alpine 10.2.1_pre1)
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: OS: Linux 5.10.0-5mx-amd64
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: start worker processes
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: start worker process 32
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: start worker process 33
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: start worker process 34
nginx__1 | 2021/10/06 00:27:58 [notice] 1#1: start worker process 35
postgres__1 | 2021-10-06 00:27:58.301 UTC [1] LOG: database system is ready to accept connections
certbot_1 | Requesting a certificate for ndk2020.zapto.org
nginx__1 | 66.133.109.36 - - [06/Oct/2021:00:28:02 +0000] "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
nginx__1 | 2021/10/06 00:28:02 [error] 33#33: *1 open() "/usr/share/nginx/html/.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us" failed (2: No such file or directory), client: 66.133.109.36, server: localhost, request: "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1", host: "ndk2020.zapto.org"
nginx__1 | 2021/10/06 00:28:02 [error] 33#33: *2 open() "/usr/share/nginx/html/.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us" failed (2: No such file or directory), client: 18.196.102.134, server: localhost, request: "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1", host: "ndk2020.zapto.org"
nginx__1 | 18.196.102.134 - - [06/Oct/2021:00:28:02 +0000] "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
server_1 | env path /app/src/common/../../.env
server_1 | **********************
server_1 | Environment: undefined
server_1 | database: testDB
server_1 | client url http://localhost:3000
nginx__1 | 2021/10/06 00:28:02 [error] 33#33: *3 open() "/usr/share/nginx/html/.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us" failed (2: No such file or directory), client: 18.236.228.243, server: localhost, request: "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1", host: "ndk2020.zapto.org"
nginx__1 | 18.236.228.243 - - [06/Oct/2021:00:28:02 +0000] "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
nginx__1 | 18.222.145.89 - - [06/Oct/2021:00:28:02 +0000] "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
nginx__1 | 2021/10/06 00:28:02 [error] 33#33: *4 open() "/usr/share/nginx/html/.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us" failed (2: No such file or directory), client: 18.222.145.89, server: localhost, request: "GET /.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us HTTP/1.1", host: "ndk2020.zapto.org"
server_1 | test: 3001
server_1 | SERVER RUNNING ON PORT 3001
certbot_1 |
certbot_1 | Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
certbot_1 | Domain: ndk2020.zapto.org
certbot_1 | Type: unauthorized
certbot_1 | Detail: Invalid response from http://ndk2020.zapto.org/.well-known/acme-challenge/7yWA8nr_VJqu1wLtTq0pTmyKrjZVOiV7Y3vX-hWo0Us [27.78.36.190]: "\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx/1.20.1</ce"
certbot_1 |
certbot_1 | Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
certbot_1 |
certbot_1 | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot_1 | Some challenges have failed.
certbot_1 | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
onlineexam2_certbot_1 exited with code 1

Yes.
[or do you use nginx ?]

1 Like

Yes.
[or do you use nginx ?]

I use both, but the default of the distro is Apache, here are the 2 files I have found.

000-default.conf

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

default-ssl.conf

<IfModule mod_ssl.c>
	<VirtualHost _default_:443>
		ServerAdmin webmaster@localhost

		DocumentRoot /var/www/html

		# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
		# error, crit, alert, emerg.
		# It is also possible to configure the loglevel for particular
		# modules, e.g.
		#LogLevel info ssl:warn

		ErrorLog ${APACHE_LOG_DIR}/error.log
		CustomLog ${APACHE_LOG_DIR}/access.log combined

		# For most configuration files from conf-available/, which are
		# enabled or disabled at a global level, it is possible to
		# include a line for only one particular virtual host. For example the
		# following line enables the CGI configuration for this host only
		# after it has been globally disabled with "a2disconf".
		#Include conf-available/serve-cgi-bin.conf

		#   SSL Engine Switch:
		#   Enable/Disable SSL for this virtual host.
		SSLEngine on

		#   A self-signed (snakeoil) certificate can be created by installing
		#   the ssl-cert package. See
		#   /usr/share/doc/apache2/README.Debian.gz for more info.
		#   If both key and certificate are stored in the same file, only the
		#   SSLCertificateFile directive is needed.
		SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
		SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

		#   Server Certificate Chain:
		#   Point SSLCertificateChainFile at a file containing the
		#   concatenation of PEM encoded CA certificates which form the
		#   certificate chain for the server certificate. Alternatively
		#   the referenced file can be the same as SSLCertificateFile
		#   when the CA certificates are directly appended to the server
		#   certificate for convinience.
		#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt

		#   Certificate Authority (CA):
		#   Set the CA certificate verification path where to find CA
		#   certificates for client authentication or alternatively one
		#   huge file containing all of them (file must be PEM encoded)
		#   Note: Inside SSLCACertificatePath you need hash symlinks
		#		 to point to the certificate files. Use the provided
		#		 Makefile to update the hash symlinks after changes.
		#SSLCACertificatePath /etc/ssl/certs/
		#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt

		#   Certificate Revocation Lists (CRL):
		#   Set the CA revocation path where to find CA CRLs for client
		#   authentication or alternatively one huge file containing all
		#   of them (file must be PEM encoded)
		#   Note: Inside SSLCARevocationPath you need hash symlinks
		#		 to point to the certificate files. Use the provided
		#		 Makefile to update the hash symlinks after changes.
		#SSLCARevocationPath /etc/apache2/ssl.crl/
		#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl

		#   Client Authentication (Type):
		#   Client certificate verification type and depth.  Types are
		#   none, optional, require and optional_no_ca.  Depth is a
		#   number which specifies how deeply to verify the certificate
		#   issuer chain before deciding the certificate is not valid.
		#SSLVerifyClient require
		#SSLVerifyDepth  10

		#   SSL Engine Options:
		#   Set various options for the SSL engine.
		#   o FakeBasicAuth:
		#	 Translate the client X.509 into a Basic Authorisation.  This means that
		#	 the standard Auth/DBMAuth methods can be used for access control.  The
		#	 user name is the `one line' version of the client's X.509 certificate.
		#	 Note that no password is obtained from the user. Every entry in the user
		#	 file needs this password: `xxj31ZMTZzkVA'.
		#   o ExportCertData:
		#	 This exports two additional environment variables: SSL_CLIENT_CERT and
		#	 SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
		#	 server (always existing) and the client (only existing when client
		#	 authentication is used). This can be used to import the certificates
		#	 into CGI scripts.
		#   o StdEnvVars:
		#	 This exports the standard SSL/TLS related `SSL_*' environment variables.
		#	 Per default this exportation is switched off for performance reasons,
		#	 because the extraction step is an expensive operation and is usually
		#	 useless for serving static content. So one usually enables the
		#	 exportation for CGI and SSI requests only.
		#   o OptRenegotiate:
		#	 This enables optimized SSL connection renegotiation handling when SSL
		#	 directives are used in per-directory context.
		#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
		<FilesMatch "\.(cgi|shtml|phtml|php)$">
				SSLOptions +StdEnvVars
		</FilesMatch>
		<Directory /usr/lib/cgi-bin>
				SSLOptions +StdEnvVars
		</Directory>

		#   SSL Protocol Adjustments:
		#   The safe and default but still SSL/TLS standard compliant shutdown
		#   approach is that mod_ssl sends the close notify alert but doesn't wait for
		#   the close notify alert from client. When you need a different shutdown
		#   approach you can use one of the following variables:
		#   o ssl-unclean-shutdown:
		#	 This forces an unclean shutdown when the connection is closed, i.e. no
		#	 SSL close notify alert is send or allowed to received.  This violates
		#	 the SSL/TLS standard but is needed for some brain-dead browsers. Use
		#	 this when you receive I/O errors because of the standard approach where
		#	 mod_ssl sends the close notify alert.
		#   o ssl-accurate-shutdown:
		#	 This forces an accurate shutdown when the connection is closed, i.e. a
		#	 SSL close notify alert is send and mod_ssl waits for the close notify
		#	 alert of the client. This is 100% SSL/TLS standard compliant, but in
		#	 practice often causes hanging connections with brain-dead browsers. Use
		#	 this only for browsers where you know that their SSL implementation
		#	 works correctly.
		#   Notice: Most problems of broken clients are also related to the HTTP
		#   keep-alive facility, so you usually additionally want to disable
		#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
		#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
		#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
		#   "force-response-1.0" for this.
		# BrowserMatch "MSIE [2-6]" \
		#		nokeepalive ssl-unclean-shutdown \
		#		downgrade-1.0 force-response-1.0

	</VirtualHost>
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Well that is why it fails.

Go into that first Apache config and change that to:
DocumentRoot /usr/share/nginx/html

1 Like

I have change to

ServerAdmin webmaster@localhost
	#DocumentRoot /var/www/html
	DocumentRoot /usr/share/nginx/html

But the same error occurred, do I need to change anything inside docker?

nginx__1 | 2021/10/06 01:50:19 [error] 35#35: *1 open() "/usr/share/nginx/html/.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ" failed (2: No such file or directory), client: 66.133.109.36, server: localhost, request: "GET /.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ HTTP/1.1", host: "ndk2020.zapto.org"
nginx__1 | 66.133.109.36 - - [06/Oct/2021:01:50:19 +0000] "GET /.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
nginx__1 | 2021/10/06 01:50:19 [error] 35#35: *2 open() "/usr/share/nginx/html/.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ" failed (2: No such file or directory), client: 18.196.102.134, server: localhost, request: "GET /.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ HTTP/1.1", host: "ndk2020.zapto.org"
nginx__1 | 18.196.102.134 - - [06/Oct/2021:01:50:19 +0000] "GET /.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
nginx__1 | 2021/10/06 01:50:19 [error] 35#35: *3 open() "/usr/share/nginx/html/.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ" failed (2: No such file or directory), client: 3.143.223.150, server: localhost, request: "GET /.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ HTTP/1.1", host: "ndk2020.zapto.org"
nginx__1 | 3.143.223.150 - - [06/Oct/2021:01:50:19 +0000] "GET /.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ HTTP/1.1" 404 153 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "-"
certbot_1 |
certbot_1 | Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
certbot_1 | Domain: ndk2020.zapto.org
certbot_1 | Type: unauthorized
certbot_1 | Detail: Invalid response from http://ndk2020.zapto.org/.well-known/acme-challenge/JIVdR63ndPWSgcl6ML2tBlEyAJSbAzwUI_EpWVp2QpQ [27.78.36.190]: "\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx/1.20.1</ce"

authenticator: webroot

You quote this info for?

P/S: I will afk a while, thx for your support, try to be back ASAP.

1 Like

Make sure you restarted Apache.
I too will be biking for a bit - TTYL

1 Like

Hi,

I have restarted Apache and still get the same error, I also check whether the directory is existed on both docker and my computer.

In my local computer:

In Docker container:

You need an functional HTTP web site before you can secure it (via HTTP authentication).

1 Like

Should I change to other type that work?

The problem is NOT at NO-IP.
The problem is within your server.
http://ndk2020.zapto.org/.well-known/acme-challenge/Challenge-File must connect - it does not find the needed file.

This is shown for http://ndk2020.zapto.org/
image

So we need to review the nginx config.
Please upload the entire config output of:
sudo nginx -T