Sto cercando di riavviare Apache2, ma ogni volta che eseguo il comando, questo accade:

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

Ora, quando digito” systemctl status apache2.service “, stampa questo:

● 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". 

Il mio log degli errori ( Quello che penso sia il mio registro degli errori) http://hastebin.com/axalecoves.rb

Sto utilizzando Ubuntu Server, in esecuzione 16.04.1. Se qualcuno di voi sa cosa sto sbagliando, aiutami. Questo accade ogni volta che eseguo il comando sudo a2enmod php7.0. Quando lo faccio a2dismod php7.0 Posso ricominciarlo bene … Come ho detto, se qualcuno sa qualcosa su questo, per favore aiutami 🙂

Commenti

  • Spostato la mia " risposta " ai commenti che ha più senso … Questo ' è un primo suggerimento Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. Ma per essere sicuri fai attenzione alla riga che dice The Apache error log may have more information. Potresti mostrarci il contenuto del log degli errori di Apache?
  • hastebin.com/iganelojor.rb – Credo che sia il registro.

Risposta

Come detto da Wiki Archlinux :

Devi sostituire mpm_event_module con mpm_prefork_module .
Apri il file /etc/httpd/conf/httpd.conf e modifica come segue:

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

Quindi riavvia il servizio Apache.

Commenti

  • Non ' ho alcuna cartella httpd. Sai perché?
  • Prova con /etc/apache2/apache2.conf. Altrimenti utilizza: a2dismod mpm_event e a2enmod mpm_prefork, service apache2 restart.
  • Dove dovrei inserire il comando LoadModule però?
  • Non importa. Quello che mi hai detto funziona;) Grazie amico!
  • Tu ' sei il benvenuto 🙂 A proposito, questi comandi creano un symlink nella cartella mods-enabled, in modo tale da abilitare la modalità scelta. Se hai risolto il caso, accetta la mia risposta;)

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *