codesuki / ecs-nginx-proxy

Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.
MIT License
98 stars 23 forks source link

HTTPS support #8

Closed simplesteph closed 7 years ago

simplesteph commented 7 years ago

It seems we only have http support for now with this image.

nginx-proxy is using a VIRTUAL_PROTO environment variable https://github.com/jwilder/nginx-proxy/blob/985c46d8b56f2ee4652e9d75b49c128c14bee328/nginx.tmpl#L134

And sets a bunch of configs in https://github.com/jwilder/nginx-proxy/blob/985c46d8b56f2ee4652e9d75b49c128c14bee328/nginx.tmpl

I personally have no ideas what these config mean and how to properly configure nginx so I won't be able to propose a PR, but I believe cherry picking his code would be enough.

Also, would the ELB forward port 443 to port 80 of nginx or to port 443?

codesuki commented 7 years ago

I think that depends where you terminate the SSL connection. In my case I am using SSL to the LB and then go without SSL from the LB to the nginx. If you terminate at nginx then probably forward to 443.

I wouldn't like to just copy paste the code without understanding it. Would need to make some certs and set up a test instance to figure it out.

simplesteph commented 7 years ago

makes sense. I'm going to close that as that's enough. I believe you're loading wildcard certificates on your ELB which gives you SSL traffic for all your containers, right?

codesuki commented 7 years ago

Exactly.