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 25/02/2018, à 13:20

maximebh

[RESOLU]Erreur 403 forbidden, installation d'apache2

Bonjour,

J'essaie depuis maintenant un petit moment d'installer Apache2 (ainsi que php, MySql et phpMyAdmin) sur mon ordinateur qui est sous Ubuntu 16.04LTS. J'ai donc commencer par rentré (comme indiqué sur un tuto : le tuto en question) la commande suivante dans le terminal :

sudo apt install apache2

. Or l'or de l'installation (je ne m'y connais pas trop donc je ne pourrais pas vous dire à quelle niveau est l'erreur), j'ai remarqué trois lignes en rouge, il s'agissait des lignes suivantes

Active: failed (Result: exit-code) since dim. 2018-02-25 12:47:36 CET; 5ms ago

Process: 6018 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

et

févr. 25 12:47:36 xavier systemd[1]: Failed to start LSB: Apache2 web server.

. L'installation c'est fini sans autre difficulté, sauf quand j'ai tappé localhost dans mon navigateur (c'est firefox) où une erreur "403 Forbidden" est apparue avec marqué sur la page :

"

Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


"
Pouvez-vous m'éclairer sur la cause de cette erreur et si possible me donner une solution?

Merci d'avance

Max

ps: je vous mets tous le retour de ma commande au cas où !!
:

xavier@xavier:~$sudo apt install apache2
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  baloo-kf5 catdoc dbconfig-common filezilla-common icc-profiles-free janino java-wrappers kdebase-runtime kinit kio libavalon-framework-java
  libbcmail-java libbcpkix-java libbcprov-java libcommons-io-java libdolphinvcs5 libepub0 libevent-core-2.0-5 libfilezilla0 libfontbox-java
  libitext-java libjanino-java libjanino-java-doc libjava3d-java libjava3d-jni libjs-sphinxdoc libjs-underscore libkf5baloo5 libkf5balooengine5
  libkf5baloowidgets-bin libkf5baloowidgets5 libkf5bookmarks-data libkf5bookmarks5 libkf5filemetadata-bin libkf5filemetadata-data
  libkf5filemetadata3 libkf5gpgmepp5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiofilewidgets5 libkf5kiontlm5 libkf5newstuff-data
  libkf5newstuff5 libkf5parts-data libkf5parts-plugins libkf5parts5 libkf5solid5 libkf5solid5-data libkf5wallet-bin libkf5wallet-data
  libkf5wallet5 libkonq-common libkonq5-templates libkwalletbackend5-5 liblmdb0 libmcrypt4 libpugixml1v5 libsunflow-java libvecmath-java
  libzip4 linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-headers-4.4.0-97
  linux-headers-4.4.0-97-generic linux-headers-4.4.0-98 linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic
  linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic linux-image-4.4.0-109-generic linux-image-4.4.0-97-generic
  linux-image-4.4.0-98-generic linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic linux-image-extra-4.4.0-104-generic
  linux-image-extra-4.4.0-109-generic linux-image-extra-4.4.0-97-generic linux-image-extra-4.4.0-98-generic sweethome3d-furniture
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils
Paquets suggérés :
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
Les NOUVEAUX paquets suivants seront installés :
  apache2 apache2-bin apache2-data apache2-utils
0 mis à jour, 4 nouvellement installés, 0 à enlever et 4 non mis à jour.
Il est nécessaire de prendre 1 255 ko dans les archives.
Après cette opération, 5 403 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] 
Réception de:1 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 apache2-bin amd64 2.4.18-2ubuntu3.5 [925 kB]
Réception de:2 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 apache2-utils amd64 2.4.18-2ubuntu3.5 [82,3 kB]
Réception de:3 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 apache2-data all 2.4.18-2ubuntu3.5 [162 kB]
Réception de:4 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 apache2 amd64 2.4.18-2ubuntu3.5 [86,7 kB]
1 255 ko réceptionnés en 3s (330 ko/s)
Sélection du paquet apache2-bin précédemment désélectionné.
(Lecture de la base de données... 526963 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../apache2-bin_2.4.18-2ubuntu3.5_amd64.deb ...
Dépaquetage de apache2-bin (2.4.18-2ubuntu3.5) ...
Sélection du paquet apache2-utils précédemment désélectionné.
Préparation du dépaquetage de .../apache2-utils_2.4.18-2ubuntu3.5_amd64.deb ...
Dépaquetage de apache2-utils (2.4.18-2ubuntu3.5) ...
Sélection du paquet apache2-data précédemment désélectionné.
Préparation du dépaquetage de .../apache2-data_2.4.18-2ubuntu3.5_all.deb ...
Dépaquetage de apache2-data (2.4.18-2ubuntu3.5) ...
Sélection du paquet apache2 précédemment désélectionné.
Préparation du dépaquetage de .../apache2_2.4.18-2ubuntu3.5_amd64.deb ...
Dépaquetage de apache2 (2.4.18-2ubuntu3.5) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.5-1) ...
Traitement des actions différées (« triggers ») pour systemd (229-4ubuntu21.1) ...
Traitement des actions différées (« triggers ») pour ureadahead (0.100.0-19) ...
Traitement des actions différées (« triggers ») pour ufw (0.35-0ubuntu2) ...
Paramétrage de apache2-bin (2.4.18-2ubuntu3.5) ...
Paramétrage de apache2-utils (2.4.18-2ubuntu3.5) ...
Paramétrage de apache2-data (2.4.18-2ubuntu3.5) ...
Paramétrage de apache2 (2.4.18-2ubuntu3.5) ...
insserv: warning: script 'K01showfsck' missing LSB tags and overrides
insserv: warning: script 'showfsck' missing LSB tags and overrides
insserv: warning: script 'K01showfsck' missing LSB tags and overrides
insserv: warning: script 'showfsck' missing LSB tags and overrides
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● 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 dim. 2018-02-25 12:47:36 CET; 5ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6018 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

févr. 25 12:47:36 xavier apache2[6018]:  *
févr. 25 12:47:36 xavier apache2[6018]:  * The apache2 configtest failed.
févr. 25 12:47:36 xavier apache2[6018]: Output of config test was:
févr. 25 12:47:36 xavier apache2[6018]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et...irectory
févr. 25 12:47:36 xavier apache2[6018]: Action 'configtest' failed.
févr. 25 12:47:36 xavier apache2[6018]: The Apache error log may have more information.
févr. 25 12:47:36 xavier systemd[1]: apache2.service: Control process exited, code=exited status=1
févr. 25 12:47:36 xavier systemd[1]: Failed to start LSB: Apache2 web server.
févr. 25 12:47:36 xavier systemd[1]: apache2.service: Unit entered failed state.
févr. 25 12:47:36 xavier systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.

Dernière modification par maximebh (Le 26/02/2018, à 14:31)

Hors ligne

#2 Le 25/02/2018, à 14:02

bruno

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Le démarrage d'Apache a échoué à cause d'une rreur dans les fichiers de configuration :

févr. 25 12:47:36 xavier apache2[6018]:  * The apache2 configtest failed.
févr. 25 12:47:36 xavier apache2[6018]: Output of config test was:
févr. 25 12:47:36 xavier apache2[6018]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et...irectory

Tu dois avoir des traces dune ancienne installation avec des bidouillages malheureux dans les fichiers de con d'apache. Le plus simple est de repartir d'une configuration vierge :

sudo apt purge apache*

Puis tu essaies de réinstaller.

En ligne

#3 Le 25/02/2018, à 14:21

maximebh

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Merci beaucoup pour ta réponse aussi rapide !!
J'ai donc fait

sudo purge apache*

, la commande m'a renvoyée ceci :

xavier@xavier:~$ sudo apt purge apache*
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Note, selecting 'apache-perl' for glob 'apache*'
Note, selecting 'apache-ssl' for glob 'apache*'
Note, selecting 'apache2-mpm-prefork' for glob 'apache*'
Note, selecting 'apache2.2-common' for glob 'apache*'
Note, selecting 'apache2-suexec-pristine' for glob 'apache*'
Note, selecting 'apachetop' for glob 'apache*'
Note, selecting 'apache2-api-20120211' for glob 'apache*'
Note, selecting 'apache2-data' for glob 'apache*'
Note, selecting 'apache-openid' for glob 'apache*'
Note, selecting 'apache' for glob 'apache*'
Note, selecting 'apache2-suexec' for glob 'apache*'
Note, selecting 'apacheds' for glob 'apache*'
Note, selecting 'apache2-bin' for glob 'apache*'
Note, selecting 'apache2.2-bin' for glob 'apache*'
Note, selecting 'apache2-dbg' for glob 'apache*'
Note, selecting 'apache2-dev' for glob 'apache*'
Note, selecting 'apache2-doc' for glob 'apache*'
Note, selecting 'apache2-suexec-custom' for glob 'apache*'
Note, selecting 'apache2' for glob 'apache*'
Note, selecting 'apache2-utils' for glob 'apache*'
Note, selecting 'apache2-mpm-itk' for glob 'apache*'
Note, selecting 'apachedex' for glob 'apache*'
Le paquet « apache2.2-bin » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2.2-common » n'est pas installé, et ne peut donc être supprimé
Note : sélection de « apache2-bin » au lieu de « apache2-api-20120211 »
Le paquet « apache » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache-ssl » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache-perl » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-mpm-itk » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache-openid » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-mpm-prefork » n'est pas installé, et ne peut donc être supprimé
Le paquet « apachedex » n'est pas installé, et ne peut donc être supprimé
Le paquet « apacheds » n'est pas installé, et ne peut donc être supprimé
Le paquet « apachetop » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-dbg » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-dev » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-doc » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-suexec-custom » n'est pas installé, et ne peut donc être supprimé
Le paquet « apache2-suexec-pristine » n'est pas installé, et ne peut donc être supprimé
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  baloo-kf5 catdoc dbconfig-common filezilla-common icc-profiles-free janino java-wrappers kdebase-runtime kinit kio libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap libavalon-framework-java libbcmail-java libbcpkix-java libbcprov-java libcommons-io-java
  libdbusmenu-qt2:i386 libdolphinvcs5 libepub0 libevent-core-2.0-5 libfilezilla0 libfontbox-java libitext-java libjanino-java
  libjanino-java-doc libjava3d-java libjava3d-jni libjs-sphinxdoc libjs-underscore libkf5baloo5 libkf5balooengine5 libkf5baloowidgets-bin
  libkf5baloowidgets5 libkf5bookmarks-data libkf5bookmarks5 libkf5filemetadata-bin libkf5filemetadata-data libkf5filemetadata3 libkf5gpgmepp5
  libkf5kcmutils-data libkf5kcmutils5 libkf5kiofilewidgets5 libkf5kiontlm5 libkf5newstuff-data libkf5newstuff5 libkf5parts-data
  libkf5parts-plugins libkf5parts5 libkf5solid5 libkf5solid5-data libkf5wallet-bin libkf5wallet-data libkf5wallet5 libkonq-common
  libkonq5-templates libkwalletbackend5-5 liblmdb0 liblua5.1-0 libpugixml1v5 libsunflow-java libvecmath-java linux-headers-4.4.0-101
  linux-headers-4.4.0-101-generic linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic linux-headers-4.4.0-104
  linux-headers-4.4.0-104-generic linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-headers-4.4.0-97 linux-headers-4.4.0-97-generic
  linux-headers-4.4.0-98 linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic linux-image-4.4.0-103-generic
  linux-image-4.4.0-104-generic linux-image-4.4.0-109-generic linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic
  linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic linux-image-extra-4.4.0-104-generic
  linux-image-extra-4.4.0-109-generic linux-image-extra-4.4.0-97-generic linux-image-extra-4.4.0-98-generic mysql-client-5.7
  mysql-client-core-5.7 mysql-common mysql-server-core-5.7 php7.0 php7.0-cli php7.0-fpm php7.0-opcache php7.0-readline sni-qt:i386
  sweethome3d-furniture
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les paquets suivants seront ENLEVÉS :
  apache2* apache2-bin* apache2-data* apache2-utils*
0 mis à jour, 0 nouvellement installés, 4 à enlever et 4 non mis à jour.
Après cette opération, 5 403 ko d'espace disque seront libérés.
Souhaitez-vous continuer ? [O/n] 
(Lecture de la base de données... 527677 fichiers et répertoires déjà installés.)
Suppression de apache2 (2.4.18-2ubuntu3.5) ...
Purge des fichiers de configuration de apache2 (2.4.18-2ubuntu3.5) ...
insserv: warning: script 'K01showfsck' missing LSB tags and overrides
insserv: warning: script 'showfsck' missing LSB tags and overrides
insserv: warning: script 'K01showfsck' missing LSB tags and overrides
insserv: warning: script 'showfsck' missing LSB tags and overrides
dpkg : avertissement : lors de la suppression de apache2, le répertoire « /var/www/html » n'était pas vide, donc il n'a pas été supprimé
Suppression de apache2-bin (2.4.18-2ubuntu3.5) ...
Suppression de apache2-data (2.4.18-2ubuntu3.5) ...
Suppression de apache2-utils (2.4.18-2ubuntu3.5) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.5-1) ...
Traitement des actions différées (« triggers ») pour ufw (0.35-0ubuntu2) ...

Il n'y a aucun problème apparent (enfin je crois), quand je (re)fais

sudo apt install apache2

le terminal m'a renvoyé ceci :

xavier@xavier:~$ sudo apt install apache2
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  baloo-kf5 catdoc dbconfig-common filezilla-common icc-profiles-free janino java-wrappers kdebase-runtime kinit kio libavalon-framework-java
  libbcmail-java libbcpkix-java libbcprov-java libcommons-io-java libdbusmenu-qt2:i386 libdolphinvcs5 libepub0 libevent-core-2.0-5
  libfilezilla0 libfontbox-java libitext-java libjanino-java libjanino-java-doc libjava3d-java libjava3d-jni libjs-sphinxdoc libjs-underscore
  libkf5baloo5 libkf5balooengine5 libkf5baloowidgets-bin libkf5baloowidgets5 libkf5bookmarks-data libkf5bookmarks5 libkf5filemetadata-bin
  libkf5filemetadata-data libkf5filemetadata3 libkf5gpgmepp5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiofilewidgets5 libkf5kiontlm5
  libkf5newstuff-data libkf5newstuff5 libkf5parts-data libkf5parts-plugins libkf5parts5 libkf5solid5 libkf5solid5-data libkf5wallet-bin
  libkf5wallet-data libkf5wallet5 libkonq-common libkonq5-templates libkwalletbackend5-5 liblmdb0 libpugixml1v5 libsunflow-java libvecmath-java
  linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic linux-headers-4.4.0-104
  linux-headers-4.4.0-104-generic linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-headers-4.4.0-97 linux-headers-4.4.0-97-generic
  linux-headers-4.4.0-98 linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic linux-image-4.4.0-103-generic
  linux-image-4.4.0-104-generic linux-image-4.4.0-109-generic linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic
  linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic linux-image-extra-4.4.0-104-generic
  linux-image-extra-4.4.0-109-generic linux-image-extra-4.4.0-97-generic linux-image-extra-4.4.0-98-generic mysql-client-5.7
  mysql-client-core-5.7 mysql-common mysql-server-core-5.7 php7.0 php7.0-cli php7.0-fpm php7.0-opcache php7.0-readline sni-qt:i386
  sweethome3d-furniture
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils
Paquets suggérés :
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
Les NOUVEAUX paquets suivants seront installés :
  apache2 apache2-bin apache2-data apache2-utils
0 mis à jour, 4 nouvellement installés, 0 à enlever et 4 non mis à jour.
Il est nécessaire de prendre 0 o/1 255 ko dans les archives.
Après cette opération, 5 403 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] 
Sélection du paquet apache2-bin précédemment désélectionné.
(Lecture de la base de données... 527034 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../apache2-bin_2.4.18-2ubuntu3.5_amd64.deb ...
Dépaquetage de apache2-bin (2.4.18-2ubuntu3.5) ...
Sélection du paquet apache2-utils précédemment désélectionné.
Préparation du dépaquetage de .../apache2-utils_2.4.18-2ubuntu3.5_amd64.deb ...
Dépaquetage de apache2-utils (2.4.18-2ubuntu3.5) ...
Sélection du paquet apache2-data précédemment désélectionné.
Préparation du dépaquetage de .../apache2-data_2.4.18-2ubuntu3.5_all.deb ...
Dépaquetage de apache2-data (2.4.18-2ubuntu3.5) ...
Sélection du paquet apache2 précédemment désélectionné.
Préparation du dépaquetage de .../apache2_2.4.18-2ubuntu3.5_amd64.deb ...
Dépaquetage de apache2 (2.4.18-2ubuntu3.5) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.5-1) ...
Traitement des actions différées (« triggers ») pour systemd (229-4ubuntu21.1) ...
Traitement des actions différées (« triggers ») pour ureadahead (0.100.0-19) ...
Traitement des actions différées (« triggers ») pour ufw (0.35-0ubuntu2) ...
Paramétrage de apache2-bin (2.4.18-2ubuntu3.5) ...
Paramétrage de apache2-utils (2.4.18-2ubuntu3.5) ...
Paramétrage de apache2-data (2.4.18-2ubuntu3.5) ...
Paramétrage de apache2 (2.4.18-2ubuntu3.5) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
insserv: warning: script 'K01showfsck' missing LSB tags and overrides
insserv: warning: script 'showfsck' missing LSB tags and overrides
insserv: warning: script 'K01showfsck' missing LSB tags and overrides
insserv: warning: script 'showfsck' missing LSB tags and overrides
Traitement des actions différées (« triggers ») pour systemd (229-4ubuntu21.1) ...
Traitement des actions différées (« triggers ») pour ureadahead (0.100.0-19) ...
Traitement des actions différées (« triggers ») pour ufw (0.35-0ubuntu2) ...

Aucun problème sauf quand j'ai voulu accédé à localhost où j'ai toujours la même erreur ("403 forbidden").
Donc je pense qu'il y a autre chose qui pose problème.

Merci d'avance

Hors ligne

#4 Le 25/02/2018, à 15:48

bruno

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Pour voir si apache est bien lancé, le retour de :

sudo systemctl status apache2

Pour voir les droits d'accès sur le dossier racine par défaut :

sudo ls -al /var/www/html

En ligne

#5 Le 25/02/2018, à 16:13

maximebh

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Le retour de

sudo systemctl status apache2
xavier@xavier:~$ sudo systemctl status apache2
● 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: inactive (dead) since dim. 2018-02-25 14:17:49 CET; 1h 53min ago
     Docs: man:systemd-sysv-generator(8)

févr. 25 14:17:49 xavier apache2[17201]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
févr. 25 14:17:49 xavier apache2[17201]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
févr. 25 14:17:49 xavier apache2[17201]: no listening sockets available, shutting down
févr. 25 14:17:49 xavier apache2[17201]: AH00015: Unable to open logs
févr. 25 14:17:49 xavier apache2[17201]: Action 'start' failed.
févr. 25 14:17:49 xavier apache2[17201]: The Apache error log may have more information.
févr. 25 14:17:49 xavier apache2[17201]:  *
févr. 25 14:17:49 xavier apache2[17225]:  * Stopping Apache httpd web server apache2
févr. 25 14:17:49 xavier apache2[17225]:  *
févr. 25 14:17:49 xavier systemd[1]: Started LSB: Apache2 web server.

et de

sudo ls -al /var/www/html
xavier@xavier:~$ sudo ls -al /var/www/html
[sudo] Mot de passe de xavier : 
total 24
drwxr-xr-x 2 root root  4096 févr. 25 16:11 .
drwxr-xr-x 3 root root  4096 nov.   3 19:20 ..
-rw-r--r-- 1 root root 11321 févr. 25 14:08 index.html
-rw-r--r-- 1 root root    22 févr. 25 12:43 test.php

Merci d'avance

Hors ligne

#6 Le 25/02/2018, à 19:59

bruno

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Tu as déjà un serveur en écoute sur le port 80 :

févr. 25 14:17:49 xavier apache2[17201]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

Pour l'identifier il nous faut le retour de :

sudo netstat -tnlp

En ligne

#7 Le 25/02/2018, à 20:20

maximebh

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Ok (je vais pas te mentir je suis un peu perdu !! ) Mais tiens voici le retour de

sudo netstat -tnlp
xavier@xavier:~$ sudo netstat -tnlp
[sudo] Mot de passe de xavier : 
Désolé, essayez de nouveau.
[sudo] Mot de passe de xavier : 
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1282/sshd       
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      7093/cupsd      
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1988/master     
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      2899/dropbox    
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1926/smbd       
tcp        0      0 127.0.0.1:6463          0.0.0.0:*               LISTEN      22936/app.asar --no
tcp        0      0 127.0.0.1:17600         0.0.0.0:*               LISTEN      2899/dropbox    
tcp        0      0 127.0.0.1:17603         0.0.0.0:*               LISTEN      2899/dropbox    
tcp        0      0 127.0.0.1:6342          0.0.0.0:*               LISTEN      3602/megasync   
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      1926/smbd       
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      2089/dnsmasq    
tcp6       0      0 :::22                   :::*                    LISTEN      1282/sshd       
tcp6       0      0 ::1:631                 :::*                    LISTEN      7093/cupsd      
tcp6       0      0 :::25                   :::*                    LISTEN      1988/master     
tcp6       0      0 :::443                  :::*                    LISTEN      18808/httpd     
tcp6       0      0 :::17500                :::*                    LISTEN      2899/dropbox    
tcp6       0      0 :::445                  :::*                    LISTEN      1926/smbd       
tcp6       0      0 :::3306                 :::*                    LISTEN      9564/mysqld     
tcp6       0      0 :::139                  :::*                    LISTEN      1926/smbd       
tcp6       0      0 :::80                   :::*                    LISTEN      18808/httpd     
tcp6       0      0 :::21                   :::*                    LISTEN      9439/proftpd: (acce

Merci encore pour le temps que tu prends pour moi

Hors ligne

#8 Le 26/02/2018, à 09:05

bruno

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Tu as bien un service httpd en écoute sur les ports 80 et 443. Tu dois savoir ce que tu as installé précédemment et qui correspond à ce service.

En ligne

#9 Le 26/02/2018, à 13:09

maximebh

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Merci beaucoup, j'ai trouvé, il s'agissait d'un logiciel de transfert ftp (c’était gftp), du coup, je l'ai désinstallé et tous fonctionne, mais parce contre je n'ai plus de logiciel pour transférer mes fichiers vers mon hébergeur, il n'y a pas moyen de faire cohabiter les deux ? (apache2 et gftp ?)

Merci encore

Hors ligne

#10 Le 26/02/2018, à 13:36

bruno

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

J'ai du mal à comprendre…De ce que je sais gftp est un client FTP, pas un serveur. De toute façon un serveur FTP n'utilise pas les ports http et https (80 et 443).

En ligne

#11 Le 26/02/2018, à 13:41

maximebh

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Je ne comprend pas plus que toi !! smile,  j'ai désinstallé ce logiciel et quand je tape localhost sur mon navigateur je tombe bien sur la page attendus, donc est ce que ce logiciel comprend également d'autre fonctionnalité qui utilise ces ports ? je ne sais pas !!

Hors ligne

#12 Le 26/02/2018, à 13:45

bruno

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

À mon avis c'est un hasard, gftp n'a rien à voir avec un serveur web. Tu dois pouvoir le réinstaller sans problème.

En ligne

#13 Le 26/02/2018, à 13:50

maximebh

Re : [RESOLU]Erreur 403 forbidden, installation d'apache2

Tu as tous a fait raison !! Je viens de le réinstaller et tous fonctionne parfaitement mais par contre je ne comprend pas comment apache2 peux marcher alors que je n'ai fais aucune modification ni installer ni désinstaller quoi que ce soit !! Merci encore

Hors ligne