-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
domain.com redirected you too many times #3090
Comments
Hi @AustinGilkison, Did you assign the domain name when you were setting up the project? |
@Afrowave Yes, That domain name has been set up. In order to resolve this I have to remove:
From line 48 in compose/production/traefik/traefik.yml |
@AustinGilkison Did you wait to get a certificate for users to be able to connect to https in the first place? There's a possibility the certification failed. |
Yes, The site is using a valid SSL. Once I removed the following from line 48 in compose/production/traefik/traefik.yml everything worked fine.
|
Hm it could be because the Django settings is interfering with traefik? Try going to the http version instead of the https version WITHOUT line 48. Does it redirect? If not, then that's the point of Line 48. If it DOES redirect, then the Django settings may be interfering with the redirect somehow. Also, you deployed to an EC2 instance but did you put a load balancer from AWS in front of your EC2? |
It seems like you are in an infinite loop when trying to redirect. Do you have django.contribs plugins/imports installed? i.e(djagno.contrib.sites, django.contrib.redirects) Have you checked the logs from the web server? I would also ask did you migrate your changes because this will create a django redirect table in your database. |
I cannot reproduce from a vanilla project. As other suggested, there might be something else misconfigured outside of the project. I'm going to close this. You might have more luck on Stackoverflow. |
I am a new django-cookiecutter user so take what I say with a grain of salt, but I was struggling with a similar "too many redirects" issue, and in my case, when I switched my Cloudflare DNS records from "proxied" to "non-proxied", it made it work. |
@cjauvin Saved me a day, I first turned off the redirect in Traefik. But considering complexity, prefer to turn off Cloudflare proxied record. |
What happened?
I have recently set up a Django project and am trying to deploy it to production but getting a:
What should've happened instead?
The page should load as it normally did in local.
The text was updated successfully, but these errors were encountered: