Collabora Code with Nginx reverse proxy setup Bad Gateway error

Issue when trying to use Collabora in Pydio
Getting bad gateway when trying to open documents

Pydio plugin is configured to
Libre office ssl : off
Host 192.168.0.22
port is 9980

Servers
Pydioserver 192.168.0.21
Nginx reverse proxy server 192.168.0.22
Collabora code (docker image) 192.168.0.22 listening on port 9980

Reverse proxy server and Collabora code docker image are running on the same server.

Everything else seems to work fine, Just cannot get this part working internally or externally.
Any ideas would be greatly appreciated. TIA

Nginx: Site_enabled pydio config>>>>>>

upstream pydiolinux {
    server 192.168.0.21:8080;
    server 192.168.0.21:443;

}

upstream websocket{
        server 192.168.0.21:8080;
        server 192.168.0.21:443;

}



server {


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/share.company.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/share.company.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_name share.company.com; #(external url)

   client_max_body_size 10G;
        location / {
         if ($http_content_type = "application/grpc") {
            grpc_pass grpcs://192.168.0.21:8080;
        }
		 proxy_pass https://192.168.0.21:8080;
                      proxy_pass_request_headers on;
           proxy_set_header Host $host;
           proxy_set_header X-real-IP $remote_addr;
           grpc_pass grpcs://192.168.0.21:8080;
           proxy_buffering off;
           proxy_http_version 1.1;

     }



       location /chat/ {
         proxy_pass http://192.168.0.21:8080;
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection 'upgrade';
    }


        location /ws/ {
#proxy_buffering off;
        proxy_pass  https://192.168.0.21:8080;
        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;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_read_timeout 86400s;
        proxy_send_timeout 86400;
     }


        location /minio/ {
        proxy_pass http://192.168.0.21:9003/;
}

}

    error_log /var/log/nginx/cells-proxy-error.log;
    access_log /var/log/nginx/cells-proxy-access.log;


server {
    if ($host = share.company.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
listen 443 ssl http2;

        listen 80;
        listen [::]:80;
		
    # static files
       location ^~ /loleaflet {
               proxy_pass https://192.168.0.22:9980;
        proxy_set_header Host $http_host;
        proxy_set_header Host $host;
    }

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

    # Capabilities
      location ^~ /hosting/capabilities {
      proxy_pass https://192.168.0.22:9980;
      proxy_set_header Host $http_host;
      proxy_set_header Host $host;

    }

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

    # download, presentation and image upload
      location ~ ^/lool {
        proxy_pass https://192.168.0.22:9980;
        proxy_set_header Host $http_host;

    # Admin Console websocket
       location ^~  ^/lool/adminws {
       proxy_pass https://192.168.0.22:9980;
	   proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header Host $http_host;
       proxy_set_header Host $host;
       proxy_read_timeout 36000s;
    }





    # server_name share.company.com;
    return 404; # managed by Certbot


}
}

Hello @Anthony_Addotta,

Could you tell me if you run collabora with docker or not, and if it is with docker, which command did you start the container with ?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.