@Linguafoeda
502 is a problem between NPM and the endpoint.
Usally you let NPM handle SSL
so:
internet -> SSL -> yourdomain -> non-SSL -> your-internal-service (like plex, apache, bitwarden, whatever)
Can you share some screenshots? I find it hard to understand exactly what your setup is.