My domain is: ample.ng
I ran this command (s):
sudo certbot certonly --force-renew -d ample.ng
sudo certbot --nginx -d ample.ng -d www.ample.ng
sudo certbot --nginx [and then selected the domains from the list]
It produced this output:
Domain: ample.ng
Type: unauthorized
Detail: 2a01:7e01::f03c:93ff:fe4b:85b3: Invalid response from http://ample.ng/.well-known/acme-challenge/GSS43hAfQqrYJoRDkWxhshPjFqrwp3USghwtAwLPxyE: 404
Domain: www.ample.ng
Type: unauthorized
Detail: 2a01:7e01::f03c:93ff:fe4b:85b3: Invalid response from http://www.ample.ng/.well-known/acme-challenge/xJK9oG3TgvPLsSgzrDBy5M9T5L6FxIpgcY3bJ_qMRp8: 404
My web server is (include version): NGINX 1.18.0
The operating system my web server runs on is (include version): Ubuntu 22.04.3 LTS
My hosting provider, if applicable, is: Self; all served on Linode
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
NGINX Config file: /etc/nginx/sites-available/ample.ng.conf
server {
# Bind the TCP port 80
#list [::]:80;
# Root directory
root /var/www/html/ample.ng;
# Index page
#index index.php index.html index.htm;
# Server
server_name ample.ng www.ample.ng;
#server_name 139.144.177.88;
# Redirect to https
if ($scheme != "https"){
return 301 https://$host$request_uri;
}
location / {
#index index.php index.html index.htm;
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
index index.php index.html index.htm;
}
# Setup PHP
location ~* \.php$ {
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
# Setup for phpMyAdmin
location ^~ /accessdb/ {
allow 127.0.0.1; #allow localhost
allow 139.144.177.88; #allow server IP
allow 160.152.0.0/16; #allow Smile IP and it's ranges
allow 197.210.0.0/16; #allow MTN IP and it's ranges
deny all; #deny all other sources
# Index page for phpMyAdmin
index index.php index.html index.htm;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
}
# Disable .htaccess from being served
location ~ /\.ht {
deny all;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/ample.ng/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ample.ng/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 = ample.ng) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name ample.ng www.ample.ng;
return 404; # managed by Certbot
}
Lets Encrypt Renewal: /etc/letsencrypt/renewal/ample.ng.conf
# renew_before_expiry = 30 days
version = 2.6.0
archive_dir = /etc/letsencrypt/archive/ample.ng
cert = /etc/letsencrypt/live/ample.ng/cert.pem
privkey = /etc/letsencrypt/live/ample.ng/privkey.pem
chain = /etc/letsencrypt/live/ample.ng/chain.pem
fullchain = /etc/letsencrypt/live/ample.ng/fullchain.pem
# Options used in the renewal process
[renewalparams]
account = 6c377c21762f1e84e3c58391b18918dc
authenticator = nginx
installer = nginx
server = https://acme-v02.api.letsencrypt.org/directory
key_type = ecdsa