docker-gen icon indicating copy to clipboard operation
docker-gen copied to clipboard

http = ok, https doesn't work

Open elmero1 opened this issue 9 years ago • 1 comments

Hi I use docker-gen (container) with the official nginx container and nextcloud. http acces to nextcloud is fine. But https doesn't work.

Here are my docker run commands. nextcloud: docker run -d --name nextcloud --link db_nextcloud:db_nextcloud -e UID=1000 -e GID=1000 -e VIRTUAL_HOST=mydomain.com -v /media/75bcfb33-7590-4907-b8d6-e746592fca41/nextcloud/data:/data -v /media/75bcfb33-7590-4907-b8d6-e746592fca41/nextcloud/config:/config -v /media/75bcfb33-7590-4907-b8d6-e746592fca41/nextcloud/apps2:/apps2 wonderfall/nextcloud

nginx: docker run -d --name nginx -p 80:80 -p 443:443 -v /mnt/docker/nginx/proxy/conf.d:/etc/nginx/conf.d -v /mnt/docker/nginx/proxy/certs:/etc/nginx/certs:ro nginx

docker-gen: docker run -d --name nginx-gen --volumes-from nginx -v /var/run/docker.sock:/tmp/docker.sock:ro -v /mnt/docker/nginx-gen/template:/etc/docker-gen/templates jwilder/docker-gen -notify-sighup="nginx" -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf

For testing i had created self signed certificates. The mydomain.com.key and mydomain.com.crt are stored under this path: /mnt/docker/nginx/proxy/certs

Thanks.

elmero1 avatar Sep 14 '16 14:09 elmero1

The template from docker-gen does not contain the SSL part. Only the template from nginx-proxy has this.

Also, you don't need to mount the nginx conf.d volume to a persistent location. It's contents are always generated. You just need to name the volume.

madpipeline avatar Nov 05 '17 16:11 madpipeline

This repo should no longer handle issues or discussions related to nginx-proxy / the nginx-proxy template, unless there is something we need to change / fix in docker-gen in order to allow a change / fix in nginx-proxy.

buchdag avatar May 16 '24 12:05 buchdag