若已经获取证书,请参考博客SpringBoot开启HTTPS
网站效果:www.ybear-web.com
方法一(推荐方法二)
获取证书思路以及安装流程
通过certbot获取证书,然后将证书进行jdk处理,放入springboot项目中
centos安装apache服务器
注意端口间的冲突问题,防火墙的开放问题
配置vhost帮助certbot完成认证
在httpd.conf中添加
Include conf/vhost/*.conf
或者运行
echo "Include conf/vhost/*.conf" >>httpd.conf
/etc/httpd/conf/vhost/ybear-web.com.conf
<VirtualHost *:80>
ServerName www.ybear-web.com
ServerAlias ybear-web.com *.ybear-web.com
DocumentRoot "/var/www/ybear-web.com"
ErrorLog "logs/ybear-web.com-error_log"
CustomLog "logs/ybear-web.com-access_log" "%h %l %u %t \"%r\" %>s %b"
<Directory