在Debian系統中,您可以通過以下步驟獲取Nginx SSL證書:
sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx
sudo certbot --nginx
此命令將自動與Let’s Encrypt服務器通信并為您的域名生成證書,并引導您完成Nginx的配置。
sudo certbot renew --dry-run
您可以運行此命令來測試自動更新是否正常工作。certbot會自動為您設置證書的自動更新,您也可以手動運行此命令進行測試。
通過上述步驟,您可以在Debian系統中為Nginx獲取SSL證書,確保您的網站安全加密傳輸。