Certbot, lets encrypt renewal, python3

To renew certificate the key thing is to open IPv6 and IPv4

CentOS 8:
dnf install certbot
Generate:
certbot-3 certonly --webroot -w /usr/share/zabbix -d zbx.catonrug.net


rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

yum clean all

yum install -y python36 vim centos-release-scl zabbix-server-mysql zabbix-agent

curl -s https://dl.eff.org/certbot-auto -o /usr/bin/certbot-auto && chmod +x /usr/bin/certbot-auto && USE_PYTHON_3=1 certbot-auto --help




USE_PYTHON_3=1 certbot-auto certonly --webroot -w /usr/share/zabbix -d next.catonrug.net


USE_PYTHON_3=1 certbot-auto renew


cd /etc/opt/rh/rh-nginx116/nginx/conf.d

cat << 'EOF' > http.next.catonrug.net.conf
server {
listen next.catonrug.net:80;
server_name next.catonrug.net;
rewrite ^ https://$server_name$request_uri? permanent;
}
EOF


ssl on;
ssl_stapling         on;
ssl_certificate      /etc/letsencrypt/live/next.catonrug.net/fullchain.pem;
ssl_certificate_key  /etc/letsencrypt/live/next.catonrug.net/privkey.pem;


certbot-auto certonly --webroot

00 02 03 * * certbot certonly --force-renewal -a webroot -w /var/www/html -d 5d61057e5e1f.sn.mynetname.net

No comments: