-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Hi,
I’m running Magento inside a container and using Nginx Proxy Manager (NPM) as a reverse proxy. Here’s what I’ve observed:
-
Setup
-
Internal testing domain with a local DNS record (similar to editing
/etc/hosts) works fine — no redirect issues. -
When using
bin/setup sub.domain.de, NPM is configured with the container’s IP (http, port 80) as the proxy target.
-
-
Problem
-
Accessing the site through NPM with the configured domain leads to an infinite redirect loop (“too many redirects”).
-
Browser shows 301 loops regardless of SSL or browser cache.
-
Example log line from container:
-
10.0.2.10 - - [17/Sep/2025:08:43:05 +0000] "GET / HTTP/1.1" 301 169 "http://10.0.2.10:81/" ...
-
Suspicion
-
It looks like NPM terminates HTTPS and forwards plain HTTP to Magento, but Magento (or its Nginx config) enforces HTTPS again. This creates a loop.
-
Using the internal testing domain bypasses this, which is why it only occurs with the real domain configured via
bin/setup.
-
-
Request
Could you clarify the recommended setup when using NPM (or another reverse proxy in front of Magento)? Should SSL termination happen entirely at NPM, or inside the container as well?
Any guidance on how to avoid this redirect loop would be appreciated.
Thanks!