docker-jitsi-meet icon indicating copy to clipboard operation
docker-jitsi-meet copied to clipboard

multiple letsencrypt domains on ubuntu hosting docker-jitsi-meet

Open pieterjandebruyne opened this issue 5 years ago • 0 comments

Hi all,

I am running this docker container on an ubuntu 20.04 machine and everything is working as intended. I used the automatic letsencrypt config and it generated the certificates and served jitsi meet over https.

I then added JWT auth, which also worked amazingly well out of the box.

Now I made a frontend (vue app) and backend server (node.js) to do some validation and generation of this JWT that then redirects them to jitsi meet. I installed node and nginx on the server and did all the setup as I normally do. I make nginx configs to redirect port 80 to 443, generated letsencrypt certs and then link the 2 services with 2 different domainnames so now I have -auth.domain.com -authapi.domain.com These are working perfectly over https

Here is the nginx config (with domain replaced):

VUE APP:

server {
     listen      80;
     listen      [::]:80;
     server_name auth.domain.com;
     return 301  https://$server_name$request_uri;
}
server {
     listen       443 ssl http2;
     listen       [::]:443 ssl http2;
     server_name  auth.domain.com;

     ssl_certificate /etc/letsencrypt/live/auth.domain.com/fullchain.pem;
     ssl_certificate_key /etc/letsencrypt/live/auth.domain.com/privkey.pem;

     location / {
          root   /home/auth-app/dist;
          index  index.html;
          try_files $uri $uri/ /index.html;
     }          error_page  500 502 503 504  /50x.html;          location = /50x.html {
          root   /usr/share/nginx/html;
     }
}

NODE SERVER:

server {
     listen       80;
     listen       [::]:80;
     server_name  authapi.domain.com;
     return 301   https://$server_name$request_uri;
}
server {
     listen       443 ssl http2;
     listen       [::]:443 ssl http2;
     server_name  authapi.domain.com;

     ssl_certificate /etc/letsencrypt/live/authapi.domain.com/fullchain.pem;
     ssl_certificate_key /etc/letsencrypt/live/authapi.domain.com/privkey.pem;

     location / {
          proxy_pass                 http://127.0.0.1:5000;
          proxy_http_version         1.1;
          proxy_set_header Host      $host;
          proxy_set_header X-Real-IP $remote_addr;
     }
}

I changed the .env HTTP back to 8000 and HTTPS to 8443 because now the above nginx config is watching for ports 80 & 443 (8000 and 8443 were the defaults but letsencrypt needed 80 and 443 so I disabled letsencrypt here again since it would not generate them on these ports.)

So with this config I am able to access my vue and node app over https but I do not have letsencrypt for jitsi meet setup anymore..

Is there any way to manually generate a letsencrypt and give it to the docker container? Or is there any way to host these auth services without interferring with the 80/443 ports ? its ok if the url becomes auth.domain.com:43333 for example.

Any advice and help are extremely welcome.

Thanks for your time.

pieterjandebruyne avatar Jul 20 '20 15:07 pieterjandebruyne