NGINX Reverse Proxy, get 502 bad gateway on login

Hi,

I’m trying to use Pydio by using NGINX, but I have 2 servers :

One at home, running perfectly Pydio witch Docker and NGINX, zero issues
One at OVH, running Docker and NGINX, doing a reverse proxy on the server at home

While I’m trying to login, I get a 502 bad gateway, I have Pydio and the login page, but it gives me a 502.

Here’s my config on both servers :

at home

server {
	listen 8443 http3;
	listen [::]:8443 http3;

	listen 8443 http2 ssl;
	listen [::]:8443 http2 ssl;

	server_name pydio.web.patchli.fr pydio.patchli.fr;

	access_log /var/log/nginx/web/pydio/access.log;
	error_log /var/log/nginx/web/pydio/error.log;

	ssl_certificate /etc/nginx/ssl/patchli.fr_ecc/fullchain.cer;
	ssl_certificate_key /etc/nginx/ssl/patchli.fr_ecc/patchli.fr.key;
	ssl_stapling_file /etc/nginx/ocsp_staple/patchli.fr_ecc.der;

	include includes/custom_error_pages.conf;
	include includes/common_headers.conf;
	include includes/HSTS-preload.conf;

	set $upstream pydio:8080;
    proxy_buffering off;

	location / {
		proxy_pass https://$upstream;
		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;
        if ($http_content_type = "application/grpc") {
            grpc_pass grpcs://pydio:8080;
        }
	}
    location /ws/ {
        proxy_pass https://$upstream;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

   location /cool/ {
        proxy_pass https://$upstream;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
}

server {
	listen 8080;
	listen [::]:8080;
	server_name pydio.web.patchli.fr;
	return 301 https://$server_name$request_uri;
}

at OVH

server {
	listen 8443 http3;
	listen [::]:8443 http3;

	listen 8443 http2 ssl;
	listen [::]:8443 http2 ssl;

	server_name pydio.patchli.fr;

	access_log /var/log/nginx/marisa/pydio/access.log;
	error_log /var/log/nginx/marisa/pydio/error.log;

	ssl_certificate /etc/nginx/ssl/patchli.fr_ecc/fullchain.cer;
	ssl_certificate_key /etc/nginx/ssl/patchli.fr_ecc/patchli.fr.key;
	ssl_stapling_file /etc/nginx/ocsp_staple/patchli.fr_ecc.der;

	include includes/custom_error_pages.conf;
	include includes/common_headers.conf;
	include includes/HSTS-preload.conf;

	set $upstream pydio.web.patchli.fr;

	location / {
		proxy_pass https://$upstream;
        proxy_ssl_verify on;
        proxy_ssl_verify_depth 2;
        proxy_ssl_server_name on;
        proxy_ssl_name $host;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_ssl_protocols TLSv1.3;
        proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
        proxy_ssl_session_reuse on;
		proxy_hide_header X-Powered-By;
	}

}

server {
	listen 8080;
	listen [::]:8080;
	server_name pydio.patchli.fr;
	return 301 https://$server_name$request_uri;
}

Okay

I search a bit with the developper tab on Firefox

On /session I get a 502, I try to fix it but I don’t know how !

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