после прохождения этого руководства:https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-apache-for-centos-7
Я пробовал все, что мог, чтобы исправить ошибку. Я выполнил шаги, чтобы убедиться, что правильно ввел данные.
Я дошел до этого момента:
sudo apachectl restart
Я все время получаю эту ошибку.
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Я попытался перезапустить службу httpd, но получил ту же ошибку
после выполнения systemctl status httpd.service
Я получил :
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Thu 2015-04-30 13:54:04 EDT; 2min 7s ago
Process: 30331 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 29403 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Process: 30330 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 30330 (code=exited, status=1/FAILURE)
для второй команды journalctl -xn
Я получил :
-- Logs begin at Thu 2015-04-30 07:01:51 EDT, end at Thu 2015-04-30 13:57:37 EDT. --
Apr 30 13:54:04 user sudo[30325]: user : TTY=pts/0 ; PWD=/home/user; USER=root ; COMMAND=/sbin/apachectl restart
Apr 30 13:54:04 user systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Apr 30 13:54:04 user httpd[30330]: AH00526: Syntax error on line 100 of /etc/httpd/conf.d/ssl.conf:
Apr 30 13:54:04 user httpd[30330]: SSLCertificateFile: file '/etc/httpd/ssl/apache.srt' does not exist or is empty
Apr 30 13:54:04 user systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 30 13:54:04 user kill[30331]: kill: cannot find process ""
Apr 30 13:54:04 user systemd[1]: httpd.service: control process exited, code=exited status=1
Apr 30 13:54:04 user systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Apr 30 13:54:04 user systemd[1]: Unit httpd.service entered failed state.
Apr 30 13:57:37 user sudo[30336]: user: TTY=pts/0 ; PWD=/home/user; USER=root ; COMMAND=/bin/journalctl -xn
-- Logs begin at Thu 2015-04-30 07:01:51 EDT, end at Thu 2015-04-30 13:57:37 EDT. --
Apr 30 13:54:04 user sudo[30325]: user: TTY=pts/0 ; PWD=/home/user; USER=root ; COMMAND=/sbin/apachectl restart
Apr 30 13:54:04 user systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Apr 30 13:54:04 user httpd[30330]: AH00526: Syntax error on line 100 of /etc/httpd/conf.d/ssl.conf:
Apr 30 13:54:04 user httpd[30330]: SSLCertificateFile: file '/etc/httpd/ssl/apache.srt' does not exist or is empty
Apr 30 13:54:04 user systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 30 13:54:04 user kill[30331]: kill: cannot find process ""
Apr 30 13:54:04 user systemd[1]: httpd.service: control process exited, code=exited status=1
Apr 30 13:54:04 user systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Apr 30 13:54:04 user systemd[1]: Unit httpd.service entered failed state.
Apr 30 13:57:37 user sudo[30336]: user: TTY=pts/0 ; PWD=/home/user; USER=root ; COMMAND=/bin/journalctl -xn
...skipping...
-- Logs begin at Thu 2015-04-30 07:01:51 EDT, end at Thu 2015-04-30 13:57:37 EDT. --
Apr 30 13:54:04 user sudo[30325]: user: TTY=pts/0 ; PWD=/home/user; USER=root ; COMMAND=/sbin/apachectl restart
Apr 30 13:54:04 user systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Apr 30 13:54:04 user httpd[30330]: AH00526: Syntax error on line 100 of /etc/httpd/conf.d/ssl.conf:
Apr 30 13:54:04 user httpd[30330]: SSLCertificateFile: file '/etc/httpd/ssl/apache.srt' does not exist or is empty
Apr 30 13:54:04 user systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 30 13:54:04 user kill[30331]: kill: cannot find process ""
Apr 30 13:54:04 user systemd[1]: httpd.service: control process exited, code=exited status=1
Apr 30 13:54:04 user systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Apr 30 13:54:04 user systemd[1]: Unit httpd.service entered failed state.
Apr 30 13:57:37 user sudo[30336]: user: TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/journalctl -xn
ИТ-специалисты говорят, что файлов не существует etc / httpd / conf.d / ssl.conf и .key, но они есть: /
Ключевое сообщение об ошибке выглядит следующим образом:
SSLCertificateFile: file '/etc/httpd/ssl/apache.srt' does not exist or is empty
Вероятно, это небольшая опечатка в /etc/httpd/conf.d/ssl.conf
в имени компонента открытого ключа SSL вашего сертификата, скорее всего, это должен быть apache.crt вместо apache.srt