Can you elaborate on this? What happens when it won’t accept your login? Is there an error produced by the site? The nature of the failure here might provide some clues to a fix.
I’m actually trying to proxy 2 different sites, and got them mixed up in my initial post sorry.
This one (proxy to norbits) doesn’t actually get me to the login form, it just returns a 502 bad gateway.
The console only says; GET https://nb.example.com/favicon.ico 502
I’ll open another topic for the other one at a later time (the one that gave me the login form just refreshes, no error in console except some javascript).
I’ll bet any money that it’s setting your login via cookie with the cookie domain set to the original domain (not your own website’s domain). When it tells your browser to refresh after setting the cookie, it expects your browser to send that cookie on the new connection, but it doesn’t because the domain doesn’t match, hence not logged in (and no error).
I’m not seeing anything there that should cause a 502.
Can you launch Caddy with fresh access and error logs, make a request to your site to trigger the proxy, and then copy the error and access logs here as well?
The nginx server at norbits.net is configured to drop connections for the wrong Host. You’ve set the transparent preset for your proxy, which among other things sets Host header as the host the client originally requested (your own site). Hence, when users proxy through your Caddy, the upstream nginx drops the connection made by Caddy (wrong Host).