Nextcloud Office behind NGINX Proxy Manager - solved

Hi, I have moved my running Nextcloud Instance behind a NGINX Proxy Manager.

I had to set the following to access my Nextcloud Instance:
On NGINX → Edit Proxy Host → “Advanced” I had to add under “Custom Nginx configuration” the following line:

proxy_hide_header Upgrade;

Now Nextcloud is running, but Nextcloud Office is not working, it cannot connect to the internal CODE Server.
Are there any additional entries that I have to add to this custom config entry?

I tried the following but had no luck:

proxy_hide_header Upgrade;
 # static files
 location ^~ /browser {
 proxy_pass $forward_scheme://$server:$port;
 proxy_set_header Host $host;
  }
 # WOPI discovery URL
 location ^~ /hosting/discovery {
 proxy_pass $forward_scheme://$server:$port;
 proxy_set_header Host $host;
  }
 # Capabilities
 location ^~ /hosting/capabilities {
 proxy_pass $forward_scheme://$server:$port;
 proxy_set_header Host $host;
  }
  # main websocket
  location ~ ^/cool/(.*)/ws$ {
     proxy_pass $forward_scheme://$server:$port;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "Upgrade";
       proxy_set_header Host $host;
       proxy_read_timeout 36000s;
    }
  # download, presentation, and image upload
  location ~ ^/(c|l)ool {
     proxy_pass $forward_scheme://$server:$port;
     proxy_set_header Host $host;
  }
  # Admin Console websocket
  location ^~ /cool/adminws {
     proxy_pass $forward_scheme://$server:$port;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "Upgrade";
     proxy_set_header Host $host;
     proxy_read_timeout 36000s;
  }

So I get it running yesterday. My setup is now the following:

NGINX Proxy Manager (NPM).
For the ProxyHost the settings are:
Details:
Scheme: HTTP
Forward IP: IP of VM running Nextcloud incl. CODE Builtin
Forward Port: 80
Enable: Websockets Support

Custom Locations:
Location: /browser
Scheme: http
Forward IP: IP of VM running Nextcloud incl. CODE Builtin
Forward Port: 9983 (Port which coolswd is running)

SSL:
Enable: Force SSL
Enable: HTTP/2 Support
Enable: HSTC Enabled

Advanced:
Custom NginxConfiguration:
proxy_hide_header Upgrade;

In the LinuxVM itself I switch from my old SSLApache2 config “000-default-le-ssl” to “000-default” - there was no difference, and since NPM is now taking care for the SSL stuff I don´t need to have an own on my backend. But it can be switched at any time.