【发布时间】:2017-11-10 12:29:31
【问题描述】:
我们今天获得了 SSL 证书,我正在尝试将 SSL 证书添加到域中,以便我们可以通过 https 访问该网站,但是我遇到了问题。
我们有一个在 Windows 上运行的 apache 服务器。
该配置适用于端口 80,但是当我将端口 443 添加到配置中时,一切都停止工作了。
我在启动 apache 时遇到的错误是
The requested operation has failed.
我添加了以下行
Listen 443
线下:
Listen 80
我添加了以下 VirtualHost 配置
<VirtualHost _default_:443>
DocumentRoot "c:/path/to/website"
ServerName example.com
ServerAlias example.com www.example.com
SSLEngine on
SSLCertificateFile "c:/path/to/cert/cert.crt"
SSLCertificateKeyFile "c:/path/to/cert/key.key"
SSLCACertificateFile "c:/path/to/cert/bundle.ca-bundle"
</VirtualHost>
但是,每当我在添加此内容后启动 apache 服务器时,它都不会启动并且出现错误。
我已经注释掉了一些代码,并将问题缩小到Listen 443 行。添加这个时有什么我没有考虑到的吗?
这些是 error.log 中的最后 3 行
[Thu Jun 08 18:15:31.909142 2017] [mpm_winnt:notice] [pid 66428:tid 712] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Thu Jun 08 18:15:47.209776 2017] [mpm_winnt:notice] [pid 67332:tid 620] AH00364: Child: All worker threads have exited.
[Thu Jun 08 18:15:48.067933 2017] [mpm_winnt:notice] [pid 66428:tid 712] AH00430: Parent: Child process exited successfully.
编辑
这是运行httpd.exe -e debug的响应
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address [::]:443
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:443
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
【问题讨论】:
-
你在启动 apache 时遇到什么错误?
-
我相信是“操作无法完成”...我会检查一下我刚收拾东西回家所以会检查我什么时候回家(没想到会快回复!!)
-
没问题,请用错误信息更新问题
-
我刚刚更新了问题
-
你能检查一下apache错误日志吗?