1.安装acme.sh
curl https://get.acme.sh | sh
2.生成证书(前置)
找到你要配置的项目根目录:
/mnt/php/test
注意:必须要在nginx配置使得你的.well-konwn下的文件可以访问
生成证书命令:
acme.sh --issue -d php.tomcat97.cn -w /mnt/php/test
生成.well-known文件
生成的证书位置: /root/.acme.sh/php.tomcat97.cn/
成功的话会有ca.cer
nginx配置: