Plus d'accès à mon serveur suite à un changement de dossier dans my_webapp

Bonsoir,
Je viens de faire une bourde ! Sur mon serveur en http, je viens de demander de changer le dossier de mon site hébergé avec l’application my_webapp. Après un court instant, j’ai été déconnecté puis impossible de me reconnecter sur mon serveur. Je précise que j’ai toujours un accès ssh et que je vois bien les différents dossiers contenants mes sites comme ci-dessous :

root@wendling:/var/www/my_webapp/www# dir
010_accueil_www  070_t2i2d_www                120_tocqueville_www    co          skin
020_2snt_www     080_titec_www                140_pele-mele_www      index.html  __wendling
030_1i2d_www     10000_anneesAnterieures_www  150_tp_à_distance_www  lib-md
040_1it_www      1000_bacAsable_www           160_hexapode_www       lib-sc
050_1etlv_www    100_tsi_www                  2000_agr_www           meta
060_1si_www      110_repairfablab_www         3000_partage_www       res

Pourriez-vous m’aider à rétablir ma configuration initiale ? En vous remerciant.

Comment ça c’est passé ?
Combien de domaines enregistrés dans le serveur ?
Le domaine principal et celui du site sont différents ?
A noter que pour yunohost, un sous domaine est considéré comme un domaine.
Ton site est dans la racine du domaine ou dans un dossier d’un domaine ?

Bonjour,
Je n’ai qu’un seul domaine d’enregistré :

wendling.xyz

Lorsque j’étais sur ma webpage concernant my_webapp il est demandé de choisir éventuellement un dossier pour le dépôt des fichiers. Initialement j’avais paramétré cela de cette manière :

my_webapp/site

pour que mon fichier index.html soit dans ce dossier site.
Lors de mon intervention, j’ai modifié cela en :

my_webapp/site/www

Et depuis n’ai plus d’accès aux webpage de yunohost.

Que donne :
sudo yunohost service status nginx

Depuis la webadmin ou en ssh ?

Bonjour,
Merci pour votre aide. J’ai fait cette modification de chemin depuis la page yunohost du webadmin.

Voici le retour de la commande demandée :

michelwend@wendling:~$ sudo yunohost service status nginx
[sudo] password for michelwend:
configuration: valid
description: Serves or provides access to all the websites hosted on your server
last_state_change: 2024-06-14 08:04:26
start_on_boot: enabled
status: running
michelwend@wendling:~$

OK et
sudo yunohost domain main-domain

Et

sudo yunohost app map

Si le résultat des commandes contient des données que tu ne veux pas partager en public, tu peux me les envoyer par mp.

Bonsoir,
Voici pour la première commande :

michelwend@wendling:~$ sudo yunohost domain main-domain
[sudo] password for michelwend:
current_main_domain: wendling.xyz

Et la deuxième :

michelwend@wendling:~$ sudo yunohost app map
home.wendling.xyz: Home Assistant
home.wendling.xyz/api: Home Assistant (api)
reservation.wendling.xyz: Easy!Appointments
wendling.xyz/blog: WordPress
wendling.xyz/blog/wp-admin.php: WordPress (admin)
wendling.xyz/blog/wp-login.php: WordPress (admin)
wendling.xyz/gitlab: GitLab
wendling.xyz/matomo: Matomo
wendling.xyz/nextcloud: Nextcloud
wendling.xyz/site/__wendling: My Webapp
wendling.xyz/syncthing: Syncthing
wireguard.wendling.xyz: WireGuard

En vous remerciant encore pour le temps que vous me consacrez.

C’est bizarre. Voyons ce que donne
sudo yunohost tools diagnosis | yunopaste

Voici le retour :

michelwend@wendling:~$ sudo yunohost tools diagnosis | yunopaste
[sudo] password for michelwend:
usage: yunohost tools
{rootpw,maindomain,postinstall,update,upgrade,shell,basic-space-cleanup,shutdown,reboot,regen-conf,versions,migrations}

[-h]
yunohost tools: error: argument {rootpw,maindomain,postinstall,update,upgrade,shell,basic-space-cleanup,shutdown,reboot,regen-conf,versions,migrations}: invalid choice: ‘diagnosis’ (choose from ‘rootpw’, ‘maindomain’, ‘postinstall’, ‘update’, ‘upgrade’, ‘shell’, ‘basic-space-cleanup’, ‘shutdown’, ‘reboot’, ‘regen-conf’, ‘versions’, ‘migrations’)
Error: No input received from stdin.

Effectivement une erreur apparait.

Non c’est moi, je me suis trompé. Essai avec
sudo yunohost diagnosis show | yunopaste

Edit : après une discussion sur la chatroom, la commande la plus appropriée est
sudo yunohost diagnosis show --share
Donc, on évitera la commande précédente parce qu’elle n’anonymyse pas certaines données.

Bonsoir,
Voici le résultat de la commande :

michelwend@wendling:~$ sudo yunohost diagnosis show --share
[sudo] password for michelwend:
Info: This log is now available via https://paste.yunohost.org/raw/ocesugetel
michelwend@wendling:~$

En suivant le lien, on arrive bien sur le log. J’avoue que je ne sais pas l’interpréter.

[ERROR] Port 80 is not reachable from the outside

[ERROR] Port 443 is not reachable from the outside

[ERROR] Port 8095 is not reachable from the outside

Et tous les domaines ne sont pas accessibles.

Il faut commencer par vérifier que les ports 80, 443 et 8095 sont bien redirigés vers le serveur.

A noter que le domaine principal est sur le point d’expirer : maindomain.tld expires in 11 days

Bonjour,
Merci pour ses informations, j’ai renouvelé mon abonnement pour le nom de domaine.
Pour la suite, comment peut-on vérifier que les ports 80, 443 et 8095 sont bien redirigés vers le serveur ?

Il faut voir dans l’interface de ton routeur s’il redirige bien ces ports vers ton serveur : Configurer la redirection des ports | Yunohost Documentation

Bonjour, pour l’instant il s’agit de mon serveur heberger chez ovh. Je n’ai pas fait de manipulations particulières. Si ce n’est ce changement de sous dossier pour les sites hébergés par my_webapp. Je ne sais donc pas comment ouvrir ces ports ou rediriger les ports concernés.

OK. Voyons ce que dit
sudo lsof -i :80 | grep LISTEN
Et
sudo ss -tulpn

Bonjour,
Voici le retour de la première commande :

michelwend@wendling:~$ sudo lsof -i :80 | grep LISTEN
[sudo] password for michelwend:
nginx 1809 root 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 1809 root 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117431 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117431 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117432 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117432 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117433 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117433 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117434 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117434 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117435 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117435 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117436 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117436 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
nginx 117437 www-data 12u IPv4 20087 0t0 TCP *:http (LISTEN)
nginx 117437 www-data 13u IPv6 20088 0t0 TCP *:http (LISTEN)
michelwend@wendling:~$

Et la deuxième :

michelwend@wendling:~$ sudo ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 37.187.254.234:5353 0.0.0.0:* users:((“hass”,pid=26819,fd=18))
udp UNCONN 0 0 0.0.0.0:8095 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:21027 0.0.0.0:* users:((“syncthing”,pid=1153413,fd=23))
udp UNCONN 0 0 0.0.0.0:53 0.0.0.0:* users:((“dnsmasq”,pid=3982893,fd=4))
udp UNCONN 0 0 0.0.0.0:68 0.0.0.0:* users:((“dhclient”,pid=554,fd=9))
udp UNCONN 0 0 10.10.10.0:123 0.0.0.0:* users:((“ntpd”,pid=2873744,fd=26))
udp UNCONN 0 0 37.187.254.234:123 0.0.0.0:* users:((“ntpd”,pid=2873744,fd=19))
udp UNCONN 0 0 127.0.0.1:123 0.0.0.0:* users:((“ntpd”,pid=2873744,fd=18))
udp UNCONN 0 0 0.0.0.0:123 0.0.0.0:* users:((“ntpd”,pid=2873744,fd=17))
udp UNCONN 0 0 0.0.0.0:35041 0.0.0.0:* users:((“syncthing”,pid=1153413,fd=20))
udp UNCONN 0 0 :5353 : users:((“hass”,pid=26819,fd=17))
udp UNCONN 0 0 [fe80::ec4:7aff:fedb:7db2]%eno1:5353 [::]:
users:((“hass”,pid=26819,fd=20))
udp UNCONN 0 0 [::]:8095 [::]:*
udp UNCONN 0 0 :9094 : users:((“alertmanager”,pid=19965,fd=7))
udp UNCONN 0 0 :42169 : users:((“hass”,pid=26819,fd=13))
udp UNCONN 0 0 [::]:42171 [::]:
users:((“syncthing”,pid=1153413,fd=18))
udp UNCONN 0 0 :51699 : users:((“hass”,pid=26819,fd=21))
udp UNCONN 0 0 [::]:21027 [::]:
users:((“syncthing”,pid=1153413,fd=22))
udp UNCONN 0 0 [::]:53 [::]:
users:((“dnsmasq”,pid=3982893,fd=6))
udp UNCONN 0 0 [fd42::]:123 [::]:* users:((“ntpd”,pid=2873744,fd=27))
udp UNCONN 0 0 [fe80::ec4:7aff:fedb:7db2]%eno1:123 [::]:* users:((“ntpd”,pid=2873744,fd=22))
udp UNCONN 0 0 [2001:41d0:c:6ea::1]:123 [::]:* users:((“ntpd”,pid=2873744,fd=21))
udp UNCONN 0 0 [::1]:123 [::]:* users:((“ntpd”,pid=2873744,fd=20))
udp UNCONN 0 0 [::]:123 [::]:* users:((“ntpd”,pid=2873744,fd=16))
udp UNCONN 0 0 :1900 : users:((“hass”,pid=26819,fd=11))
udp UNCONN 0 0 :1900 : users:((“hass”,pid=26819,fd=24))
tcp LISTEN 0 100 0.0.0.0:143 0.0.0.0:
users:((“dovecot”,pid=3780549,fd=36))
tcp LISTEN 0 2048 127.0.0.1:9168 0.0.0.0:
users:((“gitlab-exporter”,pid=19954,fd=6))
tcp LISTEN 0 511 0.0.0.0:8080 0.0.0.0:* users:((“nginx”,pid=20045,fd=7),(“nginx”,pid=20044,fd=7),(“nginx”,pid=20043,fd=7),(“nginx”,pid=20042,fd=7),(“nginx”,pid=20041,fd=7),(“nginx”,pid=20040,fd=7),(“nginx”,pid=20039,fd=7),(“nginx”,pid=20036,fd=7),(“nginx”,pid=19967,fd=7))
tcp LISTEN 512 511 0.0.0.0:80 0.0.0.0:* users:((“nginx”,pid=117437,fd=12),(“nginx”,pid=117436,fd=12),(“nginx”,pid=117435,fd=12),(“nginx”,pid=117434,fd=12),(“nginx”,pid=117433,fd=12),(“nginx”,pid=117432,fd=12),(“nginx”,pid=117431,fd=12),(“nginx”,pid=1809,fd=12))
tcp LISTEN 0 1024 127.0.0.1:8081 0.0.0.0:* users:((“ruby”,pid=20336,fd=12),(“ruby”,pid=20333,fd=12),(“ruby”,pid=20324,fd=12),(“ruby”,pid=20306,fd=12),(“ruby”,pid=20295,fd=12),(“ruby”,pid=20293,fd=12),(“ruby”,pid=20291,fd=12),(“ruby”,pid=20289,fd=12),(“ruby”,pid=19948,fd=12))
tcp LISTEN 0 10 127.0.0.1:10001 0.0.0.0:* users:((“postsrsd”,pid=1145154,fd=4))
tcp LISTEN 0 2048 127.0.0.1:8082 0.0.0.0:* users:((“ruby”,pid=20097,fd=10))
tcp LISTEN 0 10 127.0.0.1:10002 0.0.0.0:* users:((“postsrsd”,pid=1145154,fd=5))
tcp LISTEN 0 2048 127.0.0.1:9236 0.0.0.0:* users:((“gitaly”,pid=20003,fd=10),(“gitaly”,pid=20003,fd=7))
tcp LISTEN 0 32 0.0.0.0:53 0.0.0.0:* users:((“dnsmasq”,pid=3982893,fd=5))
tcp LISTEN 0 128 0.0.0.0:5269 0.0.0.0:* users:((“lua5.3”,pid=3780599,fd=1))
tcp LISTEN 0 2048 127.0.0.1:8150 0.0.0.0:* users:((“gitlab-kas”,pid=19942,fd=9))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:((“sshd”,pid=1366,fd=3))
tcp LISTEN 0 2048 127.0.0.1:8151 0.0.0.0:* users:((“gitlab-kas”,pid=19942,fd=8))
tcp LISTEN 0 244 127.0.0.1:5432 0.0.0.0:* users:((“postgres”,pid=1056676,fd=6))
tcp LISTEN 0 100 0.0.0.0:25 0.0.0.0:* users:((“master”,pid=1055341,fd=13))
tcp LISTEN 0 2048 127.0.0.1:8153 0.0.0.0:* users:((“gitlab-kas”,pid=19942,fd=11))
tcp LISTEN 0 2048 127.0.0.1:8154 0.0.0.0:* users:((“gitlab-kas”,pid=19942,fd=7))
tcp LISTEN 0 128 0.0.0.0:8123 0.0.0.0:* users:((“hass”,pid=26819,fd=10))
tcp LISTEN 0 2048 127.0.0.1:8155 0.0.0.0:* users:((“gitlab-kas”,pid=19942,fd=10))
tcp LISTEN 512 511 0.0.0.0:443 0.0.0.0:* users:((“nginx”,pid=117437,fd=14),(“nginx”,pid=117436,fd=14),(“nginx”,pid=117435,fd=14),(“nginx”,pid=117434,fd=14),(“nginx”,pid=117433,fd=14),(“nginx”,pid=117432,fd=14),(“nginx”,pid=117431,fd=14),(“nginx”,pid=1809,fd=14))
tcp LISTEN 0 2048 127.0.0.1:8092 0.0.0.0:* users:((“ruby”,pid=20095,fd=16))
tcp LISTEN 0 511 0.0.0.0:8060 0.0.0.0:* users:((“nginx”,pid=20045,fd=8),(“nginx”,pid=20044,fd=8),(“nginx”,pid=20043,fd=8),(“nginx”,pid=20042,fd=8),(“nginx”,pid=20041,fd=8),(“nginx”,pid=20040,fd=8),(“nginx”,pid=20039,fd=8),(“nginx”,pid=20036,fd=8),(“nginx”,pid=19967,fd=8))
tcp LISTEN 0 1024 0.0.0.0:636 0.0.0.0:* users:((“slapd”,pid=1434,fd=9))
tcp LISTEN 0 100 0.0.0.0:4190 0.0.0.0:* users:((“dovecot”,pid=3780549,fd=15))
tcp LISTEN 0 2048 127.0.0.1:8384 0.0.0.0:* users:((“syncthing”,pid=1153413,fd=16))
tcp LISTEN 0 2048 127.0.0.1:8096 0.0.0.0:* users:((“wireguard-ui”,pid=997625,fd=6))
tcp LISTEN 0 2048 127.0.0.1:9121 0.0.0.0:* users:((“redis_exporter”,pid=19972,fd=3))
tcp LISTEN 0 100 0.0.0.0:993 0.0.0.0:* users:((“dovecot”,pid=3780549,fd=38))
tcp LISTEN 0 2048 127.0.0.1:9090 0.0.0.0:* users:((“prometheus”,pid=19949,fd=7))
tcp LISTEN 0 2048 127.0.0.1:9187 0.0.0.0:* users:((“postgres_export”,pid=19964,fd=3))
tcp LISTEN 0 128 127.0.0.1:6787 0.0.0.0:* users:((“yunohost-api”,pid=3983833,fd=6))
tcp LISTEN 0 1024 127.0.0.1:11332 0.0.0.0:* users:((“rspamd”,pid=2142,fd=10),(“rspamd”,pid=1721,fd=10))
tcp LISTEN 0 2048 127.0.0.1:9093 0.0.0.0:* users:((“alertmanager”,pid=19965,fd=8))
tcp LISTEN 0 1024 127.0.0.1:11333 0.0.0.0:* users:((“rspamd”,pid=2149,fd=17),(“rspamd”,pid=2146,fd=17),(“rspamd”,pid=2145,fd=17),(“rspamd”,pid=2144,fd=17),(“rspamd”,pid=1721,fd=17))
tcp LISTEN 0 1024 127.0.0.1:389 0.0.0.0:* users:((“slapd”,pid=1434,fd=8))
tcp LISTEN 0 128 0.0.0.0:5222 0.0.0.0:* users:((“lua5.3”,pid=3780599,fd=11))
tcp LISTEN 0 1024 127.0.0.1:11334 0.0.0.0:* users:((“rspamd”,pid=2143,fd=13),(“rspamd”,pid=1721,fd=13))
tcp LISTEN 0 128 127.0.0.1:27017 0.0.0.0:* users:((“mongod”,pid=2427112,fd=11))
tcp LISTEN 0 80 127.0.0.1:3306 0.0.0.0:* users:((“mariadbd”,pid=3982514,fd=24))
tcp LISTEN 0 128 127.0.0.1:5290 0.0.0.0:* users:((“lua5.3”,pid=3780599,fd=17))
tcp LISTEN 0 100 0.0.0.0:587 0.0.0.0:* users:((“master”,pid=1055341,fd=18))
tcp LISTEN 0 511 127.0.0.1:6379 0.0.0.0:* users:((“redis-server”,pid=1133,fd=6))
tcp LISTEN 0 2048 127.0.0.1:9100 0.0.0.0:* users:((“node_exporter”,pid=19956,fd=3))
tcp LISTEN 0 2048 127.0.0.1:9229 0.0.0.0:* users:((“gitlab-workhors”,pid=19955,fd=3))
tcp LISTEN 0 100 [::]:143 [::]:* users:((“dovecot”,pid=3780549,fd=37))
tcp LISTEN 0 2048 [::1]:9168 [::]:* users:((“gitlab-exporter”,pid=19954,fd=5))
tcp LISTEN 512 511 [::]:80 [::]:* users:((“nginx”,pid=117437,fd=13),(“nginx”,pid=117436,fd=13),(“nginx”,pid=117435,fd=13),(“nginx”,pid=117434,fd=13),(“nginx”,pid=117433,fd=13),(“nginx”,pid=117432,fd=13),(“nginx”,pid=117431,fd=13),(“nginx”,pid=1809,fd=13))
tcp LISTEN 0 2048 :22000 : users:((“syncthing”,pid=1153413,fd=15))
tcp LISTEN 0 32 [::]:53 [::]:
users:((“dnsmasq”,pid=3982893,fd=7))
tcp LISTEN 0 128 [::]:5269 [::]:* users:((“lua5.3”,pid=3780599,fd=2))
tcp LISTEN 0 128 [::]:22 [::]:* users:((“sshd”,pid=1366,fd=4))
tcp LISTEN 0 244 [::1]:5432 [::]:* users:((“postgres”,pid=1056676,fd=5))
tcp LISTEN 0 100 [::]:25 [::]:* users:((“master”,pid=1055341,fd=14))
tcp LISTEN 0 128 [::]:8123 [::]:* users:((“hass”,pid=26819,fd=9))
tcp LISTEN 512 511 [::]:443 [::]:* users:((“nginx”,pid=117437,fd=15),(“nginx”,pid=117436,fd=15),(“nginx”,pid=117435,fd=15),(“nginx”,pid=117434,fd=15),(“nginx”,pid=117433,fd=15),(“nginx”,pid=117432,fd=15),(“nginx”,pid=117431,fd=15),(“nginx”,pid=1809,fd=15))
tcp LISTEN 0 1024 [::]:636 [::]:* users:((“slapd”,pid=1434,fd=10))
tcp LISTEN 0 100 [::]:4190 [::]:* users:((“dovecot”,pid=3780549,fd=16))
tcp LISTEN 0 128 [fe80::ec4:7aff:fedb:7db2]%eno1:40000 [::]:* users:((“hass”,pid=26819,fd=22))
tcp LISTEN 0 100 [::]:993 [::]:* users:((“dovecot”,pid=3780549,fd=39))
tcp LISTEN 0 1024 [::1]:11332 [::]:* users:((“rspamd”,pid=2142,fd=11),(“rspamd”,pid=1721,fd=11))
tcp LISTEN 0 1024 [::1]:11333 [::]:* users:((“rspamd”,pid=2149,fd=19),(“rspamd”,pid=2146,fd=19),(“rspamd”,pid=2145,fd=19),(“rspamd”,pid=2144,fd=19),(“rspamd”,pid=1721,fd=19))
tcp LISTEN 0 2048 :9094 : users:((“alertmanager”,pid=19965,fd=3))
tcp LISTEN 0 128 [::]:5222 [::]:
users:((“lua5.3”,pid=3780599,fd=15))
tcp LISTEN 0 1024 [::1]:11334 [::]:* users:((“rspamd”,pid=2143,fd=15),(“rspamd”,pid=1721,fd=15))
tcp LISTEN 0 128 [::1]:5290 [::]:* users:((“lua5.3”,pid=3780599,fd=16))
tcp LISTEN 0 100 [::]:587 [::]:* users:((“master”,pid=1055341,fd=19))
tcp LISTEN 0 511 [::1]:6379 [::]:* users:((“redis-server”,pid=1133,fd=7))
michelwend@wendling:~$

Et
sudo yunohost firewall list

Voici :

michelwend@wendling:~$ sudo yunohost firewall list
opened_ports:

  • 22
  • 25
  • 53
  • 80
  • 443
  • 587
  • 993
  • 5222
  • 5269
  • 5353
  • 8095
  • 22000
    michelwend@wendling:~$

Et sudo cat /etc/hosts
sudo cat /etc/resolv.conf

Pour l’instant tout paraît correct