Hi guys! I’m quite new to everything web.
I’m trying to get a cert for my website, and i followed this tutorial.
However, i’m stuck after obtaining a cert (using the command sudo certbot certonly -a webroot --webroot-path=/var/www/demo -d yourdomain.here -d www.yourdomain.here
) and adding a ssl block in /etc/nginx/sites-enabled/default.conf
.
And my website currently shows this:
Any help would be greatly appreciated.
My domain is: lucidkodo.pw
I ran this command: cat /etc/nginx/sites-enabled/default.conf
It produced this output:
server {
listen 80;
server_name lucidkodo.pw www.lucidkodo.pw;
root /var/www/lucidkodo.pw/html;
location / {
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}
}
server {
listen 443 ssl http2 default_server;
server_name lucidkodo.pw www.lucidkodo.pw;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_prefer_server_ciphers On;
ssl_certificate /etc/letsencrypt/live/lucidkodo.pw-0001/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/lucidkodo.pw-0001/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/lucidkodo.pw-0001/chain.pem;
ssl_session_cache shared:SSL:128m;
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains";
ssl_stapling on;
ssl_stapling_verify on;
# Your favorite resolver may be used instead of the Google one below
# resolver 8.8.8.8;
root /var/www/lucidkodo.pw/html;
index index.html;
location '/.well-known/acme-challenge' {
root /var/www/lucidkodo.pw/challenges;
}
}
Summary
This text will be hidden
My web server is (include version): nginx 1.14.0
The operating system my web server runs on is (include version): Ubuntu 18.04
My hosting provider, if applicable, is: DigitalOcean
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