Apache2를 다시 시작하려고하는데 명령을 실행할 때마다 다음이 발생합니다.

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. 

이제”systemctl status apache2.service “를 입력하면 다음과 같이 출력됩니다.

● 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: failed (Result: exit-code) since Mon 2016-09-26 14:40:35 CEST; 1min 33s ago Docs: man:systemd-sysv-generator(8) Process: 2183 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS) Process: 2490 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE) Sep 26 14:40:35 Asterisk apache2[2490]: * The apache2 configtest failed. Sep 26 14:40:35 Asterisk apache2[2490]: Output of config test was: Sep 26 14:40:35 Asterisk apache2[2490]: [Mon Sep 26 14:40:35.250008 2016] [:crit] [pid 2501:tid 140245312874368] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. Sep 26 14:40:35 Asterisk apache2[2490]: AH00013: Pre-configuration failed Sep 26 14:40:35 Asterisk apache2[2490]: Action "configtest" failed. Sep 26 14:40:35 Asterisk apache2[2490]: The Apache error log may have more information. Sep 26 14:40:35 Asterisk systemd[1]: apache2.service: Control process exited, code=exited status=1 Sep 26 14:40:35 Asterisk systemd[1]: Failed to start LSB: Apache2 web server. Sep 26 14:40:35 Asterisk systemd[1]: apache2.service: Unit entered failed state. Sep 26 14:40:35 Asterisk systemd[1]: apache2.service: Failed with result "exit-code". 

내 오류 로그 ( 내 오류 로그라고 생각하는 것) http://hastebin.com/axalecoves.rb

Ubuntu를 사용하고 있습니다. 16.04.1을 실행하는 서버. 내가 뭘 잘못하고 있는지 아는 사람이 있으면 도와주세요. sudo a2enmod php7.0 명령을 실행할 때마다 이런 일이 발생합니다. 내가 할 때 a2dismod php7.0 다시 시작할 수 있습니다 … 제가 말씀 드렸듯이이 문제에 대해 아는 사람이 있으면 도와주세요 🙂

댓글

  • " answer "를 더 이해하기 쉬운 댓글로 이동했습니다 … 그 ' 첫 번째 힌트입니다. Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.하지만 The Apache error log may have more information. 아파치 오류 로그의 내용을 보여 주시겠습니까?
  • hastebin.com/iganelojor.rb -이것이 로그라고 생각합니다.

답변

Wiki Archlinux :

mpm_event_modulempm_prefork_module로 바꿔야합니다. .
/etc/httpd/conf/httpd.conf 파일을 열고 다음과 같이 편집합니다.

#LoadModule mpm_event_module modules/mod_mpm_event.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 

그런 다음 Apache 서비스를 다시 시작합니다.

댓글

  • httpd 폴더가 없습니다 '. 이유를 아십니까?
  • /etc/apache2/apache2.conf를 사용해보십시오. 그렇지 않으면 a2dismod mpm_eventa2enmod mpm_prefork, service apache2 restart를 사용합니다.
  • 어디서 그래도 LoadModule 명령을 배치해야합니까?
  • 괜찮습니다. 당신이 말한 것은 작동합니다;) 감사합니다!
  • 당신은 ' 환영합니다 🙂 Btw이 명령은 symlinkmods-enabled 폴더에 추가하여 선택한 모드를 활성화합니다. 케이스를 해결 한 경우 제 답변을 수락합니다.;)

답글 남기기

이메일 주소를 발행하지 않을 것입니다. 필수 항목은 *(으)로 표시합니다