My domain is:
joshcampana.com
My web server is (include version):
nginx version: nginx/1.14.2
The operating system my web server runs on is (include version):
"Raspbian GNU/Linux 10 (buster)"
** Linux 5.4.79-v7l+ armv7l**
My hosting provider, if applicable, is:
self hosted with static public IP on Raspberry 4
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 0.31.0
After a couple rough starts, I got the following:
root@oerlikon:/var/www/html# certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter 'c' to cancel): joshcampana.com dreadnought-brewing.com dreadnought-welding.com dreadnoughtfabrication.com dreadnoughtmetalworks.com dreadnoughtwelding.com dreadnoughtpc.com hotmessexpresscreations.com weldingshit.com
Cert not yet due for renewalYou have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/joshcampana.com.conf)What would you like to do?
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
Keeping the existing certificate
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/default
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/defaultPlease choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/default
Congratulations! You have successfully enabled https://joshcampana.com,
https://dreadnought-brewing.com, https://dreadnought-welding.com,
https://dreadnoughtfabrication.com, https://dreadnoughtmetalworks.com,
https://dreadnoughtwelding.com, https://dreadnoughtpc.com,
https://hotmessexpresscreations.com, and https://weldingshit.comYou should test your configuration at:
SSL Server Test: joshcampana.com (Powered by Qualys SSL Labs)
SSL Server Test (Powered by Qualys SSL Labs)
SSL Server Test (Powered by Qualys SSL Labs)
SSL Server Test (Powered by Qualys SSL Labs)
SSL Server Test: dreadnoughtmetalworks.com (Powered by Qualys SSL Labs)
SSL Server Test (Powered by Qualys SSL Labs)
SSL Server Test: dreadnoughtpc.com (Powered by Qualys SSL Labs)
SSL Server Test (Powered by Qualys SSL Labs)
SSL Server Test (Powered by Qualys SSL Labs)
IMPORTANT NOTES:
Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/joshcampana.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/joshcampana.com/privkey.pem
Your cert will expire on 2021-03-29. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew all of
your certificates, run "certbot renew"If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: Donate - Let's Encrypt
Donating to EFF: Support EFF's Work on Let's Encrypt | Electronic Frontier Foundation
however nginx -t is not happy
root@oerlikon:/etc/letsencrypt/live# nginx -t
nginx: [emerg] SSL_CTX_load_verify_locations("/etc/letsencrypt/live//fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such fil e or directory:fopen('/etc/letsencrypt/live//fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file error:0B084002:x509 certif icate routines:X509_load_cert_crl_file:system lib)
nginx: configuration file /etc/nginx/nginx.conf test failed
root@oerlikon:/etc/letsencrypt/live# ls -al joshcampana.com/
total 12
drwxr-xr-x 2 root root 4096 Dec 29 18:12 .
drwx------ 3 root root 4096 Dec 29 18:45 ..
-rw-r--r-- 1 root root 692 Dec 29 18:12 README
lrwxrwxrwx 1 root root 39 Dec 29 18:12 cert.pem -> ../../archive/joshcampana.com/cert1.pem
lrwxrwxrwx 1 root root 40 Dec 29 18:12 chain.pem -> ../../archive/joshcampana.com/chain1.pem
lrwxrwxrwx 1 root root 44 Dec 29 18:12 fullchain.pem -> ../../archive/joshcampana.com/fullchain1.pem
lrwxrwxrwx 1 root root 42 Dec 29 18:12 privkey.pem -> ../../archive/joshcampana.com/privkey1.pem
I do a bit of research and chown to www-data. same error. then I remove the sym links and copy the files over, now I get a similar, but different error:
root@oerlikon:/etc/letsencrypt/live# nginx -t
nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/joshcampana.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/joshcampana.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed====================
root@oerlikon:/etc/letsencrypt/live/joshcampana.com# ls -al
total 24
drwxr-xr-x 2 www-data root 4096 Dec 29 19:23 .
drwx------ 4 root root 4096 Dec 29 19:23 ..
-rw-r--r-- 1 www-data root 2110 Dec 29 19:23 cert1.pem
-rw-r--r-- 1 www-data root 1586 Dec 29 19:23 chain1.pem
-rw-r--r-- 1 www-data root 3696 Dec 29 19:23 fullchain1.pem
-rw------- 1 www-data root 1704 Dec 29 19:23 privkey1.pem
Lines that I believe are relevant from nginx/sites-available/default:
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/joshcampana.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/joshcampana.com/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
I just noticed that nginx is looking for fullchain.pem, but the file is called fullchain1.pem. I renamed it to fullchain.pem (so now same as the symlink) and I get the SSL_CTX error again along with the instead of my domain.