Apache-2.2
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.
你錯過了一點
httpd.service 的作業失敗,因為控制程序以錯誤程式碼退出。有關詳細資訊,請參閱“systemctl status httpd.service”和“ journalctl -xe ”。
這可能包含您想要的資訊,您還應該查看錯誤日誌文件。