好久好久没写日志了
今天看下beego配置https
我是在阿里云上买的服务器
先到阿里云搞一下https证书,免费的
申请完之后要下载一下证书
选择下载Apache的吧
Apache的才是crt文件和key文件
beego的conf文件夹
里面是app.conf配置文件
修改一下配置文件
EnableDocs = true
EnableHTTPS=true
EnableHttpTLS = true
HttpsPort = 443
HTTPSCertFile = "conf/xxx.crt"
HTTPSKeyFile = "conf/xxx.key"
然后我们重启一下服务
bee run
访问https://xxx.com
成功啦