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 27/10/2020, à 11:33

Wiltiph

[Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Bonjour à tous,

Je lance un peu une bouteille à la mer ...
J'utilise depuis plusieurs années le logiciel Dolibarr (Doliweb - Ubuntu 20.04).

Depuis ce matin, impossible de le lancer par la commande que j'avais l'habitude d'utiliser localhost/Dolibarr (j'ai installer des logiciels hier, j'ai l'impression que ça a mis le bazar quelque part!)

J'obtiens le message "502 Bad Gateway nginx/1.18.0 (Ubuntu)" ?, mais chose pour un site internet que j'héberge en local

Le serveur apache semble bien fonctionner, localhost me donne bien un "It works" !

Dolibarr se trouve dans /usr/share/Dolibarr mais je n'arrive pas à le lancer.

Vous auriez une piste pour que j'avance ?

Merci,

Dernière modification par Wiltiph (Le 27/10/2020, à 17:27)

Hors ligne

#2 Le 27/10/2020, à 12:24

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Il semble qu'il ait tout de même un problème avec le serveur apache.

J'ai désinstallé apache2 et en essayant de le réinstaller il me met ça :

Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
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 - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2020-10-27 11:52:28 CET; 4ms ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 7697 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7727]: 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 message
oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7727]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7727]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7727]: no listening sockets available, shutting down
oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7727]: AH00015: Unable to open logs
oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7697]: Action 'start' failed.
oct. 27 11:52:28 wiltiph-System-Product-Name apachectl[7697]: The Apache error log may have more information.
oct. 27 11:52:28 wiltiph-System-Product-Name systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
oct. 27 11:52:28 wiltiph-System-Product-Name systemd[1]: apache2.service: Failed with result 'exit-code'.
oct. 27 11:52:28 wiltiph-System-Product-Name systemd[1]: Failed to start The Apache HTTP Server.

Ca vous dit quelque chose?

Hors ligne

#3 Le 27/10/2020, à 12:29

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Bonjour,

Si tu ne l'utilises pas il faut désinstaller nginx :

sudo apt purge nginx

Apache refuse de démarrer car nginx est déjà en écoute sur le port 80. Si tu veux utiliser deux serveurs web différents, Apache et Nginx, il faut les configurer pour qu'ils soient en écoute sur des ports différents.

Hors ligne

#4 Le 27/10/2020, à 12:51

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Merci, j'avance ...
J'ai également enlevé nginx-common et du coup apache2 semble fonctionner.

Maintenant avec localhost/Dolibarr, l'erreur a changé : 
Not Found
The requested URL was not found on this server.
Apache/2.4.41 (Ubuntu) Server at localhost Port 80

Pareil avec le lancement du site internet local ...

Ce serait pas un problème de configuration ?

Hors ligne

#5 Le 27/10/2020, à 13:08

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Comment Dolibarr a-t-il été installé et où ? Qu'est-ce qui a été fait au niveau de la configuration d'Apache ?

Hors ligne

#6 Le 27/10/2020, à 13:19

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Dolibarr a été installé avec Doliweb et est installé là : /usr/share/Dolibarr

Pour le site Internet Wordpress, il est dans /var/www mais j'ai également la même erreur.

Je n'ai rien fait de spécial pour la configuration d'Apache, je l'ai juste installé.

Hors ligne

#7 Le 27/10/2020, à 13:32

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Je ne sais pas ce qu'est Doliweb…
On va déjà commencer par les retours de :

systemctl status apache2
sudo apache2ctl -t 
sudo apache2ctl -t -D DUMP_VHOSTS

Hors ligne

#8 Le 27/10/2020, à 13:38

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Pour

systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-10-27 12:45:28 CET; 48min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 15154 (apache2)
      Tasks: 55 (limit: 9333)
     Memory: 7.7M
     CGroup: /system.slice/apache2.service
             ├─15154 /usr/sbin/apache2 -k start
             ├─16467 /usr/sbin/apache2 -k start
             └─16468 /usr/sbin/apache2 -k start

oct. 27 12:45:28 wiltiph-System-Product-Name systemd[1]: Starting The Apache HTTP Server...
oct. 27 12:45:28 wiltiph-System-Product-Name apachectl[15153]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the >
oct. 27 12:45:28 wiltiph-System-Product-Name systemd[1]: Started The Apache HTTP Server.
oct. 27 13:00:28 wiltiph-System-Product-Name systemd[1]: Reloading The Apache HTTP Server.
oct. 27 13:00:28 wiltiph-System-Product-Name apachectl[16466]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the >
oct. 27 13:00:28 wiltiph-System-Product-Name systemd[1]: Reloaded The Apache HTTP Server.

Pour

sudo apache2ctl -t 
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 message
Syntax OK

Pour

sudo apache2ctl -t -D DUMP_VHOSTS
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 message
VirtualHost configuration:
*:80                   127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)

Doliweb, c'est juste un installateur spécifique de Dolibarr pour Debian/ubuntu

Hors ligne

#9 Le 27/10/2020, à 13:52

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Ok Apache fonctionne et il n'y a pas d'erreur de configuration.

Maintenant le contenu du fichier /etc/apache2/sites-available/000-default.conf, les autres hôtes virtuels disponibles et les conf disponibles :

cat /etc/apache2/sites-available/000-default.conf
ls -l /etc/apache2/sites-available/
ls -l /etc/apache2/conf-available/

et enfin le contenu dossier /var/www :

ls -l /var/www
ls -l /var/www/html

Hors ligne

#10 Le 27/10/2020, à 14:01

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

cat /etc/apache2/sites-available/000-default.conf

<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

	# 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

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

-rw-r--r-- 1 root root 1332 avril 13  2020 000-default.conf
-rw-r--r-- 1 root root 6338 avril 13  2020 default-ssl.conf
-rw-r--r-- 1 root root  352 mai   14 17:14 wordpress.conf

ls -l /etc/apache2/conf-available/

-rw-r--r-- 1 root root  315 avril 13  2020 charset.conf
-rw-r--r-- 1 root root 1527 mai   12  2015 dolibarr.conf
-rw-r--r-- 1 root root  127 août  11  2013 javascript-common.conf
-rw-r--r-- 1 root root 3224 avril 13  2020 localized-error-pages.conf
-rw-r--r-- 1 root root  189 avril 13  2020 other-vhosts-access-log.conf
lrwxrwxrwx 1 root root   28 mai    7 18:19 phpmyadmin.conf -> ../../phpmyadmin/apache.conf
-rw-r--r-- 1 root root 2174 avril 13  2020 security.conf
-rw-r--r-- 1 root root  455 avril 13  2020 serve-cgi-bin.conf

et enfin le contenu dossier /var/www :

ls -l /var/www

drwxr-xr-x 2 root     root     4096 oct.  27 13:05 html
drwxr-xr-x 5 www-data www-data 4096 oct.  25 12:26 wordpress

ls -l /var/www/html

-rw-r--r-- 1 root root 10918 oct.  27 12:45 index.html

Hors ligne

#11 Le 27/10/2020, à 14:11

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Ok.
Ceci devrait remettre les choses en place :
- on réactive l'hôte virtuel pour Wordpress :

sudo a2ensite wordpress.conf

- on réactive la configuration pour dolibarr :

sudo a2enconf dolibarr.conf

- et au cas où, celle pour phpmyadmin :

sudo a2enconf phpmyadmin.conf

- on relance apache :

sudo systemctl restart apache2

Dernière modification par bruno (Le 27/10/2020, à 14:12)

Hors ligne

#12 Le 27/10/2020, à 14:27

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Euh, ben, je n'ai plus l'erreur du départ mais c'est un peu la carnage ;.), j'obtiens ça :

http://localhost/dolibarr/

* Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2015 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/index.php * \brief Dolibarr home page */ define('NOCSRFCHECK', 1); // This is main home and login page. We must be able to go on it from another web site. require 'main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // If not defined, we select menu "home" $_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ?GETPOST('mainmenu', 'aZ09') : 'home'; $action = GETPOST('action', 'aZ09'); $hookmanager->initHooks(array('index')); /* * Actions */ // Check if company name is defined (first install) if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM)) { header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); exit; } if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled { header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); exit; } if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled) { require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; $zone = GETPOST('areacode', 'aZ09'); $userid = GETPOST('userid', 'int'); $boxorder = GETPOST('boxorder', 'aZ09'); $boxorder .= GETPOST('boxcombo', 'aZ09'); $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid); if ($result > 0) setEventMessages($langs->trans("BoxAdded"), null); } /* * View */ if (!is_object($form)) $form = new Form($db); // Title $title = $langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = $langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE; llxHeader('', $title); $resultboxes = FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) print load_fiche_titre(' ', $resultboxes['selectboxlist'], '', 0, '', 'titleforhome'); if (!empty($conf->global->MAIN_MOTD)) { $conf->global->MAIN_MOTD = preg_replace('//i', '
', $conf->global->MAIN_MOTD); if (!empty($conf->global->MAIN_MOTD)) { $substitutionarray = getCommonSubstitutionArray($langs); complete_substitutions_array($substitutionarray, $langs); $texttoshow = make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs); print "\n\n"; print '
'; print dol_htmlentitiesbr($texttoshow); print '

'; print "\n\n"; } } /* * Dashboard Dolibarr states (statistics) * Hidden for external users */ $boxstatItems = array(); $boxstatFromHook = ''; // Load translation files required by page $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts')); // Load global statistics of objects if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { $object = new stdClass(); $parameters = array(); $action = ''; $reshook = $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $boxstatFromHook = $hookmanager->resPrint; if (empty($reshook)) { // Cle array returned by the method load_state_board for each line $keys = array( 'users', 'members', 'expensereports', 'holidays', 'customers', 'prospects', 'suppliers', 'contacts', 'products', 'services', 'projects', 'proposals', 'orders', 'invoices', 'donations', 'supplier_proposals', 'supplier_orders', 'supplier_invoices', 'contracts', 'interventions', 'ticket' ); // Condition to be checked for each display line dashboard $conditions = array( 'users' => $user->rights->user->user->lire, 'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), 'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), 'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), 'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, 'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire, 'donations' => !empty($conf->don->enabled) && $user->rights->don->lire, 'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire, 'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire, 'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS), 'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS), 'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS), 'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire, 'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire, 'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read, 'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read ); // Class file containing the method load_state_board for each line $includes = array( 'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php", 'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", 'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", 'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", 'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", 'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php", 'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", 'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", 'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", 'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", 'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", 'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php", 'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php", 'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php", 'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php", 'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php", 'supplier_proposals' =>

Bon, j'ai pas tout mis ...

http://localhost/wordpress
J'ai la même erreur Not Found
The requested URL was not found on this server.
Apache/2.4.41 (Ubuntu) Server at localhost Port 80

Hors ligne

#13 Le 27/10/2020, à 14:35

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

C'est parce que tu as mis le bazar en désinstallant complètement apache et en réinstallant, sans doute sans suivre la doc lamp
D'abord dolibarr :

sudo apt install libapache2-mod-php

et

sudo systemctl restart apache2

Pour Wordpress il faudra montrer le contenu du fichier /etc/apache2/sites-available/wordpress.conf

Hors ligne

#14 Le 27/10/2020, à 14:46

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Je n'ai pas compris, il faut que je fasse quoi par rapport à  Lamp ? Dans quel ordre je dois faire les choses?

Pour le fichier de wordpress, voilà ce que j'ai dedans :

<VirtualHost *:80>
        ServerName wordpress
        DocumentRoot /var/www/wordpress
        <Directory /var/www/wordpress>
                AllowOverride all
                Require all granted
        </Directory>
        ErrorLog /var/log/apache2/error.wordpress.log
        CustomLog /var/log/apache2/access.wordpress.log combined
</VirtualHost>

Merci de ta patience ...

Hors ligne

#15 Le 27/10/2020, à 14:50

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

D'abord les deux commandes que j'ai indiquées.
Et regarder ensuite si dolibarr fonctionne.

Dernière modification par bruno (Le 27/10/2020, à 14:52)

Hors ligne

#16 Le 27/10/2020, à 14:54

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

sudo apt install libapache2-mod-php

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
libapache2-mod-php est déjà la version la plus récente (2:7.4+75).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 18 non mis à jour.

sudo systemctl restart apache2
Il ne se passe rien ...

Pas de changement en terme de résultat localhost

Hors ligne

#17 Le 27/10/2020, à 14:57

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Il faut donc essayer ceci :

sudo a2enmod php7.4

Hors ligne

#18 Le 27/10/2020, à 15:00

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Ah bah là y a un soucis ...

Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.4, aborting

Hors ligne

#19 Le 27/10/2020, à 15:32

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Je m'en doutais. On progresse wink
Et donc :

sudo a2dismod mpm_worker

suivi de

sudo a2enmod mpm_prefork

puis :

sudo a2enmod php7.4

redémarrage d'Apache et test de dolibarr.

Dernière modification par bruno (Le 27/10/2020, à 15:40)

Hors ligne

#20 Le 27/10/2020, à 15:44

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Du coup, j'ai fait
sudo a2dismod mpm_worker

mais aussi sudo a2dismod mpm_event (ca semblait poser problème aussi)

ensuite sudo a2enmod mpm_prefork

Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Enabling module mpm_prefork.
To activate the new configuration, you need to run:
  systemctl restart apache2

ensuite systemctl restart apache2

puis sudo a2enmod php7.4

Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Enabling module php7.4.
To activate the new configuration, you need to run:
  systemctl restart apache2

puis systemctl restart apache2

A priori rien de changer sur localhost ...

Hors ligne

#21 Le 27/10/2020, à 15:56

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Normalement c'est bon, pour être sûr, montre-nous le retour de :

sudo apache2ctl -M

Que vois-tu maintenant si tu vas sur http://localhost/dolibarr ?

Dernière modification par bruno (Le 27/10/2020, à 15:58)

Hors ligne

#22 Le 27/10/2020, à 15:59

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

sudo apache2ctl -M

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 message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 setenvif_module (shared)
 status_module (shared)

Hors ligne

#23 Le 27/10/2020, à 16:01

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

C'est correct.
Que vois-tu maintenant sur http://localhost/dolibarr ?

Hors ligne

#24 Le 27/10/2020, à 16:10

Wiltiph

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Bah ça n'a pas évolué :

* Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2015 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/index.php * \brief Dolibarr home page */ define('NOCSRFCHECK', 1); // This is main home and login page. We must be able to go on it from another web site. require 'main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // If not defined, we select menu "home" $_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ?GETPOST('mainmenu', 'aZ09') : 'home'; $action = GETPOST('action', 'aZ09'); $hookmanager->initHooks(array('index')); /* * Actions */ // Check if company name is defined (first install) if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM)) { header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); exit; } if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled { header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); exit; } if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled) { require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; $zone = GETPOST('areacode', 'aZ09'); $userid = GETPOST('userid', 'int'); $boxorder = GETPOST('boxorder', 'aZ09'); $boxorder .= GETPOST('boxcombo', 'aZ09'); $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid); if ($result > 0) setEventMessages($langs->trans("BoxAdded"), null); } /* * View */ if (!is_object($form)) $form = new Form($db); // Title $title = $langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = $langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE; llxHeader('', $title); $resultboxes = FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) print load_fiche_titre(' ', $resultboxes['selectboxlist'], '', 0, '', 'titleforhome'); if (!empty($conf->global->MAIN_MOTD)) { $conf->global->MAIN_MOTD = preg_replace('//i', '
', $conf->global->MAIN_MOTD); if (!empty($conf->global->MAIN_MOTD)) { $substitutionarray = getCommonSubstitutionArray($langs); complete_substitutions_array($substitutionarray, $langs); $texttoshow = make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs); print "\n\n"; print '
'; print dol_htmlentitiesbr($texttoshow); print '

'; print "\n\n"; } } /* * Dashboard Dolibarr states (statistics) * Hidden for external users */ $boxstatItems = array(); $boxstatFromHook = ''; // Load translation files required by page $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts')); // Load global statistics of objects if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { $object = new stdClass(); $parameters = array(); $action = ''; $reshook = $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $boxstatFromHook = $hookmanager->resPrint; if (empty($reshook)) { // Cle array returned by the method load_state_board for each line $keys = array( 'users', 'members', 'expensereports', 'holidays', 'customers', 'prospects', 'suppliers', 'contacts', 'products', 'services', 'projects', 'proposals', 'orders', 'invoices', 'donations', 'supplier_proposals', 'supplier_orders', 'supplier_invoices', 'contracts', 'interventions', 'ticket' ); // Condition to be checked for each display line dashboard $conditions = array( 'users' => $user->rights->user->user->lire, 'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), 'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), 'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), 'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, 'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire, 'donations' => !empty($conf->don->enabled) && $user->rights->don->lire, 'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire, 'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire, 'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS), 'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS), 'supplier_proposals' => 

Et pour localhost/wordpress ça donne Not found ...

Hors ligne

#25 Le 27/10/2020, à 16:18

bruno

Re : [Résolu] Problème accès Dolibarr localhost 502 Bad Gateway

Pourtant cela devrait fonctionner hmm
Crée un fichier index.php dans le répertoire par défaut pour localhost :

sudo nano /var/www/html/info.php

et tu y colles ceci :

<?php
  phpinfo();
?>

Puis tu regardes sur http://localhost/info.php

Hors ligne