Apache 服务器在 SSL 配置后未启动

问题描述 投票:0回答:0

我正在运行 EC2 Linux 2 AMI,并且正在按照 本教程 在我的服务器上启用 HTTPS。

但是当我尝试重启 Apache 时,我得到这个错误:

Apr 10 06:56:40 <maskediphere> systemd[1]: Starting The Apache HTTP Server... Apr 10 06:56:40 <maskediphere> httpd[30696]: (98)Address already in use: AH00072: make_sock: could not bind t...:]:80 Apr 10 06:56:40 <maskediphere> httpd[30696]: (98)Address already in use: AH00072: make_sock: could not bind t....0:80 Apr 10 06:56:40 <maskediphere> httpd[30696]: no listening sockets available, shutting down Apr 10 06:56:40 <maskediphere> httpd[30696]: AH00015: Unable to open logs Apr 10 06:56:40 <maskediphere> systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Apr 10 06:56:40 <maskediphere> systemd[1]: Failed to start The Apache HTTP Server. Apr 10 06:56:40 <maskediphere> systemd[1]: Unit httpd.service entered failed state. Apr 10 06:56:40 <maskediphere> systemd[1]: httpd.service failed.

任何人都可以帮助解释为什么会发生这种情况吗?

我遵循了所有步骤,直到我在重新启动 Apache 服务器时遇到问题。我尝试了很多东西,包括:

  1. 确保我的证书被命名为 .pem 文件
  2. 相同的 .pem 文件引用在我的 /etc/httpd/conf.d/ 目录中的 ssl.conf 文件中
  3. 注释掉教程中所述的 SSLCertificateKeyFile

资源:

  1. ssl.conf文件代码
  2. 每个端口上可用的运行服务列表:List of available running services on each port
linux apache ssl amazon-ec2
© www.soinside.com 2019 - 2024. All rights reserved.