Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 04/09/2015, à 13:21

laplumaencre

apache2 failed

Salut à tous,
J'ai vuolu réinstaller mon serveur LAMP, j'ai tout réinstaller ok, j'ai eu la page d'accueil sur localhost, mais apres reboot, mon serveur apache ne veut pas démarré.

Quand je fait un =>

sudo /etc/init.d/apache2 reload
[....] Reloading apache2 configuration (via systemctl): apache2.serviceJob for apache2.service invalid.
 failed!

J'ai une erreur comme vous pouvez le voir.

J'ai créé un autre WWW dans mon /home, avec un lien vers celui ci comme expliquer dans la doc (ubuntu) d'installation et ensuite supprimer le fichier .html dans le dossier /var qui etait root.

Donc mon probleme c'est que mon serveur apache ne demarre plus, et je tourne en rond avec la doc et google, donc je viens vers vous pour de l'aide.
Merci.

Hors ligne

#2 Le 04/09/2015, à 21:43

tiramiseb

Re : apache2 failed

Salut,

Que disent les logs ?
(/var/log/apache2/error.log)

Hors ligne

#3 Le 04/09/2015, à 22:39

laplumaencre

Re : apache2 failed

Salut Merci de ton aide, alors le log dit =>

[Fri Sep 04 10:37:00.216030 2015] [mpm_event:notice] [pid 6126:tid 140398181099392] AH00489: Apache/2.4.10 (Ubuntu) configured -- resuming normal operations
[Fri Sep 04 10:37:00.216472 2015] [core:notice] [pid 6126:tid 140398181099392] AH00094: Command line: '/usr/sbin/apache2'
[Fri Sep 04 10:37:31.560556 2015] [mpm_event:notice] [pid 6126:tid 140398181099392] AH00491: caught SIGTERM, shutting down
[Fri Sep 04 10:37:32.722711 2015] [mpm_prefork:notice] [pid 7912] AH00163: Apache/2.4.10 (Ubuntu) configured -- resuming normal operations
[Fri Sep 04 10:37:32.722967 2015] [core:notice] [pid 7912] AH00094: Command line: '/usr/sbin/apache2'
[Fri Sep 04 10:37:34.151244 2015] [mpm_prefork:notice] [pid 7912] AH00169: caught SIGTERM, shutting down
[Fri Sep 04 10:37:35.576299 2015] [mpm_prefork:notice] [pid 8026] AH00163: Apache/2.4.10 (Ubuntu) configured -- resuming normal operations
[Fri Sep 04 10:37:35.576449 2015] [core:notice] [pid 8026] AH00094: Command line: '/usr/sbin/apache2'
[Fri Sep 04 10:51:57.641851 2015] [:error] [pid 8031] [client 127.0.0.1:44030] PHP Fatal error:  Call to undefined function curl_init() in /home/jeremy/www/freeMobile/FreeMobile.php on line 15, referer: http://127.0.0.1/www/freeMobile/
[Fri Sep 04 10:52:01.782575 2015] [:error] [pid 8372] [client 127.0.0.1:44031] PHP Fatal error:  Call to undefined function curl_init() in /home/jeremy/www/freeMobile/FreeMobile.php on line 15, referer: http://127.0.0.1/www/freeMobile/
[Fri Sep 04 10:56:41.358705 2015] [mpm_prefork:notice] [pid 8026] AH00169: caught SIGTERM, shutting down

Hors ligne

#4 Le 05/09/2015, à 16:20

tiramiseb

Re : apache2 failed

C'est  bizarre, y'a rien qui parle de difficulté à se relancer.

As-tu bien tenté un stop puis un start d'apache, et pas seulement un reload ?

Hors ligne

#5 Le 05/09/2015, à 16:40

bruno

Re : apache2 failed

Bonjour,

Effectivement les logs ne sont pas très parlants…
La seule erreur notable concerne un script PḦP qui ne s’exécute pas parce que le paquet php5-curl n'est pas installé…

Il faudrait le retour complet des commandes :

sudo service apache2 restart

et

sudo systemctl -l status apache2

Hors ligne

#6 Le 06/09/2015, à 10:39

laplumaencre

Re : apache2 failed

Salut, j'avais même pas vu pour php5-curl :-), je l'ai installé, mais bon c'est pas ça le problème, donc je fait un retour des cmd =>

jeremy@intelbuntu:~$ sudo service apache2 restart
Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.

et

jeremy@intelbuntu:~$ sudo systemctl -l status apache2
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: failed (Result: exit-code) since dim. 2015-09-06 10:35:56 CEST; 50s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3263 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

sept. 06 10:35:56 intelbuntu apache2[3263]: * The apache2 configtest failed.
sept. 06 10:35:56 intelbuntu apache2[3263]: Output of config test was:
sept. 06 10:35:56 intelbuntu apache2[3263]: AH00526: Syntax error on line 15 of /etc/apache2/sites-enabled/000-default.conf:
sept. 06 10:35:56 intelbuntu apache2[3263]: Alias takes two arguments, a fakename and a realname
sept. 06 10:35:56 intelbuntu apache2[3263]: Action 'configtest' failed.
sept. 06 10:35:56 intelbuntu apache2[3263]: The Apache error log may have more information.
sept. 06 10:35:56 intelbuntu systemd[1]: apache2.service: control process exited, code=exited status=1
sept. 06 10:35:56 intelbuntu systemd[1]: Failed to start LSB: Apache2 web server.
sept. 06 10:35:56 intelbuntu systemd[1]: Unit apache2.service entered failed state.
sept. 06 10:35:56 intelbuntu systemd[1]: apache2.service failed.

Donc charger mais pas activé déjà.
Par contre il note que le configtest d'apache2 failed, je l'ai pourtant fait correctement à l'installation ?
Erreur de syntaxe ligne 15...
Et ba ça en fait des truc qui déconne :-D

Hors ligne

#7 Le 06/09/2015, à 11:09

laplumaencre

Re : apache2 failed

Voilà  !! ça marche !
Donc le problème venait bien de l'erreur de syntaxe ligne 15 dans le fichier 000-default.conf....un # devant une ligne qui devait être commenter, que j'ai oublié de commenter...quels C.... :-D

MErci à tous pour vôtre aide si précieuse ! A bientôt.

Hors ligne