Open PhDLeToanThang opened 1 month ago
/usr/bin/certbot renew --quiet --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx'
/usr/bin/certbot renew --quiet --pre-hook 'systemctl stop apache2' --post-hook 'systemctl start apache2'
sudo certbot --apache --agree-tos --redirect--hsts --staple-ocsp --email <> -d
mặc dù đã dùng cả những lệnh cơ bản, đơn giản: sudo certbot renew --dry-run
vẫn hiển thị lỗi:
Trên DNS server cấu hình thêm CNAME record: Hostname value: _acme-challenge Value: _acme-challenge.yourdomain.com
sudo certbot --apache
sudo certbot renew --dry-run
Hãy xoá hoặc comment # các thông tin giả lập FQDN trong file /etc/hosts
Sau đó dùng lại lệnh : ping FQDN để kiểm tra việc test thông tên miền
Cuối cùng là dùng lệnh: sudo certbot --apache --agree-tos --redirect--hsts --staple-ocsp --email <> -d
In Ubuntu 2x LTS server need install Certbot:
sudo snap install certbot --classic
certbot 2.11.0 from Certbot Project (certbot-eff v ) installed
Run certbot to create and associate certificates with current public IP (must have tcp 80 and 443 open to work!)
nginx: certbot --nginx -n -d $LE_DNS_NAME --email $LE_EMAIL --agree-tos --redirect --hsts
Run certbot to create and associate certificates with current public IP (must have tcp 80 and 443 open to work!)
apache: certbot --apache -n -d $LE_DNS_NAME --email $LE_EMAIL --agree-tos --redirect --hsts