Redirection between different yunohost instances via nginx / Redirection entre differentes instances yunohost via nginx

:us: English form

My YunoHost server

Hardware: computer runing on Proxmox with yunohost on VM
YunoHost version: 11.0.9
I have access to my server : ssh or graphic interface
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? :not yet
If yes, please explain: N/A

Description of my issue

Hello everyone,

Today I’m in the situation where I’d like to run several VMs
with several different Yunohost instances (so in different virtual
machines). I’d like each Yunohost instance to have its own domain
name.

To do this, I’d like to configure nginx running on a
separate VM running debian.

As I only have one router, the idea would be for connections
to arrive via the different DNS on the debian VM (so far so good),
then be redispatched, depending on the domain name used, to the
corresponding yunohost VM.

And that’s where things get tricky. No matter how much I
read the documentation, I can’t get it to run properly.

What’s more, I’m wondering, if my DNS points to my debian
machine, don’t I need to include a DNS in yunohost? But since the
configuration asks for a DNS, what do I put? A DNS in a vacuum?

Subsidiary question, don’t I complicate my life?

Thanks in advance for your answers.


:fr:Description en Français

Mon serveur YunoHost

Matériel: Ordinateur fixe « classique » faisant tourner Proxmox. Les instances yunohost tournant sous VM.
Version de YunoHost: 11.0.9
J’ai accès à mon serveur : En SSH, via interface graphique
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : Pas encore
Si oui, expliquer: N/A

Description du problème

Bonjour Ă  tous,

Je suis aujourd’hui dans la situation ou j’aimerais faire tourner plusieurs VM avec plusieurs instances de Yunohost différences (donc dans des machines virtuelles différentes). J’aimerais que chaque instance Yunohost ait son propre nom de domaine.

Pour ce faire, j’aimerais configurer nginx tournant sur une VM séparée tournant sous debian.

Comme je n’ai qu’un seul routeur, l’idée étant que les connexions arrivent via les différents DNS sur la VM debian (jusque la ça va), puis soient redispatchés, en fonction du nom de domaine utilisé, sur la VM yunohost correspondante.

Et c’est la que ça coince. J’ai beau potasser de la documentation, je n’arrive pas à faire tourner correctement.

De plus, je me demande, si mes DNS pointent sur ma machine debian, je n’ai pas besoin d’inclure un DNS dans yunohost. Mais vu que la configuration demande un DNS, je mets quoi ? Un DNS dans le vide ?

Question subsidiaire, est-ce que je ne me complique pas la vie ?

Merci d’avance de vos réponses.

if i understand correct you want to

run many domains under many VM’s, under 1 ip address, using 1 router with 1 dmz?

for that i would use nginx proxy manager.

on my proxmox i installed nginx proxy manager, set that up as my DMZ with port forward 80/443

in nginx proxy manager i set up

https 192.168.1.2 443 to domain 1
https 192.168.1.3 443 to domain 2
https 192.168.1.4 443 to domain 3
https 192.168.1.5 443 to domain 4

Indeed I discovered it this morning :slight_smile:

I’ll try to do some stuff with it, but still have some question

Okay I have a proxy manager for https connection, but what about maling and other services ?

Thanks for your answer

[EDIT] Seems i can do that with postfix. But how ? Seems complex :frowning:

i would assume pass the ports like another other but dont setup the ssl through npm but on server direct and port forward found this hope it can help or ask quesitons

https://www.reddit.com/r/unRAID/comments/l7k49g/setting_up_a_mail_server_thats_behind/

https://www.reddit.com/r/unRAID/comments/l9ao0q/mailserver_unable_to_get_letsencrypt_certs/