I’ve got 502 Bad Gateway errors only in customer login and account registration

Both
customer/account/loginPost/referer/……. &
/customer/account/createpost/

Lead to 502 Bad Gateway
nginx/1.18.0 (Ubuntu)

Interesting fact is that customers actually are able to create account (as i am not requiring email verification at the moment).
But they are unable to login.

That’s start happen once i set my base url to https – if it’s any connection.

Is there anything more that should be done to allow my customers to login in their accounts?

I am ready to provide more information just ask what will help to investigate the root of that issue.

Thanks.