sudo su
wget https://dl.eff.org/certbot-auto -O ~/certbot-auto
cd
chmod +x certbot-auto
./certbot-auto certonly -a webroot -w /var/www/html -d 5d61050b753b.sn.mynetname.net
Full config file for /etc/nginx/sites-available/5d61050b753b.sn.mynetname.net:
server {
server_name 5d61050b753b.sn.mynetname.net;
listen 80;
root /var/www/html;
index index.php index.html index.htm;
server_name _;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
server {
server_name 5d61050b753b.sn.mynetname.net;
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/live/5d61050b753b.sn.mynetname.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/5d61050b753b.sn.mynetname.net/privkey.pem;
root /var/www/html;
index index.php index.html index.htm;
server_name _;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}