Page 1 sur 1

[Apache] Fails to start (Résolu)

Publié : lun. 17 mars 2014, 13:36
par mélodie
Bonjour,

Au début j'avais ça dans le "journalctl -k":

Code : Tout sélectionner

mars 17 12:28:00 squirrel systemd[1]: httpd.service: control process exited, code=exited status=1
mars 17 12:28:00 squirrel systemd[1]: Unit httpd.service entered failed state.
Alors j'ai attaqué la fusion des httpd.conf : celui dont je me servais jusqu'ici et le .pacnew, pour mettre mes quelques personnalisations (peu) dans le .pacnew, puis installé le nouveau fichier et après cela, systemctl veut bien l'activer (enable), mais il ne veut toujours pas le lancer. Voici ce qu'il me dit:

Code : Tout sélectionner

# systemctl status httpd.service
httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since lun. 2014-03-17 13:24:44 CET; 12s ago
  Process: 1179 ExecStart=/usr/bin/apachectl start (code=exited, status=1/FAILURE)

mars 17 13:24:44 squirrel apachectl[1179]: AH00526: Syntax error on line 7 of /etc/httpd/conf/extra/httpd-phpmyadmin.conf:
mars 17 13:24:44 squirrel apachectl[1179]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
mars 17 13:24:44 squirrel systemd[1]: httpd.service: control process exited, code=exited status=1
mars 17 13:24:44 squirrel systemd[1]: Failed to start Apache Web Server.
mars 17 13:24:44 squirrel systemd[1]: Unit httpd.service entered failed state.
Voici le contenu du fichier qui est dans httpd-phpmyadmin.conf:

Code : Tout sélectionner

	Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
	<Directory "/usr/share/webapps/phpMyAdmin">
		AllowOverride All
		Options FollowSymlinks
		Order allow,deny
		Allow from all
		php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/"
	</Directory>
Je vois un rapport de bug ici:
https://bugs.archlinux.org/task/39209

auriez-vous une idée pour une solution ?

Merci par avance.

Re: [Apache] Fails to start

Publié : lun. 17 mars 2014, 18:44
par Elbarto
consulte le topic que j'ai crée :

http://forums.archlinux.fr/topic15079.html

il faut changer quelques lignes dans le fichier de configuration de phpmyadmin, avec cette version ça doit fonctionner :

Code : Tout sélectionner

Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>
vérifier aussi dans /etc/php/php.ini que pour l'option "open_basedir" les repertoires /usr/share/pear/ et /usr/share/webapps/ soient ajoutés

Re: [Apache] Fails to start

Publié : mar. 18 mars 2014, 00:08
par mélodie
Salut Elbarto,

Je vais regarder ça très vite (avant la fin de la semaine) et je reviendrai dire si le résultat souhaité est au bout.

Merci !

Re: [Apache] Fails to start

Publié : mer. 19 mars 2014, 14:33
par mélodie
Salut,

Ça maaaarrche ! Merci. :)

Code : Tout sélectionner

# systemctl -l status httpd.service
httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: active (running) since mer. 2014-03-19 14:31:35 CET; 56s ago
  Process: 2149 ExecStart=/usr/bin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 2152 (httpd)
   CGroup: /system.slice/httpd.service
           ├─2152 /usr/bin/httpd -k start
           ├─2153 /usr/bin/httpd -k start
           ├─2154 /usr/bin/httpd -k start
           └─2155 /usr/bin/httpd -k start

mars 19 14:31:35 squirrel systemd[1]: Starting Apache Web Server...
mars 19 14:31:35 squirrel systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start.
mars 19 14:31:35 squirrel systemd[1]: Started Apache Web Server.
#
PS: Après cela j'ai rencontré deux problèmes. php n'interprétait pas le php (il sortait du php brut).

http://stackoverflow.com/questions/2224 ... es-for-php

J'ai ajouté les lignes pour php5 comme dans mon fichier de conf httpd.conf précédant:

Code : Tout sélectionner

# Load php5 module
LoadModule php5_module modules/libphp5.so

Code : Tout sélectionner

Include conf/extra/php5_module.conf
AddHandler php5-script php
et après redémarrage de httpd apache ne se lançait plus. À l'aide du message d'erreur j'ai trouvé l'info suivante:
http://stackoverflow.com/questions/2224 ... es-for-php
5 down vote


To switch to prefork MPM on Apache/2.4.7 (like the previous version of Apache), do this in /etc/httpd/conf/httpd.conf:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

#LoadModule mpm_event_module modules/mod_mpm_event.so

and after httpd restart, on my raspberry pi.
Et ça a marché pour moi aussi. Mais ensuite il y avait un message d'erreur, sur la commande systemctl status httpd. Et le problème était les droits sur le fichier de pid. Solution trouvée à nouveau sur stackoverflow:
http://stackoverflow.com/questions/1615 ... art-apache
The solution is to adjust the file /usr/lib/tmpfiles.d/apache.conf. The default values are wrong. You have to change this

Code : Tout sélectionner

d /run/httpd 0755 root root -
to

Code : Tout sélectionner

d /run/httpd 0755 http http -
After restarting apache the PID file will be created with chown http:http and not chown root:root.
Mais ça, ça ne produit aucune différence.
My take is that this bug is a feature: Nothing I've done has been able to get rid of it (tried everything suggested here and then some) yet the software runs just fine. So, I take it as a slightly mis-written success message - I've started!
:bravo: :chinois: