Hi guys,
I decided to migrate my friend's WordPress website from the docker containers to the LEMP stack and couldn't obtain a certificate due to errors with DNS A/AAAA record(s) however these records have been already configured on a domain site long ago. Uncommenting of the
listen [::]:443 ssl http2 ipv6only=on;
listen 443 ssl http2; # managed by Certbot
doesn't help as well
Could you pls help by any chance?
Nginx config:
server {
root /var/www/catch-22;
index index.php index.html index.htm index.nginx-debian.html;
server_name catch-22.co.nz www.catch-22.co.nz;
# listen [::]:443 ssl http2 ipv6only=on;
# listen 443 ssl http2; # managed by Certbot
client_max_body_size 500M;
location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_intercept_errors on;
# include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_connect_timeout 300s;
fastcgi_read_timeout 300s;
fastcgi_send_timeout 300s;
}
location ~ /\.ht {
deny all;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
location ~ ^/\.user\.ini {
deny all;
}
# ssl_certificate /etc/letsencrypt/live/catch-22.co.nz/fullchain.pem; # managed by Certbot
# ssl_certificate_key /etc/letsencrypt/live/catch-22.co.nz/privkey.pem; # managed by Certbot
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
The domain is: catch-22.co.nz
I ran this command: sudo certbot --nginx -d catch-22.co.nz -d www.catch-22.co.nz
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for catch-22.co.nz
http-01 challenge for www.catch-22.co.nz
Waiting for verification...
Challenge failed for domain catch-22.co.nz
Challenge failed for domain www.catch-22.co.nz
http-01 challenge for catch-22.co.nz
http-01 challenge for www.catch-22.co.nz
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: catch-22.co.nz
Type: connection
Detail: 130.162.231.184: Fetching
http://catch-22.co.nz/.well-known/acme-challenge/IYaAFXYgylxTaNyb1jeUzJ5CFw4rcRxL97D-XTN5Kog:
Error getting validation data
Domain: www.catch-22.co.nz
Type: connection
Detail: 130.162.231.184: Fetching
http://www.catch-22.co.nz/.well-known/acme-challenge/7U0k2jVws7YQtaO2ffoO36csqJYAbl8yKmrjoXF3FZ4:
Error getting validation data
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
My web server is (include version): nginx/1.21.6
The operating system my web server runs on is (include version): Ubuntu 20.04
My hosting provider, if applicable, is: https://myhost.nz
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
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.12.0