hlcX's Blog
my note!
Toggle navigation
hlcX's Blog
2.学习
4.群晖
5.CentOS7
6.rasperryPI
linux-mint
关于
归档
标签
设置Leanote走SSL(https)
ssl
https
leanote
2019-03-24 13:08:17
61
0
0
hlcx
ssl
https
leanote
> 自架设了leanote,其中邮箱配置一直不成功,去官群问了一下,只得到了一个莫明的提示:“和ssl”有关。也没说清是邮箱ssl还是leanote网站https需要的那个ssl。 好吧得不到更详细的答案那就自己搞 # 让leanote走https 1. 去申请个证书(略) 2. 修改app.conf ``` http.ssl = false 改为true #添加以下两行,path改成你存放证书的地址 http.sslcert=/path/domain.crt http.sslkey=/path/domain.key ``` 3. 重启leanote # 注意 - 如果从阿里云下载来的for nginx的证书文是.pem和.key,那么上面添加的要改成下面这样 ``` http.sslcert=/path/domain.pem http.sslkey=/path/domain.key ``` # 注意2(这步我没用到) - 如果上面这样设置还不行,那就再添加下面 - 添加文件 leanote/app/init.go ``` #其中8889改成你的app.conf中一样的端口 httpRedirectServer := &http.Server{Addr: ":8899", Handler: http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, fmt.Sprintf("https://%s%s", r.Host, r.RequestURI), http.StatusMovedPermanently) })} go httpRedirectServer.ListenAndServe() ``` # 失望了 - 邮箱问题依旧 - 今天2022.11.18,邮件无意见解决了,具体看[这里](https://13ua.com:44490/blog/post/hlcx/a494cc3520eb)吧
上一篇:
在docker容器外执行其内部的某个脚本
下一篇:
关于npm -v提示命令不存在问题解决
0
赞
61 人读过
新浪微博
微信
腾讯微博
QQ空间
人人网
提交评论
立即登录
, 发表评论.
没有帐号?
立即注册
0
条评论
More...
文档导航
没有帐号? 立即注册