Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: sm.app
I ran this command: nginx -t
It produced this output:
nginx: [emerg] open() "/etc/letsencrypt/options-ssl-nginx.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/default:147
nginx: configuration file /etc/nginx/nginx.conf test failed
My web server is (include version): Nginx
The operating system my web server runs on is (include version): Ubuntu 22.04
My hosting provider, if applicable, is: Godaddy
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):
Aapanel
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 2.9.0
So my problem is everytime I create a certificate my domain is still unsecured. If I create a certificate and I introduce it in the Aapanel SSL tab and activate it, I then run certbot certificates and none are shown, however if I then run nginx -t the error I get is
Renewal configuration file /etc/letsencrypt/renewal/sm.app.conf produced an unexpected error: expected /etc/letsencrypt/live/sm.app/cert.pem to be a symlink. Skipping.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following renewal configurations were invalid:
/etc/letsencrypt/renewal/sm.app.conf
Now I created a new certificate and I ran nginx -t and it produced the first result from above.
How do I make it work. I think it has something to do with my DNS configurations.
Hello @ryzeto, welcome to the Let's Encrypt community.
I do not believe there is a DNS issue, the tests I done show it is fine.
Here is a list of issued certificates crt.sh | sm.app, the latest being 2024-03-18.
Be careful - Testing and debugging are best done using the Staging Environment as the Rate Limits are much higher.
ANotWorking
ERROR
sm.app has an A (IPv4) record (213.199.45.131) but a request to this address over port 80 did not succeed. Your web server must have at least one working IPv4 or IPv6 address.
Get "http://sm.app/.well-known/acme-challenge/letsdebug-test": dial tcp 213.199.45.131:80: connect: connection refused
Trace:
@0ms: Making a request to http://sm.app/.well-known/acme-challenge/letsdebug-test (using initial IP 213.199.45.131)
@0ms: Dialing 213.199.45.131
@28ms: Experienced error: dial tcp 213.199.45.131:80: connect: connection refused
IssueFromLetsEncrypt
ERROR
A test authorization for sm.app to the Let's Encrypt staging service has revealed issues that may prevent any certificate for this domain being issued.
213.199.45.131: Fetching http://sm.app/.well-known/acme-challenge/YCgKjVmG66DYCtZjuW4k5aNBvn7_zpPbrSawGbJ2weI: Connection refused
So when I order the Contabo Ubuntu server I got the VPS IP address 213.199.45.131, however the A address on Godaddy was 92.205.27.91. Which one should I use? I changed the A address on Godaddy to the VPS IP address. Shouldn't I have done that?
all -4 commands give me 213.199.45.131 and all -6 commands give me curl: (7) Couldn't connect to server
I also don't have an AAAA record in DNS, only an A record which I change from 92.205.27.91 to the IP address above.
Maybe the ANotWorking error is generated by Nginx because it is not started and I can't restart nor start it:
Also when I run nginx -t I get this:
nginx: [emerg] open() "/etc/letsencrypt/options-ssl-nginx.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/default:147
nginx: configuration file /etc/nginx/nginx.conf test failed
$ nmap -Pn -p80,443 sm.app
Starting Nmap 7.80 ( https://nmap.org ) at 2024-03-18 19:27 UTC
Nmap scan report for sm.app (213.199.45.131)
Host is up (0.16s latency).
rDNS record for 213.199.45.131: vmi1723978.contaboserver.net
PORT STATE SERVICE
80/tcp closed http
443/tcp closed https
Nmap done: 1 IP address (1 host up) scanned in 0.61 seconds
Do you have that file on your system? That is usually only created when using Certbot's nginx plugin successfully. Using any other method won't get that file.
nginx: [emerg] open() "/etc/letsencrypt/options-ssl-nginx.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/default:147
nginx: configuration file /etc/nginx/nginx.conf test failed
Usually with an editor. How did you create it in the first place?
I think you need to learn more about your system before trying to get a cert. You should work on creating a working nginx server using HTTP. Once you have that working then try to get a cert.
There are better places than here to learn about configuring and managing an nginx server. You have a considerable learning curve starting with that.