Letsencrypt certbot-nginx插件.它是如何工作的?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Letsencrypt certbot-nginx插件.它是如何工作的?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1516字,纯文字阅读大概需要3分钟。
内容图文
![Letsencrypt certbot-nginx插件.它是如何工作的?](/upload/InfoBanner/zyjiaocheng/947/2ea98a8abbda41a282651553915965bd.jpg)
我成功使用certbot-nginx插件.
我知道it是开源的,托管在github上.
但是我没有足够的技能来分析此代码.
例如:
我有几个由nginx代理的内部站点.所有virtualhost配置均具有以下匿名访问限制:
allow 192.168.1.0/24;
allow 192.168.0.0/24;
allow 10.88.0.0/16;
allow 127.0.0.1;
# gate1.example.com
allow X.X.X.X;
# gate2.example.com
allow X.X.X.X;
# other gate's
# .......
deny all;
此访问限制禁止letencrypt服务器以及所有其他未定义的主机.
但是certbot更新–nginx正常执行证书更新.
它是如何工作的 ?
是否安全?
解决方法:
我本人也在问同样的问题,所以我做了一些挖掘,这是我发现的:
Certbot主要使用80或443端口进行质询(http-01和tls-sni-01)以验证域所有权,如certbot docs中所述:
Under the hood, plugins use one of several ACME protocol challenges to
prove you control a domain. The options are http-01 (which uses port
80), tls-sni-01 (port 443) and dns-01 (requiring configuration of a
DNS server on port 53, though that’s often not the same machine as
your webserver). A few plugins support more than one challenge type,
in which case you can choose one with –preferred-challenges.
查看http-01挑战的certbot_nginx plugin implementation,我们可以看到插件编辑了nginx配置,以包括用于执行挑战的其他服务器块:
def _make_server_block(self, achall):
"""Creates a server block for a challenge.
:param achall: Annotated HTTP-01 challenge
:type achall:
:class:`certbot.achallenges.KeyAuthorizationAnnotatedChallenge`
:param list addrs: addresses of challenged domain
:class:`list` of type :class:`~nginx.obj.Addr`
:returns: server block for the challenge host
:rtype: list
"""
内容总结
以上是互联网集市为您收集整理的Letsencrypt certbot-nginx插件.它是如何工作的?全部内容,希望文章能够帮你解决Letsencrypt certbot-nginx插件.它是如何工作的?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。