Setting up Jitsi next to Nextcloud

Kolejna witryna WordPress

I managed to partly figure it out, on my setup at least… Hope it helps for you.
I have a nextcloud VM setup on lan ip 1.2.3.1, setup following carsten riegers tutorial
I have a Jitsi VM on lan ip 1.2.3.2, following the standard tutorials scattered around the internet.
I have two sub domains, domain1 for nextcloud and domain2 for jitsi. Both pointed to the same wan ip address
incoming connectiosn on ports 443 and 80 are automatically forwarded to the nextcloud vm as per tutorial of carsten, now in the /etc/nginx/conf.d folder of the nextcloud vm add a new file called jitsi.conf (or whatever you feel like)

Put in:

server {
server_name domain2.com;
listen 443;
listen [::]:443;

location / {
proxy_pass https://1.2.3.2:443; (the lan ip of jitsi)
}
}

This redirects the request to domain2 to the jitsi server.
I have not managed make the certificate work yet, so that could be a problem when using the apps on the phones.