Collabora behind nginx proxy error

Hi !
I installed NC 11.0.2 + Collabora latest docker.
I want to use collabora behind nginx proxy.
This is my nginx config:

nginx config
	upstream collabora {
	server 172.19.0.5:9980;
	keepalive 32;
}

server {
	listen 443 ssl;
	
	server_name 172.19.0.5;

	ssl_certificate /etc/nginx/Certificate/bundle.crt;
	ssl_certificate_key /etc/nginx/Certificate/certificate.key;
	
	#ssl_verify_client off;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
	ssl_session_timeout 1d;
	ssl_session_cache shared:SSL:10m;
	ssl_stapling on;
	ssl_stapling_verify on;

	# Only use safe chiphers
	ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
	ssl_prefer_server_ciphers on;
	
	# Add secure headers
	add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";

	location /cloud/ {
		proxy_pass http://172.19.0.7/;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
	}

	# static files
	location ^~ /loleaflet {
		proxy_pass https://collabora;
		proxy_set_header Host $http_host;
	}

	# WOPI discovery URL
	location ^~ /hosting/discovery {
		proxy_pass https://collabora;
		proxy_set_header Host $http_host;
	}

	# Main websocket
	location ~ /lool/(.*)/ws$ {
		#return 301 http://google.com;
		proxy_pass https://collabora;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "Upgrade";
		proxy_set_header Host $http_host;
		proxy_read_timeout 36000s;
	}

	# Admin Console websocket
	location ^~ /lool/adminws {
		proxy_pass https://collabora;
		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 ^~ /lool {
		proxy_pass https://collabora;
		proxy_set_header Host $http_host;
	}
}

But it show 400 Bad request when access /lool/https%3A%2F%2F172.19.0.5%2Fcloud%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F30_ocgondodc58g%3Faccess_token%3Dt441B4HtQLxSyvcEp1zN169ZuhPul9aI%26access_token_ttl%3D0%26permission%3Dedit/ws

I think it not interpreted on location ~ /lool/(.*)/ws$ so i changed location ^~ /lool to location ~ /lool
Now it seem ok. But when open document it always show Connecting and time out
Any updated for nginx proxy ? Thanks

Check it against this one:

I used nginx config from that page.
Apache or haproxy success but nginx not

ohh!
That’s weird.
You might wanna contact the guys at code, and let them know that.