Install ssl for domain

bởi anhcoo • 2025-10-02 18:21:45 • 👍 0 • 👎 0

Almalinux, apache.

# Cài đặt Certbot
sudo dnf install -y certbot python3-certbot-apache

# Tạo SSL certificate
sudo certbot --apache -d occ.asia -d www.occ.asia

# Tự động gia hạn
sudo crontab -l | { cat; echo "0 12 * * * /usr/bin/certbot renew --quiet"; } | sudo crontab -

Bình luận (4)

anhcoo : # Test SSL
echo "=== SSL Test ==="
openssl s_client -connect occ.asia:443 -servername occ.asia < /dev/null 2>/dev/null | openssl x509 -noout -dates

# Hoặc dùng online tool
echo "Check: https://www.ssllabs.com/ssltest/analyze.html?d=occ.asia"

anhcoo : add ssl for sub:
sudo certbot --apache -d occ.asia -d www.occ.asia -d t.occ.asia --expand --email duccanhcfd@gmail.com --agree-tos

anhcoo : Install new:
# Cài mới hoàn toàn
sudo certbot --apache -d occ.asia -d www.occ.asia --email duccanhcfd@gmail.com --agree-tos --non-interactive

anhcoo : Check

sudo certbot certificates

Đăng nhập để bình luận.