1,必须去服务商购买一个ssl证书。
2,以我想的是这个域名的8080端口当前端,8070当后端,
3,前端配置简单直接去下载nginx证书把里面的key和证书粘到对应位置即可(用宝塔简单)
4.springboot后端服务(下载Tomcat证书)
按照这个方法 https://blog.csdn.net/baidu_37302589/article/details/100692957 配置
端口配置成我需要的后端服务端口
server:
port: 8070
ssl:
key-store: classpath:xxxxx.pfx
key-store-type: PKCS12
key-store-password: password.txt里的内容
@Configuration
public class TomcatConfig {
@Bean
TomcatEmbeddedServletContainerFactory tomcatEmbeddedServletContainerFactory