deployment on nginx - https protocol #345
-
Hi Problem descriptionI have been able to experiment COG tiler capabilities on local setup with nginx used as a proxy server. Moving to production, I introduced certificates routing all traffic to https. A
Same errors are emitted when calling tilejson endpoint to render tiles on map. The
Environment InformationI'm running developmentseed/titiler docker image with the port exposed being used by nginx to proxy_pass the service. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
@jaysnm I don't think this is a bug or has anything to do with TiTiler? I think the error you are seeing is related to GDAL libcurl not being able to use ssl. I'm going to move this to the |
Beta Was this translation helpful? Give feedback.
-
I ran into a similar problem with nginx as reverse proxy. Some endpoints seem to subsequently call other endpoints and use http instead of https. e.g.: putting a COG url into the https://titiler.xyz.dev/cog/viewer input box results in following error in the dev console in the browser.
In this setup nginx terminates SSL and forwards the request via http to the titiler container. Does this assumption seem correct? |
Beta Was this translation helpful? Give feedback.
-
@vincentsarago thank you for hinting the starlette issues! After digging the starlette docs I found the solution: The reverse proxy has to set the To get titiler to use the Working k8s definition to get it up and running:
|
Beta Was this translation helpful? Give feedback.
-
I had similar issues.. Adding this line to my NGINX server block cleared things up
Found the info here https://stackoverflow.com/questions/34656273/how-to-handle-nginx-reverse-proxy-https-to-http-scheme-redirect |
Beta Was this translation helpful? Give feedback.
@jaysnm I don't think this is a bug or has anything to do with TiTiler?
I think the error you are seeing is related to GDAL libcurl not being able to use ssl.
I'm going to move this to the
discussion
board and at the same time it could help if you provide more info about how you installed titiler. my first hint is you could try to set https://github.com/developmentseed/titiler/blob/master/Dockerfile#L3