mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #51] 关于非80端口下,Let's Encrypt功能的补充建议 #1373
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#1373
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AC-0308 on GitHub (Dec 30, 2022).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/51
关于非80端口下,Let's Encrypt功能的补充建议
使用场景
80、443端口被封nginx-ui作内网服务的反向代理到公网遇到问题
在
80端口被封的情况下,nginx-ui默认提供的证书申请方案无法实现(无法从外网访问到/.well-known/acme-challenge)建议方案
以下为建议方案
1、参考Lego
可以参考Lego,提供基于DNS服务商的证书申请方案(
Lego已经提供了很多的DNS服务商API调用)2、使用基于DNS的text记录解析
通过在DNS解析里添加一条text记录来证明自己对该域名的拥有权,参考Letsencrypt通过DNS TXT记录来验证域名有效性
以上
另
本人是前端开发,如果前端需要支持可以联系我
@0xJacky commented on GitHub (Jan 1, 2023):
简单看了一下,lego 的话 dns challenge 可能得重新写一遍,他现在用的环境变量来传递的 credentials。
@Hintay commented on GitHub (Jan 7, 2023):
我们研究了一下,因为涉及到更新 DNS Text 记录,而每家 DNS 服务商管理方式均有不同,因此 DNS Challenge 没有能简单实现自动续签的方案。不过,我们可以试着增加手动使用 DNS Challenge 签发或续期的功能。
如果您仅是 80 端口无法访问,可以在 Nginx UI 中修改 HTTP Challenge 的端口,并此端口映射至公网。
@AC-0308 commented on GitHub (Jan 7, 2023):
确实,如果能够指定challenge的端口也能解决这个问题,就不用再开发额外的内容,是个很不错的主意。当时我也是想研究脚本怎么指定端口来着,但是没有成功,看大佬们能不能解决哇。
@Hintay commented on GitHub (Jan 7, 2023):
您可以在
偏好设置中修改HTTP Challenge 监听端口。@0xJacky commented on GitHub (Jan 7, 2023):
但还是需要有能访问80端口的公网ip来反向代理这个端口的
@Hintay commented on GitHub (Jan 7, 2023):
根据 ACME 规范,HTTP Challenge 必须为 80 或 443 端口。因此如 Jacky 所说,您的公网 IP 需要暴露这两个端口,并反代至设置中设定的
HTTP Challenge 监听端口。详情请参阅:https://letsencrypt.org/docs/challenge-types/#http-01-challenge中文版为:https://letsencrypt.org/zh-cn/docs/challenge-types/#http-01-%E9%AA%8C%E8%AF%81
@0xJacky commented on GitHub (Apr 12, 2023):
已验证方案一的可能性,在
5b8fae1已加入 DNS Challenge 方案,此项更新将会在 v1.8 正式版发布。@AC-0308 commented on GitHub (Apr 12, 2023):
感谢作者的辛勤付出