Code Monkey home page Code Monkey logo

Comments (13)

songguangyu avatar songguangyu commented on July 21, 2024

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

from firekylin.

qgy18 avatar qgy18 commented on July 21, 2024

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

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

from firekylin.

songguangyu avatar songguangyu commented on July 21, 2024

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

from firekylin.

Beace avatar Beace commented on July 21, 2024

我在项目根目录下运行

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.

lizheming avatar lizheming commented on July 21, 2024

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

from firekylin.

jiespring avatar jiespring commented on July 21, 2024

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

from firekylin.

jiespring avatar jiespring commented on July 21, 2024

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.

jiespring avatar jiespring commented on July 21, 2024

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

from firekylin.

jiespring avatar jiespring commented on July 21, 2024

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.

jiespring avatar jiespring commented on July 21, 2024
   我是用方法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.

jiespring avatar jiespring commented on July 21, 2024

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

from firekylin.

jiespring avatar jiespring commented on July 21, 2024

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

from firekylin.

opsarno avatar opsarno commented on July 21, 2024

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

from firekylin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.