-
Notifications
You must be signed in to change notification settings - Fork 117
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
Infinite redirect loop when attempting to enable SSL on most recent image #67
Comments
Hi, I had a similar issue and think I have a fix for it. Sorry I haven't written it up very well, #68 I used this as a starting point: #28 The trick seems to be setting rails environment to production The main changes was in the Docker file: I also had a few lines to update /cartodb/config/app_config.yml for port 443/https Seems that now carto have lots of checks for dev environment and will redirect to http://. |
Also you should be able to remove I found the change to /cartodb/app/models/user/user_decorator.rb seems to cause errors/crash when i create a new tables. |
Also getting infinite redirects here. It's been really difficult to set up https on the application side. For me it seems that adding |
I'm happy to try to help you if i can, Could you list out the steps you have done to set it up briefly? I was working on a different version in November and December so my method might be broken now. Do you have nginx running outside docker on the host machine? Have you made the changes to the following files to allow for HTTPS+ different/ports? Also people have been able to get it to work without ENV RAILS_ENV=production but i couldn't. |
Thanks, @aarontract. I have setup ssl using a load balancer, outside the application and outside nginx. My steps:
But still getting infinite redirects. If I remove |
All sounds good to me. In your nginx rule on your docker server machine do you have something like server { location ~* /(user/.*/)?api/v1/maps { location ~* /(user/.*/)?api/v1/map { location ~* /(user/.)?/api/v2/sql { It could be something in cartodb inside the docker container seeing the requests with a destination address of your servers local network hostname, not your public domain name and it's trying to redirect you to that public address. If this is happening this might be caused by your load balancer routing the requests. I think I experienced this at some point. Just to be clean, with my setup, I more or less have the same nginx rule more above set on my host machine, with docker I expose ports 3000, 8080, 8181. The nginx inside the docker host isn't doing much. The only difference between my setup and yours is I have lets encrypt cert on my server, rather than one on a load balancer. But it should still work. |
I have the same nginx config as you... The fact that the Maybe related to this CartoDB/cartodb#3927 |
Sorry, I'm not sure what is going on. I have tried to replicate your setup by putting a separate load balancer in front of my box + pull the latest image and everything is still working. I have pulled the latest image, ran all my setup. On AWS The carto server is only listening on port 443. I updated the dns details to point to the load balancer, not my carto server's address. And that was it, I didn't make any changes to the setup. I will try to clean up my setup document post it up in the next few days. You might have to just get really creative with your trail and error, I spent a few very frustrating days on it before it started working. |
Hello there ! Get the same problem here, with Traefik as reverse-proxy/load balancer :( |
@aarontract could you maybe post the config files for your setup with the load balancer, the one you managed to get working? If you could post your |
For the load balancer i just used an aws wizard. Might help to take this out, get a lets encrypt cert on the host machine and have it only take request over https, if you can get that working try adding the load balancer as the last step. I have done a find and replace for app_config.yml, development.js and database.yml, In /cartodb/config/app_config.yml: In /Windshaft-cartodb/config/environments/development.js : in /cartodb/config/database.yml run: here is a copy of app_config.yml: nginx rule sitting on the host box is: Also here is my docker-compose file: |
I'm having an issue with an infinite redirect after logging into the carto app when I attempt to enable ssl on the most recent image on docker hub (2 months ago).
What other specific changes do I need to make for this to work? I'm not necessarily needing the full production configuration (though if a repo with a WORKING version exists, I'd be happy if you could point me towards it), just want to get the app to function as it does now but with https.
My EXACT configuration below -no other changes made:
cartodb.nginx
Dockerfile:
Run command:
The text was updated successfully, but these errors were encountered: