I want my beego website to support https.
There are another post Beego and Https. I try that method enable chrome setting chrome://flags/#allow-insecure-localhost or open url with Microsoft Edge. It's still show This site can’t be reached.
Environment
- go version go1.10 windows/amd64
- Beego : 1.10.1
My step is:
- Install googleapis.cer to my windows 10 computer.
- Copy googleapis.cer and googleapis.keyfile to
D:\Go_workspace\src\myproject
-
Edit
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
Run my project with the bee tool command ....\bin\bee run
I get the following message and show message 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.
Does anyone know how to solve this problem? Thank you