[Résolu] Nginx cassé après mise à jour yunohost

Bonjour à tous,

Suite mise à jour yunohost via l’accès admin du site la partie web (https) ne fonctionne plus.

ssh OK
mail OK
accès web et nextcloud KO

Un “yunohost service status” me donne:

nginx:
loaded: enabled
status: inactive

Un stop/start ou restart ou même reboot du vps ne fonctionne pas.

Sur les logs il y a deux erreurs qui me semblent bloquantes:

nginx: [emerg] duplicate location "/.well-known/caldav
ou
Cannot add dependency job for unit rmilter.socket, ignoring: Unit rmilter.socket failed to load: No such file or directory

Est-ce que vous avez eu le souci?
Quel test je pourrai faire pour affiner le diag ?

Merci pour votre aide et retour.

sebios

voici qqs infos du vps:

RELEASE

root@[vps]:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.10 (jessie)
Release: 8.10
Codename: jessie


VERSION

root@[vps]:~# dpkg --list | grep nginx
ii nginx-common 1.6.2-5+deb8u5 all small, powerful, scalable web/proxy server - common files
ii nginx-extras 1.6.2-5+deb8u5 amd64 nginx web/proxy server (extended version)

root@vps:~# systemctl status nginx.service
â nginx.service - A high performance web server and a reverse proxy server
** Loaded: loaded (/lib/systemd/system/nginx.service; enabled)**
** Active: failed (Result: exit-code) since Tue 2018-02-06 16:07:27 CET; 6s ago**
** Process: 2110 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)**

Feb 06 16:07:27 vps.ovh.net systemd[1]: Starting A high performance web server and a reverse proxy server…
Feb 06 16:07:27 vps.ovh.net nginx[2110]: nginx: [emerg] duplicate location “/.well-known/caldav” in /etc/nginx/conf.d/ndd.fr.d/nextcloud.conf:4
Feb 06 16:07:27 vps.ovh.net nginx[2110]: nginx: configuration file /etc/nginx/nginx.conf test failed
Feb 06 16:07:27 vps.ovh.net systemd[1]: nginx.service: control process exited, code=exited status=1
Feb 06 16:07:27 vps.ovh.net systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Feb 06 16:07:27 vps.ovh.net systemd[1]: Unit nginx.service entered failed state.

root@vps:~# journalctl -xn
– Logs begin at Tue 2018-02-06 15:12:12 CET, end at Tue 2018-02-06 16:07:27 CET. –
Feb 06 16:07:27 vps.ovh.net sudo[2105]: pam_unix(sudo:session): session opened for user root by drkgzt(uid=0)
Feb 06 16:07:27 vps.ovh.net systemd[1]: Cannot add dependency job for unit rspamd.socket, ignoring: Unit rspamd.socket failed to load: No such file or directory.
Feb 06 16:07:27 vps.ovh.net systemd[1]: Cannot add dependency job for unit rmilter.socket, ignoring: Unit rmilter.socket failed to load: No such file or directory.
Feb 06 16:07:27 vps.ovh.net systemd[1]: Starting A high performance web server and a reverse proxy server…
– Subject: Unit nginx.service has begun with start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit nginx.service has begun starting up.
Feb 06 16:07:27 vps.ovh.net nginx[2110]: nginx: [emerg] duplicate location “/.well-known/caldav” in /etc/nginx/conf.d/ndd.fr.d/nextcloud.conf:4
Feb 06 16:07:27 vps.ovh.net nginx[2110]: nginx: configuration file /etc/nginx/nginx.conf test failed
Feb 06 16:07:27 vps.ovh.net sudo[2105]: pam_unix(sudo:session): session closed for user root
Feb 06 16:07:27 vps.ovh.net systemd[1]: nginx.service: control process exited, code=exited status=1
Feb 06 16:07:27 vps.ovh.net systemd[1]: Failed to start A high performance web server and a reverse proxy server.
– Subject: Unit nginx.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit nginx.service has failed.

– The result is failed.
Feb 06 16:07:27 vps.ovh.net systemd[1]: Unit nginx.service entered failed state.

Bon…

Dans ce fichier root@vps:/etc/nginx/conf.d/ndd.fr.d/nextcloud.conf

J’ai supprimé ces deux bouts de conf au tout début du fichier:

location = /.well-known/carddav {
return 301 https://$server_name/nextcloud/remote.php/dav;
}
location = /.well-known/caldav {
return 301 https://$server_name/nextcloud/remote.php/dav;

Et le webmail, l’accès admin est revenu o_O

Je continue à checker les autres services.

Salut,
pour ces deux location elles sont peut être utilisée par baikal… d’ou le duplicate ou par une autre appli.
Faudrait que je verifie mon fichier de conf nginx sur mon app nextcloud
Avec un nginx -t tu peux tester ta config et avoir des indications sur ton erreur de conf.