# Add / Remove domain nginx fails

**URL:** https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395
**Category:** Support
**Tags:** french
**Created:** [December 2, 2018, 7:57am UTC](https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395 "2018-12-02T07:57:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Galuel](https://forum.yunohost.org/user_avatar/forum.yunohost.org/galuel/32/1693_2.png) [@Galuel](https://forum.yunohost.org/u/Galuel)
#### Post date: [December 2, 2018, 7:57am UTC](https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395/1 "2018-12-02T07:57:03Z")

</div>

Je fais ce post comme retour d’expérience, j’ai résolu le soucis.

Ajout d’un domaine principal DOMAINE1 dans Yunohost, puis d’un deuxième domaine. Passage du deuxième domaine en principal, puis suppression de DOMAINE1.

Tout fonctionne bien.

Lors d’un reboot, plus d’accès aux applications web (administration incluse), après vérification avec nmap, tous les ports sont bien ouverts sauf 80 et 443… =\> Nginx n’est pas actif !

Un test de lancement de Nginx me lance un problème dans le fichier de conf =\> Il ne trouve pas la clé SSL du DOMAINE1 ce qui semble normal, mais pourquoi la cherche-t-il puisque j’ai supprimé DOMAINE1 ? En attendant cela bloque la relance de Nginx…

Solution en ligne de commande : yunohost add domain DOMAINE1

Suite au rajout la relance du service Nginx fonctionne (et je ne me sers que du deuxième domaine) !

Il doit donc y avoir un bug concernant la suppression des domaines…

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 2, 2018, 2:45pm UTC](https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395/2 "2018-12-02T14:45:37Z")

</div>

Et donc tu avais bien supprimé le domaine avec `yunohost domain remove ton.domaine.tld` ?

---

<div class="post-metadata">

### Author: ![Galuel](https://forum.yunohost.org/user_avatar/forum.yunohost.org/galuel/32/1693_2.png) [@Galuel](https://forum.yunohost.org/u/Galuel)
#### Post date: [December 2, 2018, 3:26pm UTC](https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395/3 "2018-12-02T15:26:05Z")

</div>

Je l’avais supprimé avec l’interface d’administration web.

---

<div class="post-metadata">

### Author: ![FabienBataille](https://forum.yunohost.org/user_avatar/forum.yunohost.org/fabienbataille/32/1532_2.png) [@FabienBataille](https://forum.yunohost.org/u/FabienBataille)
#### Post date: [May 17, 2019, 1:24pm UTC](https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395/4 "2019-05-17T13:24:05Z")

</div>

Problème toujours visible (en utilisant l’interface web d’administration, même scénario que Galuel) en version Yunohost 3.5.2.2.  
J’ai supprimé à la main les fichiers de configuration relatif à l’ancien domain dans /etc/nginx/conf.d et tout est rentré dans l’ordre.

/etc/nginx/conf.d  
sudo rm -rf nohost.me.d  
sudo rm -rf nohost.me.conf

{  
“host”: “Debian 9.9”,  
“kernel”: “4.14.84-sunxi”,  
“packages”: {  
“yunohost”: {  
“repo”: “stable”,  
“version”: “3.5.2.2”  
},  
“yunohost-admin”: {  
“repo”: “stable”,  
“version”: “3.5.2”  
},  
“moulinette”: {  
“repo”: “stable”,  
“version”: “3.5.2”  
},  
“ssowat”: {  
“repo”: “stable”,  
“version”: “3.5.2.1”  
}  
},  
“backports”: [],  
“system”: {  
“disks”: {  
“zram0”: “Mounted on /var/log, 48.4MiB (44.5MiB free)”,  
“mmcblk0p1”: “Mounted on /, 28.5GiB (27.1GiB free)”  
},  
“memory”: {  
“ram”: “994.7MiB (765.2MiB free)”,  
“swap”: “497.4MiB (497.4MiB free)”  
}  
},  
“nginx”: [  
“nginx: the configuration file /etc/nginx/nginx.conf syntax is ok”,  
“nginx: configuration file /etc/nginx/nginx.conf test is successful”  
],  
“services”: {  
“glances”: “running (enabled)”,  
“nslcd”: “running (enabled)”,  
“metronome”: “running (enabled)”,  
“postfix”: “exited (enabled)”,  
“rspamd”: “running (enabled)”,  
“yunohost-firewall”: “exited (enabled)”,  
“nginx”: “running (enabled)”,  
“php7.0-fpm”: “running (enabled)”,  
“dnsmasq”: “running (enabled)”,  
“fail2ban”: “running (enabled)”,  
“yunohost-api”: “running (enabled)”,  
“mysql”: “running (enabled)”,  
“avahi-daemon”: “running (enabled)”,  
“dovecot”: “running (enabled)”,  
“redis-server”: “running (enabled)”,  
“slapd”: “running (enabled)”,  
“ssh”: “running (enabled)”  
},  
“applications”: {},  
“security”: {  
“CVE-2017-5754”: {  
“name”: “meltdown”,  
“vulnerable”: false  
}  
}  
}

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [January 18, 2023, 8:24pm UTC](https://forum.yunohost.org/t/add-remove-domain-nginx-fails/6395/5 "2023-01-18T20:24:04Z")

</div>


