在Debian上配置Apache的SSL证书,可参考以下步骤:
sudo apt update,sudo apt install apache2,sudo a2enmod ssl,sudo apt install certbot python3 -certbot -apache。sudo certbot certonly --agree -tos --email admin@example.com --webroot -w /var/lib/letsencrypt/ -d example.com -d www.example.com,需将域名替换为实际域名。/etc/apache2/sites - available/目录下,添加或修改<VirtualHost *:443>部分,指定证书文件路径,如SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem等。sudo a2ensite命令启用配置文件,然后执行sudo systemctl reload apache2使配置生效。