Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持 HTTP/2 #31

Open
welefen opened this issue Mar 16, 2016 · 13 comments
Open

支持 HTTP/2 #31

welefen opened this issue Mar 16, 2016 · 13 comments
Assignees

Comments

@welefen
Copy link
Contributor

welefen commented Mar 16, 2016

增加支持 HTTP/2 的安装脚本

@songguangyu
Copy link
Collaborator

已增加 HTTP/2 自动安装脚本 项目根目录下 运行 sh https.sh example.com www.example.com 来自动部署https,小伙伴们可以反馈一下问题,进行完善

@qgy18
Copy link
Contributor

qgy18 commented Mar 23, 2016

貌似 CentOS 的 openssl.cnf 默认在这里:

/usr/local/openssl/ssl/openssl.cnf

@songguangyu
Copy link
Collaborator

在自动化脚本里 我们也考虑到了 这一点 并不是所有得机器都是Linux 。/etc/ssl/openssl.cnf 路径不存在的话 会让用户手动输入openssl.cnf的路径

@Beace
Copy link

Beace commented Sep 10, 2016

我在项目根目录下运行

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,试问证书需要重装吗?

@lizheming
Copy link
Collaborator

@Beace 你这可能是 nginx.conf 文件中证书文件地址替换失败了,你先手动修改一下看看是否能够成功。

@jiespring
Copy link

希望吧设置https的方法写进安装教程!

@jiespring
Copy link

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

@jiespring
Copy link

执行了https.sh脚本,然后修改了nginx.conf配置文件,再nginx -t查错,最后出现这个。

@jiespring
Copy link

jiespring commented Apr 30, 2017

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重新安装。现在全弄好了。

@jiespring
Copy link

   我是用方法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可以了。

@jiespring
Copy link

jiespring commented May 9, 2017

@golmic 你看看nginx配置文件里关于ssl证书的路径。

@jiespring
Copy link

@golmic 你新建一个试试呗,我也不记得自己是否遇到过你这种情况,不行就换个方法。

@opsarno
Copy link

opsarno commented Dec 21, 2017

这个是 nginx端做支持,跟博客系统没有关系吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@welefen @qgy18 @lizheming @songguangyu @opsarno @jiespring @Beace and others