确保您的AWS EC2实例已经安装了Apache Web服务器。
安装Certbot: sudo apt-get install certbot python-certbot-apache
运行Certbot,使用下面的命令: sudo certbot --apache
选择您要为其创建证书的域名并输入您的电子邮件地址。
根据提示完成配置。
将以下代码添加到您的Apache配置文件中:
请将上面的'example.com'更改为您的域名。
重新启动您的Apache服务器: sudo systemctl restart apache2
通过这些步骤,您将能够在AWS EC2上为Apache Web服务器配置SSL。