-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nginx-proxy doesn't https 301 auto redirect #461
Comments
Hi, can you provide more config and generated nginx config? no |
nginx default
|
I've dozens of other domains on this server next to those problematic and they all work fine, and default contains correct redirects. just this subdomain portfolio.sandrophot.com fails. atm I'm doing http -> https redirect on the application side, wordpress handles this internally. but problem was apparent from the very beginning, even before configuring wp. |
Perhaps |
Well, that's good and bad. Glad your problem is fixed, but if it's not reproduceable, it will be tough to fix it :). We should add a bit more verbosity to |
yes, I was browsing default.conf and noticed that ssl part appeared for that subdomain. I check with curl and in fact it was working. and yes I realise intermittent issues are the hardest to debug. I've a gut feeling that this is problem of dns propagation, I've noticed that cname propagates slower than root domain ip change, even though TTL is the same. There is some caching going on somewhere. sometimes letsencrypt companion shows these errors: even though I didn't see this error for that particular domain, I've a feeling its related. |
Looking at https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion/blob/efc7e4c2d98e7f0422622ebb102d216d80dbbc66/app/functions.lib#L72 i would not be surprised if it could cause some race condition, it seems to fire of execs and signals that might might stumble upon each other. |
@JrCs any ideas? |
No i don't have ideas. Sorry. |
@JrCs Ok, btw is there a good reason for https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion/blob/efc7e4c2d98e7f0422622ebb102d216d80dbbc66/app/letsencrypt_service#L96 being |
Yes, we only need to reload_nginx if we create a new block location for the specific domain. If we don't have a specific domain configuration (so nginx use the default.conf) there's no need to reload nginx. |
@JrCs I was more referring to why it uses |
@JrCs My thinking is that running If that is the case there is probably also a similar issue for how the docker-gen process in the nginx-proxy container generates config and reloads nginx on docker events without any synchronization with execs done by docker-letsencrypt-nginx-proxy-companion |
I had a similar issue (not the same) that was fixed by adding VIRTUAL_PROTO=https to the site containers environment. |
Resolved per last comment, closing. |
I'm facing weird issue, all other sites are properly redirected with 301 via nginx-proxy. but 1 domain returns 200 instead of 301.
I don't see anything alarming in logs neither of nginx-proxy nor the nginx-webserver. Is there any reason why it would fail redirect?
btw, going to https directly works fine, so ssl keys are generated and ready.
p.s. redirect atm is done via php, this is why I'm checking headers with curl. something seems off.
The text was updated successfully, but these errors were encountered: