Configure NGINX for docker

Hi.

New to understanding docker jitsi meet. I’m attempting to configure the NGINX reverse proxy for docker-jitsi-meet so that all connections go through nginx.
Is NGINX configured by defualt for xmpp-websocket and colibri-websocket ? OR
I need to modify meet.conf after I

ENABLE_XMPP_WEBSOCKET=1 
ENABLE_COLIBRI_WEBSOCKET=1

in .env?

Based on the instruction manual, I believe I have to place the below snippet inside meet.conf(not sure):

location /xmpp-websocket {
    proxy_pass https://localhost:8443;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}
location /colibri-ws {
    proxy_pass https://localhost:8443;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Upon inspecting meet.conf, I realised there is a proxy pass already existing for each xmpp-websocket and colibri-websocket.

I have added the following proxy pass based on the instruction manual for each xmpp-websocket and colibri-websocket:


location = /xmpp-websocket {
    tcp_nodelay on;

    proxy_http_version 1.1;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Host {{ $XMPP_DOMAIN }};
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass https://mydomain:8443;
    proxy_pass {{ $XMPP_BOSH_URL_BASE }}/xmpp-websocket?prefix=$prefix&$args;
}

{{ if $ENABLE_COLIBRI_WEBSOCKET }}
# colibri (JVB) websockets
location ~ ^/colibri-ws/([a-zA-Z0-9-\._]+)/(.*) {
    tcp_nodelay on;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_pass https://mydomain:8443;
    proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
}

@damencho Your help here.

Not sure what are you trying to achieve. What does it mean nginx as load balancer?

NGINX as load balancer is other name when we specify the number of workers for optimal performance. Having said that, my primary concern is configuring the reverse proxy. Is it already configured by default or We need to do it inside meet.conf as specified in the question.
For simplicity I’m removing the term load balancer from the question.

Those double proxy pass seems wrong.

Ok. So Jitsi is already configured by default for reverse proxy ? There is no need to add from my end an explicit address ? I’m asking since I read it on the self-hosting guide for reverse proxy.

@damencho Is there any other information that you would require from my end ?

The Docker setup already uses Nginx to proxy all HTTP/WS connections, you don’t need an extra reverse proxy unless you have different subdomains and want a single entrypoint for your HTTP traffic. Is that your case?

@saghul.

No sub-domains as of now. I guess that answers my question. I thank you and @damencho for your time. Have a nice day !

1 Like