#1 Le 09/10/2023, à 12:02
- Inoverde2023
Impossible de redémarrer apaches 2 après création d'un virtual Host
Bonjour,
Je suis entrain de déployer un serveur ubuntu 20.04 avec lampp qui sera sensé héberger une application web.
j'ai donc installé les paquets suivant:
sudo apt install apache2 php libapache2-mod-php mysql-server php-mysql
sudo apt install apache2 php libapache2-mod-php mariadb-server php-mysql
sudo apt install php-curl php-gd php-intl php-json php-mbstring php-xml php-zip
Et créé une base de données, par contre lors de la création de mon virtual host (Ci-dessous) l'activation est ok mais une erreur lors du redémarrage. d'apache2
<VirtualHost *:80>
ServerName filesbank.sgc
ServerAlias [url=http://www.filesbank.sgc]www.filesbank.sgc[/url]
DocumentRoot "/var/www/filesbank"
<Directory "/var/www/filesbank">
Options FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.filesbank.sgc.log
CustomLog /var/log/apache2/access.filesbank.sgc.log combined
</VirtualHost>
Erreur lors du redémarrage.
" ░░ L'unité (unit) apache2.service a terminé de recharger configuration,
░░ avec le résultat failed.
oct. 09 09:35:36 filesbankserver systemd[1]: Reloading apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à recharger sa configuration
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: [url]http://www.ubuntu.com/support[/url]
â–‘â–‘
░░ L'unité (unit) apache2.service a commencé à recharger sa configuration.
oct. 09 09:35:36 filesbankserver apachectl[16578]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 12 of /etc/apache2/sites-enabled/filesbank.sgc.conf: Expected </Directory> but saw </VirtualHost>
oct. 09 09:35:36 filesbankserver apachectl[16574]: Action 'graceful' failed.
oct. 09 09:35:36 filesbankserver apachectl[16574]: The Apache error log may have more information.
oct. 09 09:35:36 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: [url]http://www.ubuntu.com/support[/url]
â–‘â–‘
â–‘â–‘ An ExecReload= process belonging to unit apache2.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
oct. 09 09:35:36 filesbankserver systemd[1]: Reload failed for apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a terminé de recharger configuration
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: [url]http://www.ubuntu.com/support[/url]
â–‘â–‘
░░ L'unité (unit) apache2.service a terminé de recharger configuration,
░░ avec le résultat failed.
oct. 09 09:42:32 filesbankserver systemd[1]: Reloading apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à recharger sa configuration
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: [url]http://www.ubuntu.com/support[/url]
â–‘â–‘
░░ L'unité (unit) apache2.service a commencé à recharger sa configuration.
oct. 09 09:42:32 filesbankserver apachectl[16787]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 12 of /etc/apache2/sites-enabled/filesbank.sgc.conf: Expected </Directory> but saw </VirtualHost>
oct. 09 09:42:32 filesbankserver apachectl[16784]: Action 'graceful' failed.
oct. 09 09:42:32 filesbankserver apachectl[16784]: The Apache error log may have more information.
oct. 09 09:42:32 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: [url]http://www.ubuntu.com/support[/url]
â–‘â–‘
â–‘â–‘ An ExecReload= process belonging to unit apache2.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
oct. 09 09:42:32 filesbankserver systemd[1]: Reload failed for apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a terminé de recharger configuration
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: [url]http://www.ubuntu.com/support[/url]
â–‘â–‘
░░ L'unité (unit) apache2.service a terminé de recharger configuration,
░░ avec le résultat failed.
"
Modération : posé les balises code. Ce que tu aurais pu faire toi même. De rien.
Dernière modification par Ayral (Le 09/10/2023, à 23:36)
Hors ligne
#2 Le 09/10/2023, à 12:05
- Compte supprimé
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
Bonjour,
Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 12 of /etc/apache2/sites-enabled/filesbank.sgc.conf: Expected </Directory> but saw </VirtualHost>
#3 Le 09/10/2023, à 12:15
- xubu1957
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
Bonjour,
Pour ajouter toi-même les balises code à ton message #1 : Notre modérateur Ayral a mis les balises, je le remercie.
Cliquer sur le lien « Modifier » en bas à droite du message
Sélectionner le texte
Cliquer sur le <> de l'éditeur de message
Comme demandé dans le premier message du tutoriel Retour utilisable de commande
==============
Lecture conseillée > memento des balises code.
Dernière modification par xubu1957 (Le 10/10/2023, à 16:01)
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Résolu] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci. Membre de Linux-Azur
Hors ligne
#4 Le 09/10/2023, à 13:24
- Inoverde2023
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
Bonjour @Xubu1957
Merci pour la remarque.
Hors ligne
#5 Le 09/10/2023, à 13:26
- xubu1957
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
Le dire c'est bien, le faire c'est mieux, avant le passage de la patrouille :
Modération - Balises code à ajouter aux messages comme demandé, ça ne se fera pas tout seul
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Résolu] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci. Membre de Linux-Azur
Hors ligne
#6 Le 09/10/2023, à 13:53
- krodelabestiole
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
@Inoverde2023 : tu as lu la réponse de Tamarou ?
nouveau forum ubuntu-fr on en parle là : refonte du site / nouveau design
profil - sujets récurrents
En ligne
#7 Le 09/10/2023, à 14:38
- Inoverde2023
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
@krodelabestiole, je ne vois que la ligne concernée par de remarques particulières, j'ai redémarré les serveur apache2 et voici l'erreur:
Job for apache2.service failed because the control process existed with error code, see system
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-10-09 12:32:36 UTC; 3min 11s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1416 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 97ms
oct. 09 12:32:36 filesbankserver systemd[1]: Starting apache2.service - The Apache HTTP Server...
oct. 09 12:32:36 filesbankserver apachectl[1419]: AH00526: Syntax error on line 11 of /etc/apache2/sites-enabled/filesbank.sgc.conf:
oct. 09 12:32:36 filesbankserver apachectl[1419]: CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" or "expr=" clause (see docs)
oct. 09 12:32:36 filesbankserver apachectl[1416]: Action 'start' failed.
oct. 09 12:32:36 filesbankserver apachectl[1416]: The Apache error log may have more information.
oct. 09 12:32:36 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
oct. 09 12:32:36 filesbankserver systemd[1]: apache2.service: Failed with result 'exit-code'.
oct. 09 12:32:36 filesbankserver systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
oct. 09 12:06:44 filesbankserver systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à démarrer
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a commencé à démarrer.
oct. 09 12:06:46 filesbankserver apachectl[889]: AH00526: Syntax error on line 11 of /etc/apache2/sites-enabled/filesbank.sgc.conf:
oct. 09 12:06:46 filesbankserver apachectl[889]: CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" or "expr=" clause (see docs)
oct. 09 12:06:46 filesbankserver apachectl[864]: Action 'start' failed.
oct. 09 12:06:46 filesbankserver apachectl[864]: The Apache error log may have more information.
oct. 09 12:06:46 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ An ExecStart= process belonging to unit apache2.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
oct. 09 12:06:46 filesbankserver systemd[1]: apache2.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
oct. 09 12:06:46 filesbankserver systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a échoué
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a échoué, avec le résultat failed.
oct. 09 12:28:56 filesbankserver systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à démarrer
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a commencé à démarrer.
oct. 09 12:28:57 filesbankserver apachectl[1374]: AH00526: Syntax error on line 11 of /etc/apache2/sites-enabled/filesbank.sgc.conf:
oct. 09 12:28:57 filesbankserver apachectl[1374]: CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" or "expr=" clause (see docs)
oct. 09 12:28:57 filesbankserver apachectl[1371]: Action 'start' failed.
oct. 09 12:28:57 filesbankserver apachectl[1371]: The Apache error log may have more information.
oct. 09 12:28:57 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ An ExecStart= process belonging to unit apache2.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
oct. 09 12:28:57 filesbankserver systemd[1]: apache2.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
oct. 09 12:28:57 filesbankserver systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a échoué
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a échoué, avec le résultat failed.
oct. 09 12:31:38 filesbankserver systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à démarrer
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a commencé à démarrer.
oct. 09 12:31:39 filesbankserver apachectl[1404]: AH00526: Syntax error on line 11 of /etc/apache2/sites-enabled/filesbank.sgc.conf:
oct. 09 12:31:39 filesbankserver apachectl[1404]: CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" or "expr=" clause (see docs)
oct. 09 12:31:39 filesbankserver apachectl[1401]: Action 'start' failed.
oct. 09 12:31:39 filesbankserver apachectl[1401]: The Apache error log may have more information.
oct. 09 12:31:39 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ An ExecStart= process belonging to unit apache2.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
oct. 09 12:31:39 filesbankserver systemd[1]: apache2.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
oct. 09 12:31:39 filesbankserver systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a échoué
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a échoué, avec le résultat failed.
oct. 09 12:32:36 filesbankserver systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à démarrer
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a commencé à démarrer.
oct. 09 12:32:36 filesbankserver apachectl[1419]: AH00526: Syntax error on line 11 of /etc/apache2/sites-enabled/filesbank.sgc.conf:
oct. 09 12:32:36 filesbankserver apachectl[1419]: CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" or "expr=" clause (see docs)
oct. 09 12:32:36 filesbankserver apachectl[1416]: Action 'start' failed.
oct. 09 12:32:36 filesbankserver apachectl[1416]: The Apache error log may have more information.
oct. 09 12:32:36 filesbankserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ An ExecStart= process belonging to unit apache2.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
oct. 09 12:32:36 filesbankserver systemd[1]: apache2.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
oct. 09 12:32:36 filesbankserver systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a échoué
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
░░ L'unité (unit) apache2.service a échoué, avec le résultat failed.
Hors ligne
#8 Le 10/10/2023, à 11:12
- krodelabestiole
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
pareil :
Syntax error on line 11 of /etc/apache2/sites-enabled/filesbank.sgc.conf:
il faudrait que tu colles le contenu de tes virtualhosts pour qu'on voit ce qui cloche.
nouveau forum ubuntu-fr on en parle là : refonte du site / nouveau design
profil - sujets récurrents
En ligne
#9 Le 10/10/2023, à 15:53
- bruno
Re : Impossible de redémarrer apaches 2 après création d'un virtual Host
+1
Et au vu des problèmes d'encodage de caractères dans les retours, je soupçonne la présence de caractères exotiques ou d'espace dans la ligne qui indique l'emplacement du fichier de logs.
Attention, les bouteilles vendues par Nestlé Waters sont contaminées au monoxyde de dihydrogène.
Hors ligne