Question
Website inaccessible after installing Let's encrypt certificate
Hello,
I set up a droplet and configured nginx to serve a small static website. Everything was working fine until I installed a certificate using the Certbot script.
This is the nginx configuration file for the website:
server {
root /var/www/angelacapillo.com;
index index.php index.html index.htm;
server_name angelacapillo.com www.angelacapillo.com;
location / {
try_files $uri $uri/ =404;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/angelacapillo.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/angelacapillo.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
}
server {
if ($host = www.angelacapillo.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = angelacapillo.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name angelacapillo.com www.angelacapillo.com;
listen 80;
return 404; # managed by Certbot
}
Following their instructions, I tested the certificate here but I get an error: https://www.ssllabs.com/ssltest/analyze.html?d=www.angelacapillo.com
What might be the issue?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×