2👍
✅
You are unconditionally redirecting from domain.net:8888 to domain.net:8888. An infinite redirect loop is the only possible result.
In any case, what you are attempting to do isn’t possible. Nginx is talking SSL, your browser is not, so no data will be transferred between them (which is why you don’t get the redirect loop when connecting with plain HTTP). When they do talk (via SSL) your redirect loop takes over.
Source:stackexchange.com