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.

#51 Le 15/02/2018, à 09:29

harlog

Re : changement de service sur le disque démon pour recharger des unité

Yes mais même en copiant/collant le fichier est vide et quand je rentre dans le

systemctl status apache2.service

il me sort ça :

● 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 Thu 2018-02-15 08:24:31 UTC; 26s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5302 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 8785 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Feb 15 08:24:31 ip-10-141-60-74 apache2[8785]:  * The apache2 configtest failed.
Feb 15 08:24:31 ip-10-141-60-74 apache2[8785]: Output of config test was:
Feb 15 08:24:31 ip-10-141-60-74 apache2[8785]: AH00526: Syntax error on line 14 of /etc/apache2
Feb 15 08:24:31 ip-10-141-60-74 apache2[8785]: <Directory> directive missing closing '>'
Feb 15 08:24:31 ip-10-141-60-74 apache2[8785]: Action 'configtest' failed.
Feb 15 08:24:31 ip-10-141-60-74 apache2[8785]: The Apache error log may have more information.
Feb 15 08:24:31 ip-10-141-60-74 systemd[1]: apache2.service: Control process exited, code=exite
Feb 15 08:24:31 ip-10-141-60-74 systemd[1]: Failed to start LSB: Apache2 web server.
Feb 15 08:24:31 ip-10-141-60-74 systemd[1]: apache2.service: Unit entered failed state.
Feb 15 08:24:31 ip-10-141-60-74 systemd[1]: apache2.service: Failed with result 'exit-code'.
lines 1-19/19 (END)...skipping...

seulement impossible de modifier ce fichier

Hors ligne

#52 Le 15/02/2018, à 09:59

bruno

Re : changement de service sur le disque démon pour recharger des unité

Apcache n'invente pas des erreurs :

AH00526: Syntax error on line 14 of /etc/apache2/sites-enabled/000-default.conf:
<Directory> directive missing closing '>'

il y a bien un fichier sous /etc/apache2/sites-enabled/ ou /etc/apache2/sites-available qui contient des erreurs.

retour de :

ls -l /etc/apache2/sites-enabled/
ls -l /etc/apache2/sites-available/

Hors ligne

#53 Le 15/02/2018, à 10:01

harlog

Re : changement de service sur le disque démon pour recharger des unité

yes je me doute bien que l'erreur vient de moi le problème c'est comment la trouver

voilà le retour des 2 commandes :

root@ip-10-141-60-74:/home/ubuntu# ls -l /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 35 Feb 14 12:19 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root 35 Feb 14 13:56 default-ssl.conf -> ../sites-available/default-ssl.conf
root@ip-10-141-60-74:/home/ubuntu# ls -l /etc/apache2/sites-available/
total 28
-rw-r--r-- 1 root root 1478 Feb 14 14:26 000-default.conf
-rw-r--r-- 1 root root 6450 Feb 14 14:30 default-ssl.conf
-rw-r--r-- 1 root root 1328 Feb  1 09:54 example.com.conf
-rw-r--r-- 1 root root  158 Feb  8 13:53 ipsen.com-le-ssl.conf
-rw-r--r-- 1 root root  159 Jan 31 16:15 phpipam.com-le-ssl.conf
-rw-r--r-- 1 root root 1341 Feb  1 10:10 test.com.conf

Hors ligne

#54 Le 15/02/2018, à 10:23

bruno

Re : changement de service sur le disque démon pour recharger des unité

Donc le fichier existe bien et n'est pas vide !
Il suffit d'y corriger les erreurs :

sudo nano /etc/apache2/sites-available/000-default.conf

Hors ligne

#55 Le 15/02/2018, à 10:27

harlog

Re : changement de service sur le disque démon pour recharger des unité

yes c'est bon je suis rentré dedans, voici son contenu :

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory "var/www/html"
                Options FollowSymLinks
                AllowOverride all
                Require all granted
                Order allow,deny
                Allow from all
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

Hors ligne

#56 Le 15/02/2018, à 10:34

harlog

Re : changement de service sur le disque démon pour recharger des unité

le reste du fichier :

  ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Hors ligne

#57 Le 15/02/2018, à 10:37

bruno

Re : changement de service sur le disque démon pour recharger des unité

Il suffit de corriger l'erreur :

<Directory> directive missing closing '>'

c'est à dire rajouter le '>' manquant. Enregistrer le fichier et relancer apache.

Hors ligne

#58 Le 15/02/2018, à 10:42

harlog

Re : changement de service sur le disque démon pour recharger des unité

relancer avec :

systemctl restart apache2 

?
car je ne peux toujours pas lancer cette commande même en aillant corrigé l'erreur

Hors ligne

#59 Le 15/02/2018, à 11:02

harlog

Re : changement de service sur le disque démon pour recharger des unité

en faite il faudrait que j'arrive à faire passer ça :

root@ip-10-141-60-74:/home# systemctl status apache2.service
● 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 Thu 2018-02-15 09:46:14 UTC; 13min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5302 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 9093 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Feb 15 09:46:14 ip-10-141-60-74 apache2[9093]:  * The apache2 configtest failed.
Feb 15 09:46:14 ip-10-141-60-74 apache2[9093]: Output of config test was:
Feb 15 09:46:14 ip-10-141-60-74 apache2[9093]: AH00526: Syntax error on line 14 of /etc/apache2/sites-enabled/000-default.conf:
Feb 15 09:46:14 ip-10-141-60-74 apache2[9093]: <Directory> directive missing closing '>'
Feb 15 09:46:14 ip-10-141-60-74 apache2[9093]: Action 'configtest' failed.
Feb 15 09:46:14 ip-10-141-60-74 apache2[9093]: The Apache error log may have more information.
Feb 15 09:46:14 ip-10-141-60-74 systemd[1]: apache2.service: Control process exited, code=exited status=1
Feb 15 09:46:14 ip-10-141-60-74 systemd[1]: Failed to start LSB: Apache2 web server.
Feb 15 09:46:14 ip-10-141-60-74 systemd[1]: apache2.service: Unit entered failed state.
Feb 15 09:46:14 ip-10-141-60-74 systemd[1]: apache2.service: Failed with result 'exit-code'.
root@ip-10-141-60-74:/home#

en état fonctionelle et non failed

Hors ligne

#60 Le 15/02/2018, à 11:06

harlog

Re : changement de service sur le disque démon pour recharger des unité

il me reparle de la ligne 14 de mon fichier /etc/apache/sites-enabled/000-default.conf

mais pourtant j'ai fais la modif :

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory> "var/www/html"
                Options FollowSymLinks
                AllowOverride all
                Require all granted
                Order allow,deny
                Allow from all
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Hors ligne

#61 Le 15/02/2018, à 11:19

bruno

Re : changement de service sur le disque démon pour recharger des unité

  <Directory "var/www/html">

Hors ligne

#62 Le 15/02/2018, à 11:24

harlog

Re : changement de service sur le disque démon pour recharger des unité

yep j'ai bien corrigé mais maintenant il me dit que j'ai une erreur sur la ligne 20 et 219 d'un autre fichier mais la ligne 20 n'est que le mot

</Directory>

je ne vois pas ou il peut y avoir erreur :

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory "var/www/html">
                Options FollowSymLinks
                AllowOverride all
                Require all granted
                Order allow,deny
                Allow from all
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Hors ligne

#63 Le 15/02/2018, à 14:28

harlog

Re : changement de service sur le disque démon pour recharger des unité

c'est bon ! A force que tu me dise comment faire j'ai réussi à chopé quelque automatisme et j'ai réctifié le truc

test@ip-10-141-60-74:/home$ systemctl status apache2.service
● 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: active (running) since Thu 2018-02-15 13:06:48 UTC; 18min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 9901 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 9925 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
    Tasks: 6
   Memory: 17.2M
      CPU: 157ms
   CGroup: /system.slice/apache2.service
           ├─9943 /usr/sbin/apache2 -k start
           ├─9946 /usr/sbin/apache2 -k start
           ├─9947 /usr/sbin/apache2 -k start
           ├─9948 /usr/sbin/apache2 -k start
           ├─9949 /usr/sbin/apache2 -k start
           └─9950 /usr/sbin/apache2 -k start

la page web ne s'affiche toujours pas quand je tape l'ip du serveur dans l'URL mais au moins je sais que le serveur web tourne que ma base de donnée est la
Merci pour tout à tous et plus particulièrement à toi Bruno pour tout se temps passé à aidé un piètre connaisseur comme moi

Hors ligne