./acmetool.sh acme-menu
--------------------------------------------------------
SSL Management
--------------------------------------------------------
1). acemtool.sh install
2). acmetool.sh update
3). acmetool.sh setup
4). Issue SSL Management
5). Renew SSL Management
6). Reissue SSL Management
7). Renew All Staging /Test Certs
8). Renew ALL Live Certs
9). Renew All Live Certs HTTPS Default
10). Exit
--------------------------------------------------------
Enter option [ 1 - 10 ]
--------------------------------------------------------
Are you using certbot?I'm running Nginx with HTTP/2
#!/bin/bash
if [ ! -n "$1" ]; then
echo "letsencrypt requires a fully qualified domain name (eg. example.com or example.com,www.example.com)"
exit 1;
fi
/opt/certbot/certbot-auto certonly --webroot --agree-tos -w /srv/www/letsencrypt/ -d $1 --email simon@example.com
#!/bin/sh
# run letsencrypt certbot weekly to renew expiring certificates
/opt/certbot/certbot-auto renew --non-interactive --webroot --agree-tos -w /srv/www/letsencrypt/ --email simon@example.com
listen 443 ssl http2;
add_header Strict-Transport-Security "max-age=31536000" always;
location ~ /.well-known {
root /srv/www/letsencrypt;
allow all;
try_files $uri $uri/ =404;
}
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
# main server: https://www.somersoft.com
# comment out this entire server block when installing cert for the first time
# certbot can use port 80 but SSL cert won't exist yet, so can't use 443
server {
server_name www.somersoft.com;
access_log /var/log/nginx/somersoft.com/somersoft.access.log;
error_log /var/log/nginx/somersoft.com/somersoft.error.log;
root /srv/www/somersoft.com;
include snippets/ssl.conf; # HTTPS IPv4 (SNI)
listen [2400:8901:e001:3d::103]:443 ssl http2; # HTTPS IPv6
include ssl/somersoft.com.conf;
include snippets/letsencrypt.conf;
include snippets/xenforo.conf;
}
# redirect naked domain https://somersoft.com => https://www.somersoft.com
# comment out this server block when installing cert for the first time
# certbot will use port 80 but SSL cert won't exist yet, so can't use 443
server {
server_name somersoft.com;
access_log /var/log/nginx/somersoft.com/somersoft-redirect.access.log;
error_log /var/log/nginx/somersoft.com/somersoft-redirect.error.log;
include snippets/ssl.conf; # HTTPS IPv4 (SNI)
listen [2400:8901:e001:3d::103]:443 ssl http2; # HTTPS IPv6
include ssl/somersoft.com.conf;
include snippets/letsencrypt.conf;
return 301 https://www.somersoft.com$request_uri;
}
# redirect naked and www domains from http to https ...
# http://somersoft.com => https://www.somersoft.com
# http://www.somersoft.com => https://www.somersoft.com
# when installing SSL certs for the first time, letssencrypt will actually use this server block to connect on port 80!
server {
server_name www.somersoft.com somersoft.com;
access_log /var/log/nginx/somersoft.com/somersoft-redirect.access.log;
error_log /var/log/nginx/somersoft.com/somersoft-redirect.error.log;
listen 80;
listen [2400:8901:e001:3d::103]:80; # IPv6
include snippets/letsencrypt.conf;
return 301 https://www.somersoft.com$request_uri;
}
ssl_certificate /etc/letsencrypt/live/somersoft.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/somersoft.com/privkey.pem;
$ ~/tools/letsencrypt.sh somersoft.com,www.somersoft.com
location / {
try_files $uri $uri/ /index.php?$uri&$args;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
include snippets/fastcgi.conf;
Tell ME about that... after 3 hours of working trying to get an Apache2/Webmin to recognize SSL for the default vhost I finally said "THWI" and only installed the certificate on the WebMin end of the system.
We use essential cookies to make this site work, and optional cookies to enhance your experience.