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 15/07/2017, à 21:34

arbras

[résolu] Accès impossible serveur apache2

Bonjour,

j'utilise un serveur apache2 sur  raspberry pi pour faire tourner nextcloud et wallabag. Depuis hier, je n'ai plus d'accès aux site ("délai d'attente dépassé"). Mes recherches ne m'ont pas permis de résoudre le pb. J'avais fait un "sudo apt-get upgrade" il y a qq jours.
Voici le résultat de la commande "apache2 -t"

apache2 -t
[Sat Jul 15 23:09:35.293358 2017] [core:warn] [pid 2130] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

voici le contenu du fichier error.log.1

  GNU nano 2.2.6                                          Fichier : error.log.1                                                                                         

[Fri Jul 14 06:43:16.418758 2017] [mpm_prefork:notice] [pid 1241] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 06:43:16.418910 2017] [core:notice] [pid 1241] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 18:21:04.097332 2017] [mpm_prefork:notice] [pid 1241] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 18:21:04.494182 2017] [mpm_prefork:notice] [pid 11416] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 18:21:04.494392 2017] [core:notice] [pid 11416] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 18:22:24.107129 2017] [mpm_prefork:notice] [pid 11416] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 18:24:03.640581 2017] [mpm_prefork:notice] [pid 1274] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 18:24:03.644151 2017] [core:notice] [pid 1274] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 19:36:44.264728 2017] [mpm_prefork:notice] [pid 1274] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 19:38:23.928059 2017] [mpm_prefork:notice] [pid 1285] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 19:38:23.930394 2017] [core:notice] [pid 1285] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 21:06:40.599667 2017] [mpm_prefork:notice] [pid 1285] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 21:06:40.989946 2017] [mpm_prefork:notice] [pid 3979] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 21:06:40.990164 2017] [core:notice] [pid 3979] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 21:08:33.072035 2017] [mpm_prefork:notice] [pid 3979] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 21:08:33.469874 2017] [mpm_prefork:notice] [pid 4055] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 21:08:33.470088 2017] [core:notice] [pid 4055] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 21:36:11.777495 2017] [mpm_prefork:notice] [pid 4055] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 21:37:40.526890 2017] [mpm_prefork:notice] [pid 4872] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 21:37:40.527115 2017] [core:notice] [pid 4872] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 21:39:21.076544 2017] [mpm_prefork:notice] [pid 4872] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 21:48:37.933014 2017] [mpm_prefork:notice] [pid 5244] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 21:48:37.933240 2017] [core:notice] [pid 5244] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 21:58:32.678727 2017] [mpm_prefork:notice] [pid 5244] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 21:59:36.275884 2017] [mpm_prefork:notice] [pid 5539] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 21:59:36.276114 2017] [core:notice] [pid 5539] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 22:15:44.172640 2017] [mpm_prefork:notice] [pid 5539] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 22:15:56.960126 2017] [mpm_prefork:notice] [pid 1248] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 22:15:56.961564 2017] [core:notice] [pid 1248] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 22:18:51.191880 2017] [mpm_prefork:notice] [pid 1248] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 22:19:11.098767 2017] [mpm_prefork:notice] [pid 2713] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 22:19:11.099029 2017] [core:notice] [pid 2713] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 22:23:54.005881 2017] [mpm_prefork:notice] [pid 2713] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 22:24:44.793459 2017] [mpm_prefork:notice] [pid 2967] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 22:24:44.793727 2017] [core:notice] [pid 2967] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 14 22:25:48.771036 2017] [mpm_prefork:notice] [pid 2967] AH00169: caught SIGTERM, shutting down
[Fri Jul 14 22:25:49.173199 2017] [mpm_prefork:notice] [pid 3032] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Jul 14 22:25:49.173418 2017] [core:notice] [pid 3032] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jul 15 06:43:10.670254 2017] [mpm_prefork:notice] [pid 3032] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this mess$

Toute aide sera la bien venue!
merci d'avance,

Eric

Dernière modification par arbras (Le 06/08/2017, à 11:59)

Hors ligne

#2 Le 16/07/2017, à 06:15

J5012

Re : [résolu] Accès impossible serveur apache2

comment avais-tu installé et configuré nextcloud et wallabag ?

Hors ligne

#3 Le 16/07/2017, à 06:36

bruno

Re : [résolu] Accès impossible serveur apache2

Bonjour,

Tu as touché aux fichiers de configuration Apache, notamment  /etc/apache2/envvars ?
Parce que là ton serveur Apache ne tourne pas à cause de cette erreur de configuration :

 Config variable ${APACHE_RUN_DIR} is not defined

et a priori ce n'est pas une mise à jour qui peut "casser" cela…

Hors ligne

#4 Le 16/07/2017, à 09:43

arbras

Re : [résolu] Accès impossible serveur apache2

@bruno je n'ai pas touché à ce fichier. Voici son contenu

# envvars - default environment variables for apache2ctl

# this won't be correct after changing uid
unset HOME

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
        SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
        SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy+1
export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'

## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'

## If you would like to pass arguments to the web server, add them below

En revanche lors de la maj de php7 (sudo apt-get upgrade évoqué dans mon 1er message), on m'a demandé si je voulais garder mes anciens fichiers de conf, j'ai dit oui.

Hors ligne

#5 Le 16/07/2017, à 09:52

arbras

Re : [résolu] Accès impossible serveur apache2

Hors ligne

#6 Le 16/07/2017, à 15:10

bruno

Re : [résolu] Accès impossible serveur apache2

Au temps pour moi le retour de ta commande est normal, j'ai lu trop vite et j'ai cru que c'était apache2ctl -t

Donne-nous le retour de :

sudo systemctl restart apache2

puis de :

sudo systemctl status apache2

Dernière modification par bruno (Le 16/07/2017, à 15:11)

Hors ligne

#7 Le 16/07/2017, à 15:45

arbras

Re : [résolu] Accès impossible serveur apache2

Je les avais déjà lancé, mais sans progresser dans la résolution, les voici :

sudo systemctl restart apache2
pi@mlypi:~ $ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
   Active: active (running) since dim. 2017-07-16 16:43:46 CEST; 19s ago
  Process: 24693 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 11382 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 24700 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 24704 (apache2)
   CGroup: /system.slice/apache2.service
           ├─24704 /usr/sbin/apache2 -k start
           ├─24708 /usr/sbin/apache2 -k start
           ├─24709 /usr/sbin/apache2 -k start
           ├─24710 /usr/sbin/apache2 -k start
           ├─24711 /usr/sbin/apache2 -k start
           └─24712 /usr/sbin/apache2 -k start

juil. 16 16:43:46 mlypi apachectl[24700]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the...is message
juil. 16 16:43:46 mlypi systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.

Hors ligne

#8 Le 16/07/2017, à 16:14

bruno

Re : [résolu] Accès impossible serveur apache2

Apparemment le serveur Apache démarre normalement.
Il faut regarder les logs au moment où tu tentes d'accèder à tes sites.

Hors ligne

#9 Le 16/07/2017, à 16:20

arbras

Re : [résolu] Accès impossible serveur apache2

Oui, je les ai mis dans le 1er message et il y a des mentions "AH00169: caught SIGTERM, shutting down", qui indiquent qu'il plante...après je ne sais pas les interpréter.
Voici error.log

[Sun Jul 16 06:38:51.881161 2017] [mpm_prefork:notice] [pid 3032] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Sun Jul 16 06:38:51.881318 2017] [core:notice] [pid 3032] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 16 16:43:46.582322 2017] [mpm_prefork:notice] [pid 3032] AH00169: caught SIGTERM, shutting down
[Sun Jul 16 16:43:46.976370 2017] [mpm_prefork:notice] [pid 24704] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Sun Jul 16 16:43:46.976592 2017] [core:notice] [pid 24704] AH00094: Command line: '/usr/sbin/apache2'

Dernière modification par arbras (Le 16/07/2017, à 17:30)

Hors ligne

#10 Le 17/07/2017, à 10:02

bruno

Re : [résolu] Accès impossible serveur apache2

Effectivement j'ai bêtement pensé qu'il s'agissait de tes propres tentatives pour arrêter/relancer le service.
Si le service apache s'arrête tout seul les cause peuvent être multiples et variées :
- espace disque insuffisant (à vérifier avec df -h) ;
- erreur sur le système de fichiers ou carte sd défectueuse ;
- module Apache "exotique" (non issu des dépôts officiels) qui fait planter le service ;

etc.

Hors ligne

#11 Le 17/07/2017, à 21:22

J5012

Re : [résolu] Accès impossible serveur apache2

dans le tuto de nextcloud, apache2.conf est modifié
avais-tu installé php5 ou deja php7 ?

or lors de la mise à jour , tu as demandé à conserver les fichiers de conf modifiés ...
php7 ne s'interface pas avec apache2 de la meme facon que php5

le procédé vhost du tuto nextcloud est à mi-chemin de cro-magon et de sapiens wink == du moderne dans de l'ancien == mix de www-data , de /var/www , et de vhost ...

avais-tu telechargé exactement la version 11 ou la derniere de nextcloud ?
peux-tu desactiver temporairement https / ssl ?

Hors ligne

#12 Le 18/07/2017, à 09:16

arbras

Re : [résolu] Accès impossible serveur apache2

@J5012. Je n'ai pas suivi ce tuto à la lettre, en particulier pour ce qui concerne php pour lequel la  version 7 était requis à l'installation de nextcloud. J'utilise la version la plus récente de nextcloud, 12. Je peux désactiver ssl pour voir. Enfin, pas tt de suite car je suis parti en vacances...merci pour l'aide.
Je me demande d'ailleurs si il ne serait pas plus rapide de désinstaller/réinstaller apache en ayant sauvegardé au préalable les fichiers de conf...?

@bruno espace disque : improbable car la carte est très peu chargée et fonctionne bien pour le reste des applications. module apache exotique : a priori non, tout est du classique. merci pour l'aide.

Hors ligne

#13 Le 18/07/2017, à 22:56

J5012

Re : [résolu] Accès impossible serveur apache2

tu peux aussi desactiver la conf de nextcloud et wallabag, pour voir si ca remarche avec la config localhost par defaut ...

Hors ligne

#14 Le 05/08/2017, à 17:04

arbras

Re : [résolu] Accès impossible serveur apache2

Bonjour J5012, pourrais tu préciser comment "désactiver" les conf nextcloud et wallabag? merci.
Eric

Hors ligne

#15 Le 06/08/2017, à 10:58

J5012

Re : [résolu] Accès impossible serveur apache2

ca depend de ce que tu as choisi :
- le tuto wallabag utilise un vhost
- le tuto nextcloud utilise apache2.conf

de toute facon que ce soit l'un ou l'autre, puisque tu as monté leur config, tu dois savoir comment les desactiver pour ne laisser que le serveur http ...

normalement avant de deployer une application serveur, tu devrais comprendre comment fonctionne le triplet httpd+php+mysql ...

il y a dans ce forum des centaines de pages de discussion sur le deploiement d'applications web pour lamp, et la majorité montre que les utilisateurs se precipitent sur les applications (owncloud, wordpress, phpmyadmin ...) sans vraiment comprendre comment fonctionne le linux apache mysql php ...

Hors ligne

#16 Le 06/08/2017, à 11:28

arbras

Re : [résolu] Accès impossible serveur apache2

Tu as raison, je reconnais que je ne comprends pas tout et que je découvre en marchant, mais je me soigne...comme pas mal d'utilisateurs qui veulent utiliser ce genre de solutions sans être informaticiens à la base et sans avoir non plus des heures à consacrer à de la formation théorique.
Cependant, j'ai repéré le pb qui n'avait finalement rien à voir avec le serveur apache. L'adresse de ma box, à laquelle j'associe les nom de domaines créés sur no-ip avait changé suite à un redémarrage. En effectuant la modif adéquate sur no-ip, j'ai résolu le pb.
merci pour tes réponses.

Eric

Hors ligne