全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 14678|回复: 5
打印 上一主题 下一主题

ssl配置报错,求帮忙看看什么情况。。。。

[复制链接]
跳转到指定楼层
1#
发表于 2014-11-16 16:44:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    关键是证书在其他的vps  比如安装lnmp的阿里云都可以使用。。是不是我配置问题呢。


下面是报错信息。。。。
  1. root@sfo1:/usr/local/nginx/conf# service nginx restart
  2. Stoping nginx... nginx: [emerg] SSL_CTX_use_PrivateKey_file("/usr/local/nginx/conf/demo.key") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: ANY PRIVATE KEY error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)
  3. failed. Use force-quit
  4. Starting nginx... nginx (pid 7272 7269) already running.
复制代码

3#
 楼主| 发表于 2014-11-16 17:01:29 | 只看该作者

/etc/selinux/目录只有一个。。。。semanage.conf  

  1. # Authors: Jason Tang <[email protected]>
  2. #
  3. # Copyright (C) 2004-2005 Tresys Technology, LLC
  4. #
  5. #  This library is free software; you can redistribute it and/or
  6. #  modify it under the terms of the GNU Lesser General Public
  7. #  License as published by the Free Software Foundation; either
  8. #  version 2.1 of the License, or (at your option) any later version.
  9. #
  10. #  This library is distributed in the hope that it will be useful,
  11. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. #  Lesser General Public License for more details.
  14. #
  15. #  You should have received a copy of the GNU Lesser General Public
  16. #  License along with this library; if not, write to the Free Software
  17. #  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  18. #
  19. # Specify how libsemanage will interact with a SELinux policy manager.
  20. # The four options are:
  21. #
  22. #  "source"     - libsemanage manipulates a source SELinux policy
  23. #  "direct"     - libsemanage will write directly to a module store.
  24. #  /foo/bar     - Write by way of a policy management server, whose
  25. #                 named socket is at /foo/bar.  The path must begin
  26. #                 with a '/'.
  27. #  foo.com:4242 - Establish a TCP connection to a remote policy
  28. #                 management server at foo.com.  If there is a colon
  29. #                 then the remainder is interpreted as a port number;
  30. #                 otherwise default to port 4242.
  31. module-store = direct

  32. # When generating the final linked and expanded policy, by default
  33. # semanage will set the policy version to POLICYDB_VERSION_MAX, as
  34. # given in <sepol/policydb.h>.  Change this setting if a different
  35. # version is necessary.
  36. #policy-version = 19
复制代码
4#
发表于 2014-11-16 17:05:03 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
5#
发表于 2014-11-16 20:30:38 来自手机 | 只看该作者
怀疑是换行符什么的问题
私钥和证书文件都重新建立试试
6#
发表于 2014-11-17 09:00:38 | 只看该作者
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5
openssl req -noout -modulus -in CSR.csr | openssl md5

检查是否一致
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-2 05:42 , Processed in 0.124125 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表