centos7部署Openresty,使用certbot-nginx进行https支持,


Centos7 下使用 certbot-Nginx插件,为Openresty提供Https证书支持

官方安装方案

直接根据官方安装,会报错:

certbot error ‘pyOpenSSL’ module missing required functionality. Try upgrading to v0.14 or newer

仔细看,是因为centos7官方epel库的pyOpenSSL仓库太旧,更新的话除了自己手动下载rpm包,其实可以采用pip安装python依赖包,我用pip进行更新的。

之后继续运行,发现报错:

cant find nginx error

certbot-nginx目前是根据nginx做的适配,openresty虽然是超集,但是版本号等信息基本已经改过,所以certbot-nginx的验证流程需要更改小部分,适应openresty的更新

因此修改方案为:
版本号验证这里需要把certbot里面提取版本号正则从nginx改为openresty,配置文件测试的地方需要更改默认web_root,改为openresty对应的目录即可。

其他问题

另外,certbot还有一些py库版本适配的问题,例如rand()问题等,官方已经给了最新的修改,对应issue进行代码更新就行了。certbot-issue-5123

相关内容

    暂无相关文章