Apache 在 SSL 之后启动失败

Apache 在 SSL 之后启动失败

安装 SSL 证书(使用 ssl.conf)后,apache 不会重新启动,并且仅在日志中给出以下警告:

[Wed Aug 14 14:16:46 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Aug 14 14:16:46 2013] [notice] SSL FIPS mode disabled

使用 Cent OS 6.4

完整日志(带有日志级别调试):

[Thu Aug 15 12:54:00 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Aug 15 12:54:00 2013] [info] Init: Seeding PRNG with 256 bytes of entropy
[Thu Aug 15 12:54:00 2013] [notice] SSL FIPS mode disabled
[Thu Aug 15 12:54:00 2013] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Thu Aug 15 12:54:00 2013] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Thu Aug 15 12:54:00 2013] [info] Init: Initializing (virtual) servers for SSL

STRACES 在 paste bin 上的结果如下:

http://pastebin.com/KE4Pe5vF

答案1

请执行以下操作来修复此问题 -

#hostname

这应该提供您的主机名。

编辑 /etc/hosts 文件并添加以下行

your_ip_address your_hostname

重启 Apache

答案2

只是一个简短的反馈:检查您的服务器证书。我已重新生成密钥,现在它可以正常工作了。

  1. 生成私钥
openssl genrsa -des3 -out 服务器.key 1024
  1. 生成 CSR(证书签名请求)
openssl req -new -key server.key -out server.csr
  1. 从密钥中删除密码
cp 服务器.key 服务器.key.org
openssl rsa -in 服务器.key.org -out 服务器.key
  1. 生成自签名证书
openssl x509 -req -days 1365 -in 服务器.csr -signkey 服务器.key -out 服务器.crt
  1. 安装私钥和证书
cp 服务器.crt /etc/pki/tls/certs/ssl.crt
cp 服务器.key /etc/pki/tls/private/ssl.key

现在它应该可以工作了。

相关内容