Hello,
je trouve ce tuto : Debian 11 Bullseye : installer et configurer la dernière version de PHP 8 FPM avec Nginx | Geek17.com
J’essaye de le suivre à partir de :
« Configuration de PHP 8.0 FPM »
– en changeant 8.0 en 8.3
– quand il est question de nano, j’ouvre le fichier en mode superutilisateur, et j’écris ce qu’il faut au fichier,
Mais quand j’arrive à ce stade :
sudo service php8.0-fpm restart
sudo service nginx restart
ça ne marche pas.
journalctl -xeu nginx.service
░░ L'unité (unit) nginx.service a commencé à démarrer.
2024/10/14 23:15:42 [emerg] 5892#5892: "root" directive is duplicate in /etc/nginx/sites-enabled/default:58
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx.service: Control process exited, code=exited, status=1/FAILURE
Ah zut, je refais en mettant 8.3 :
sudo service php8.3-fpm restart
sudo service nginx restart
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
Pas mieux.
Et si j’essaye à FF le fichier phpinfo.php, <?php phpinfo();
: page blanche et le terminal ouvre le fichier…
Je tente les 2 commandes au Terminal :
systemctl status nginx.service
× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-10-14 23:38:11 CEST; 8min ago
Duration: 15min 53.333s
Docs: man:nginx(8)
Process: 8847 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 5ms
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
oct. 14 23:38:11 did-ThinkPad-Yoga-260 nginx[8847]: 2024/10/14 23:38:11 [emerg] 8847#8847: "root" directive is duplicate in /etc/nginx/sites-enabled/default:58
oct. 14 23:38:11 did-ThinkPad-Yoga-260 nginx[8847]: nginx: configuration file /etc/nginx/nginx.conf test failed
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: nginx.service: Failed with result 'exit-code'.
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
root@did-ThinkPad-Yoga-260:~# journalctl -xeu nginx.service
░░ L'unité (unit) nginx.service a commencé à démarrer.
oct. 14 23:38:11 did-ThinkPad-Yoga-260 nginx[8847]: 2024/10/14 23:38:11 [emerg] 8847#8847: "root" directive is duplicate in /etc/nginx/sites-enabled/default:58
oct. 14 23:38:11 did-ThinkPad-Yoga-260 nginx[8847]: nginx: configuration file /etc/nginx/nginx.conf test failed
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStartPre= process belonging to unit nginx.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: nginx.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit nginx.service has entered the 'failed' state with result 'exit-code'.
oct. 14 23:38:11 did-ThinkPad-Yoga-260 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
░░ Subject: L'unité (unit) nginx.service a échoué
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ L'unité (unit) nginx.service a échoué, avec le résultat failed.
Bon, pas simple, tuto pas adapté à la version php que j’ai là.
C’est bizarre, de ne pas trouver de tuto pour ce qui est récent… Bon, tant pis…