我想让我的beego网站支持https。
还有一个帖子Beego 和 Https。我尝试使用该方法启用 chrome 设置chrome://flags/#allow-insecure-localhost或使用 Microsoft Edge 打开 url。还是显示This site can't be reached。
环境
go 版本 go1.10 windows/amd64
条款:1.10.1
我的步骤是:
将 googleapis.cer 安装到我的 Windows 10 计算机上。
将 googleapis.cer 和 googleapis.keyfile 复制到D:\Go_workspace\src\myproject
编辑D:\Go_workspace\src\myproject\conf\app.conf
appname = myproject
runmode = prod
[dev]
httpaddr = "127.0.0.1"
HTTPPort = 9100
[prod]
httpaddr = "127.0.0.1"
HTTPSPort = 9099
httpsaddr = "127.0.0.1"
EnableHTTPS = true
EnableHttpTLS = true
HTTPSCertFile = "googleapis.cer"
HTTPSKeyFile = "googleapis.key"
[test]
HTTPSPort = 9099
使用蜜蜂工具命令运行我的项目....\bin\bee run
我收到以下消息并显示消息This site can't be reached when I go to URL https://127.0.0.1:9099 :
2018/11/09 10:07:56.251 [I] [asm_amd64.s:2361] http server Running on http://127.0.0.1:8080
2018/11/09 10:07:56.253 [I] [asm_amd64.s:2361] https server Running on https://127.0.0.1:9099
2018/11/09 10:07:56.293 [C] [asm_amd64.s:2361] ListenAndServeTLS: listen tcp 127.0.0.1:9099: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
有谁知道如何解决这个问题?谢谢
料青山看我应如是
相关分类