“apache2.service가 활성화되지 않아 다시로드 할 수 없습니다”


10

을 실행할 때 sudo service apache2 reload오류가 발생합니다.

apache2.service is not active, cannot reload

출력 sudo service apache2 status

root@gamma:~# sudo service apache2 status
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
       └─apache2-systemd.conf
Active: inactive (dead) since Sat 2016-10-15 08:23:11 UTC; 2h 28min ago
 Docs: man:systemd-sysv-generator(8)
Process: 2203 ExecStop=/etc/init.d/apache2 stop (code=exited,     status=0/SUCCESS)
Process: 2185 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

Oct 15 08:23:10 gamma systemd[1]: Starting LSB: Apache2 web server...
Oct 15 08:23:10 gamma apache2[2185]:  * Starting Apache httpd web server apache2
Oct 15 08:23:11 gamma apache2[2185]: Action 'start' failed.
Oct 15 08:23:11 gamma apache2[2185]: The Apache error log may have more information.
Oct 15 08:23:11 gamma apache2[2185]:  *
Oct 15 08:23:11 gamma apache2[2203]:  * Stopping Apache httpd web server apache2
Oct 15 08:23:11 gamma apache2[2203]:  *
Oct 15 08:23:11 gamma systemd[1]: Started LSB: Apache2 web server.
root@gamma:~# sudo service apache2 reload
apache2.service is not active, cannot reload.
root@gamma:~#

출력 error.log

root@gamma:/# sudo service apache2 force-reload
apache2.service is not active, cannot reload.
root@gamma:/# grep '15 08:23:' /var/log/apache2/error.log
root@gamma:/# zgrep -h 'Oct 15 08:23:' /var/log/apache2/error.log*
[Sat Oct 15 08:23:11.012917 2016] [ssl:emerg] [pid 2202] AH02562: Failed to configure certificate   bot.testingsite.cf:443:0 (with chain), check /etc/apache2/ssl/bot.testingsite.cf.crt
[Sat Oct 15 08:23:11.013037 2016] [ssl:emerg] [pid 2202] SSL Library Error:    error:0906D06C:PEM rou  tines:PEM_read_bio:no start line (Expecting: TRUSTED CERTIFICATE) -- Bad file contents or format -   or even just a forgotten SSLCertificateKeyFile?
[Sat Oct 15 08:23:11.013056 2016] [ssl:emerg] [pid 2202] SSL Library Error: error:140DC009:SSL rou  tines:SSL_CTX_use_certificate_chain_file:PEM lib
root@gamma:/#

SSL 인증서를 활성화하려고했습니다. Namecheap에서 파일을 제공했으며 ..cf.crt 파일에서 사용했습니다. 이 오류를 본 후 DCV 방법을 통해 유효성 검사를 시도했습니다. 그러나 여전히이 오류가 발생합니다. sudo service apache2 restart출력을 제공하지 않습니다.


sudo 서비스 apache2 상태의 출력을 볼 수 있습니까?
— Manuel Alvarez

@ManuelAlvarez 게시물 수정
— 9677832

1
grep '15 08:23:' /var/log/apache2/error.log
— Martin Thornton

출력이 없으면 zgrep -h 'Oct 15 08:23:' /var/log/apache2/error.log*대신 실행하십시오 .
— Martin Thornton

또한 전체 OS를 재부팅하려고 시도했지만 도움이되지 않았습니다.
— user9677832

답변:


16

하다

apachectl stop

/etc/apache2/apache2.conf파일 에 구문 오류와 관련된 오류 메시지가 표시 됩니다.

정정하십시오.

그런 다음

apachectl stop
/etc/init.d/apache2 start

이제 apache2를 다시로드하면 작동합니다.

하다

/etc/init.d/apache2 reload

실제로, 그것은 몇 달 전이고 OS를 다시 설치해야했습니다. 그건 그렇고, 답변 주셔서 감사합니다.
— user9677832

이것은 나를 위해 일했다!
— gthuo
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.