Can't Certify PERN stack app PM2+Apache+AWS EC2

Hello, community. I'm struggling through learning application deployment, and this HTTPS is kicking my ass. Any help could be appreciated.

My domain is:

I ran this command:
sudo certbot certonly --webroot -w /var/www/html -d

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Type: unauthorized
Detail: The key authorization file from the server did not match this challenge "zQkzJS6_A4JN9vbrYT4kQHyPQ8HMU12TwXDJLI8SSts.Ou_Y7yVtkgwAcRQypp1rdgEqt5jbcVuWuNmjGeIsYDE" != "SkDQ2PJYaCp84cWGHOU2hxgp_5zSnN_NioQde6-mHWI"

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.

Some challenges have failed.
Ask for help or search for solutions at See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version):
Node v12.22.9

The operating system my web server runs on is (include version):
Ubuntu 22.04.2 LTS

My hosting provider, if applicable, is:
AWS EC2 apache / pm2 for a node.js process

I can login to a root shell on my machine (yes or no, or 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):
certbot --version

Hello @Varelion, welcome to the Let's Encrypt community. :slightly_smiling_face:

Here is a list of issued Certificates |, the latest being 2023-04-20 for only

Please share

if you are still having issues.

The site returns (the same) content with 200 for any file name request:



That can't be good.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.