Im using React and Nginx
My domain is: oraj.bjmp.gov.ph
I ran this command: sudo certbot --nginx -v -d oraj.bjmp.gov.ph --debug-challenges
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Certificate is due for renewal, auto-renewing...
Renewing an existing certificate for oraj.bjmp.gov.ph
Performing the following challenges:
http-01 challenge for oraj.bjmp.gov.ph
Challenges loaded. Press continue to submit to CA. Pass "-v" for more info about
challenges.
Press Enter to Continue
Waiting for verification...
Challenge failed for domain oraj.bjmp.gov.ph
http-01 challenge for oraj.bjmp.gov.ph
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: oraj.bjmp.gov.ph
Type: unauthorized
Detail: 202.90.133.189: Invalid response from http://oraj.bjmp.gov.ph/.well-known/acme-challenge/CE14KPqHdW2ZuvjnmyKzDNAqMC78x0yVtge2_TQupS0: 404
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
Cleaning up challenges
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.
My web server is (include version): nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 22.04.2 LTS
My hosting provider, if applicable, is: Im on-premises
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No, using SSH client only
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.21.0
I tested the site on letsdebug.net and is All Ok
This is site config file
upstream backend {
server localhost:3000;
}
server {
server_name oraj.bjmp.gov.ph;
location / {
proxy_pass http://backend/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/oraj.bjmp.gov.ph/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/oraj.bjmp.gov.ph/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = oraj.bjmp.gov.ph) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name oraj.bjmp.gov.ph;
return 404; # managed by Certbot
}