title: jitsi docker desktop wsl2 nginx proxy for wss
body: <p>Using the latest jitsi docker build on a docker desktop with wsl2 I am having problems getting the wss socket to redirect when using a an internal <code>PUBLIC_URL</code> behind an nginx reverse proxy</p>
  <p>using a default localhost with no PUBLIC_URL I can connect to a meeting no issues and <code>url = http://localhost</code></p>
  <p>.env</p>
  <pre><code> # Public URL for the web service (required)
   #PUBLIC_URL=https://meet.example.com
  </code></pre>
  <p>adding a reverse proxy with the following nginx <code>default.conf</code></p>
  <pre><code>server {
      listen       80;
      listen  [::]:80;
          listen 443 ssl http2;
          listen [::]:443 ssl http2;
          ssl_certificate /home/ssl/certs/meet.example.com.crt;
          ssl_certificate_key /home/ssl/private/meet.example.com.key;
      server_name  meet.example.com;
  
      #charset koi8-r;
      access_log  /home/meet.jitsi.access.log  main;
      error_log  /home/meet.jitsi.error.log  ;
  
      location / {
          proxy_pass http://meet.jitsi:80;
      }
  
  
      location /xmpp-websocket {
          proxy_pass ​http://jvb.meet.jitsi;     &lt;- see error below
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection &quot;upgrade&quot;;
          proxy_read_timeout 86400;
      }
      # redirect server error pages to the static page /50x.html
      #
      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
          root   /usr/share/nginx/html;
      }
      location ~ /\.ht {
          deny  all;
      }
  }
  </code></pre>
  <p>I get an error when testing the above <code>default.conf</code></p>
  <pre><code>root@9c684:/# nginx -c /etc/nginx/nginx.conf -t
  2021/01/25 15:53:14 [emerg] 300#300: invalid URL prefix in /etc/nginx/conf.d/default.conf:20
  nginx: [emerg] invalid URL prefix in /etc/nginx/conf.d/default.conf:20
  nginx: configuration file /etc/nginx/nginx.conf test failed
  
  
  /etc/nginx/conf.d/default.conf:20 == proxy_pass ​http://jvb.meet.jitsi;
  </code></pre>
  <p>Following a number of threads I am lost to the current config I should use, but I understand that two <code>proxy_pass</code> should be possible for the same <code>sever_name</code>, is this correct?</p>
  <p>Is there a better method to have a local url redirect to the JVB sever for the <code>wss://</code> socket?</p>