Comments (13)
已增加 HTTP/2 自动安装脚本 项目根目录下 运行 sh https.sh example.com www.example.com 来自动部署https,小伙伴们可以反馈一下问题,进行完善
from firekylin.
貌似 CentOS 的 openssl.cnf
默认在这里:
/usr/local/openssl/ssl/openssl.cnf
from firekylin.
在自动化脚本里 我们也考虑到了 这一点 并不是所有得机器都是Linux 。/etc/ssl/openssl.cnf 路径不存在的话 会让用户手动输入openssl.cnf的路径
from firekylin.
我在项目根目录下运行
sh https.sh beacelee.com www.beacelee.com
后,成功了。但是,再次启动服务nginx,报这样的错:
nginx: [emerg] BIO_new_file("/etc/nginx/%path/ssl/chained.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/%path/ssl/chained.pem','r')
是因为我事先没有安装证书吗,之前在apache的环境下有装,后来切换到nginx,试问证书需要重装吗?
from firekylin.
@Beace 你这可能是 nginx.conf 文件中证书文件地址替换失败了,你先手动修改一下看看是否能够成功。
from firekylin.
希望吧设置https的方法写进安装教程!
from firekylin.
nginx: [emerg] SSL_CTX_use_PrivateKey_file("/root/wwj/firekylin/ssl/domain.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch) nginx: configuration file /etc/nginx/nginx.conf test failed
from firekylin.
执行了https.sh脚本,然后修改了nginx.conf配置文件,再nginx -t查错,最后出现这个。
from firekylin.
ssl证书:
方法A:
第一步https://github.com/xdtianyu/scripts/tree/master/lets-encrypt
第二步openssl dhparam -out /etc/ssl/certs/dhparams.pem 2048
第三步,修改博客根目录下的nginx.conf,注意路径需要改成1、2步生成的文件路径。
nginx重启不了的话,我重新安装nginx才弄好。
方法B:当然,我想用你们脚本的方法也可能成功,但是我nginx -t调好后,之前的restart出错情况还在。
最后才想到吧nginx重新安装。现在全弄好了。
from firekylin.
我是用方法A生成了三个文件fullchain.pem( Nginx所需要ssl_certificate文件)privkey.pem(Nginx所需ssl_certificate_key),
第2步是生成ssl_dhparam,
在博客根目录下修改nginx.conf,把第一段的server前加#,把https server下一行server开始全部#删掉,把3个文件的路径改成自己的路径,完成后,nginx -t检查错误,错误排查完后,我的nginx restart出现了错误,我就把niginx卸载重装,现在restart没问题了,
再pm2加载pm2.json,打开网站,https可以了。
from firekylin.
@golmic 你看看nginx配置文件里关于ssl证书的路径。
from firekylin.
@golmic 你新建一个试试呗,我也不记得自己是否遇到过你这种情况,不行就换个方法。
from firekylin.
这个是 nginx端做支持,跟博客系统没有关系吧。
from firekylin.
Related Issues (20)
- 目前还不支持Mysql 8.X HOT 1
- sitemap 问题 HOT 9
- 张博博客
- Gitalk评论集成认证更新方式 HOT 2
- 代码块不能按指定的格式高亮 HOT 1
- 请问一下这个项目可以部署到GitHub Pages上吗 HOT 7
- 如何在公安部备案号前加上备案图标 HOT 4
- 如何获取网站的所有文章的地址呢? HOT 2
- 请问哪里有更多的主题列表,或者有什么投稿渠道吗 HOT 5
- 分享一个自己写的主题 HOT 3
- TypeError: Cannot read property 'children' of undefined HOT 2
- RSS订阅路径错误导致404 HOT 4
- 文本编辑器能支持更多的输入形式吗 HOT 2
- [BUG]标题包含 markdown 代码语法时 TOC 链接错误
- 提一个可能不算bug的BUg HOT 2
- 主题管理,颜色设置,透明度调节条无法移动 HOT 1
- Hi buddy
- post cate lost.
- 请问现在适配vercel了么? HOT 2
- 主题编辑功能不可用 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firekylin.