Amazon EC2 Centos SSL 安装错误

Amazon EC2 Centos SSL 安装错误

Apache 版本:2.4.6,操作系统:Centos

我正在尝试在我的 Amazon EC2 CentOS 上安装 SSL,但是在更改 httpd 配置文件后重新启动 httpd 时出现错误。

httpd 配置:

#craveinn
<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/crave.demo.crt
    SSLCertificateKeyFile /etc/ssl/certs/crave.demo.key
    DocumentRoot /var/www/craveinn.com/public_html
    ServerName craveinn.com
    ServerAlias www.craveinn.com
</VirtualHost>

尝试重新启动 httpd

[centos@ip-xxx-xx-xx-xxx conf]$ sudo service httpd restart
Redirecting to /bin/systemctl restart  httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

检查错误

[centos@ip-xxx-xx-xx-xxx conf]$ systemctl status -l httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-11-24 18:19:00 UTC; 4s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 30035 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 15440 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 30034 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 30034 (code=exited, status=1/FAILURE)

Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal systemd[1]: Starting The Apache HTTP Server...
Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal kill[30035]: kill: cannot find process ""
Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal systemd[1]: Failed to start The Apache HTTP Server.
Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal systemd[1]: Unit httpd.service entered failed state.
Nov 24 18:19:00 ip-xxx-xx-xx-xxx.eu-central-1.compute.internal systemd[1]: httpd.service failed.

答案1

你错过了一点

httpd.service 的作业失败,因为控制进程以错误代码退出。请参阅“systemctl status httpd.service”和“journalctl-xe”以了解详细信息。

这可能包含您想要的信息,您还应该查看错误日志文件。

相关内容