Reverse proxy with nginx returns blank pages?

I have configured coolwsd without ssl and set up nginx as a reverse proxy with these settings:

server {
# listen       443 ssl;
 server_name  collabora1.xxx.com;

# ssl_certificate /path/to/certificate;
# ssl_certificate_key /path/to/key;

 # static files
 location ^~ /browser {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # WOPI discovery URL
 location ^~ /hosting/discovery {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # Capabilities
 location ^~ /hosting/capabilities {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # main websocket
 location ~ ^/cool/(.*)/ws$ {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }

 # download, presentation and image upload
 location ~ ^/(c|l)ool {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # Admin Console websocket
 location ^~ /cool/adminws {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/collabora1.xxx.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/collabora1.xxx.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = collabora1.xxx.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

 listen        80 ;
 server_name  collabora1.xxx.com;
    return 404; # managed by Certbot

}

However, visit for example https://collabora1.xxx.com/cool/adminws returns a black page, and so do other pages.

What am I missing?

I see in my /var/log/syslog:

Jun  3 10:45:44 Collabora1 coolwsd[7061]: wsd-07061-07099 2022-06-03 10:45:44.102249 +0200 [ websrv_poll ] ERR  Unknown resource: //hosting/capabilities G, host: collabora1.xxx.com, path: 2
Jun  3 10:45:44 Collabora1 coolwsd[7061]: [0] 'hosting'
Jun  3 10:45:44 Collabora1 coolwsd[7061]: [1] 'capabilities'
Jun  3 10:45:44 Collabora1 coolwsd[7061]: full URI: //hosting/capabilities| wsd/COOLWSD.cpp:3529

I don’t understand what that means though. Why does it mention “full URI: //hosting/capabilites” without the hostname?

Solved! The is a second ssl tag in the coolwsd.xml file, under storage, which I also had to change.

Now I get responses.

related to Systemctl start coolwsd doesn't give error, but no ports are listening - #2 by lifeboy