What type of hardware are you using: Raspberry Pi 3, 4+ What YunoHost version are you running: 12.1.39 How are you able to access your server: SSH Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: Update/mise à jour
Describe your issue
Salut,
j’ai lancé une mise à jour, j’ai voulu utilisé utilisé la dernière version de Nginx (malgré qu’il était recommandé de dire non, je pense que c’est mon erreur) et depuis tout est pété (cf retours ci dessous).
J’ai tenté un apt --fix-broken install mais ça m’a renvoyé:
Starting nginx.service - A high performance web server and a reverse proxy server…
2026/06/06 11:53:40 [emerg] 2735#2735: “fastcgi_index” directive is duplicate in /etc/nginx/fastcgi_params_with_auth:1
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx.service: Control process exited, code=exited, status=1/FAILURE
nginx.service: Failed with result ‘exit-code’.
Failed to start nginx.service - A high performance web server and a reverse proxy server.
dpkg: error processing package nginx (–configure):
installed nginx package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Depuis je ne peux accéder au serveur que par SSH.
Il faut que je réinstalle tout ou une commande peut me sauver?
Share relevant logs or error messages
Configuration file ‘/etc/nginx/fastcgi_params’
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer’s version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** fastcgi_params (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/nginx/fastcgi_params …
Installing new version of config file /etc/nginx/proxy_params …
Installing new version of config file /etc/nginx/scgi_params …
Installing new version of config file /etc/nginx/uwsgi_params …
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
(Reading database … 110786 files and directories currently installed.)
Preparing to unpack …/nginx_1.22.1-9+deb12u7_arm64.deb …
Unpacking nginx (1.22.1-9+deb12u7) over (1.22.1-9+deb12u4) …
Setting up nginx (1.22.1-9+deb12u7) …
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.
invoke-rc.d: initscript nginx, action “start” failed.
× 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 Sat 2026-06-06 11:43:15 BST; 7ms ago
Duration: 3w 4d 15h 32min 53.285s
Docs: man:nginx(8)
Process: 1741236 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 30ms
Je dirais celui-ci: fastcgi_params.dpkg-old
Sur une machine version: 12.1.40.1
/etc/nginx/fastcgi_params
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param REMOTE_USER $http_ynh_user if_not_empty;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
# !!! Security workaround !!!
# Do not use HTTP_HOST as "$http_host".
#
# "$http_host" is the Host header exactly as supplied by the client.
# This is unsafe when a client sends an absolute-form request target together
# with a different Host header, for example:
#
# GET https://example.com/ HTTP/1.1
# Host: malformedhost
#
# In such a case, passing "$http_host" upstream exposes the raw client-supplied
# Host value ("malformedhost") to the backend application, even though it does
# not match the effective request target. Applications often use HTTP_HOST for
# redirects, absolute URL generation, virtual host routing, or security checks;
# forwarding the raw Host header can therefore lead to incorrect or unsafe
# behaviour.
#
# Newer nginx versions (since 1.30.0) introduce variables "$is_request_port" and
# "$request_port", allowing HTTP_HOST to be constructed as:
# $host$is_request_port$request_port
#
# In stable/oldstable packages we use "$host" as a security workaround.
# It avoids forwarding an untrusted raw Host header to the backend.
#
# Note: this changes behaviour compared to previous versions, because "$host"
# does not preserve the client-supplied port, while "$http_host" typically
# does. Existing deployments that rely on "$http_host" containing a port number
# may therefore break or behave differently after this change.
fastcgi_param HTTP_HOST $host;
Cool merci
Donc je copie tout ce qu’il y a dans fastcgi_params.dpkg-old et je le colle dans /etc/nginx/fastcgi_params c’est bien ça?
(désolé si ma demande est stupide mais je préfère vérifier avant de faire une bétise)
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.
× 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 Sat 2026-06-06 15:54:31 BST; 48s ago
Docs: man:nginx(8)
Process: 3147 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 40ms
Jun 06 15:54:31 nomdedomaine systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server…
Jun 06 15:54:31 nomdedomaine nginx[3147]: 2026/06/06 15:54:31 [emerg] 3147#3147: “fastcgi_index” directive is duplicate in /etc/nginx/fastcgi_params_with_auth:1
Jun 06 15:54:31 nomdedomaine nginx[3147]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 06 15:54:31 nomdedomaine systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 06 15:54:31 nomdedomaine systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jun 06 15:54:31 nomdedomaine systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
systemctl status nginx
× 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 Sat 2026-06-06 15:54:31 BST; 5min ago
Docs: man:nginx(8)
Process: 3147 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 40ms
Jun 06 15:54:31 nomdedomaine systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server…
Jun 06 15:54:31 nomdedomaine nginx[3147]: 2026/06/06 15:54:31 [emerg] 3147#3147: “fastcgi_index” directive is duplicate in /etc/nginx/fastcgi_params_with_auth:1
Jun 06 15:54:31 nomdedomaine nginx[3147]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 06 15:54:31 nomdedomaine systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 06 15:54:31 nomdedomaine systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jun 06 15:54:31 nomdedomaine systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
sudo apt --fix-broken install
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Correcting dependencies… Done
The following additional packages will be installed:
nginx-extras
The following packages will be upgraded:
nginx-extras
1 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.
1 not fully installed or removed.
Need to get 0 B/80.9 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Reading changelogs… Done
Setting up nginx (1.22.1-9+deb12u7) …
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.
invoke-rc.d: initscript nginx, action “start” failed.
× 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 Sat 2026-06-06 16:02:53 BST; 10ms ago
Docs: man:nginx(8)
Process: 4108 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 36ms
Jun 06 16:02:53 nomdedomaine systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server…
Jun 06 16:02:53 nomdedomaine nginx[4108]: 2026/06/06 16:02:53 [emerg] 4108#4108: “fastcgi_index” directive is duplicate in /etc/nginx/fastcgi_params_with_auth:1
Jun 06 16:02:53 nomdedomaine nginx[4108]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 06 16:02:53 nomdedomaine systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 06 16:02:53 nomdedomaine systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jun 06 16:02:53 nomdedomaine systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
dpkg: error processing package nginx (–configure):
installed nginx package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)