Skip to content
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

FYI #2

Open
1beb opened this issue Feb 26, 2017 · 3 comments
Open

FYI #2

1beb opened this issue Feb 26, 2017 · 3 comments

Comments

@1beb
Copy link

1beb commented Feb 26, 2017

There's a problem with the latest version of jrcs/letsencrypt-nginx-proxy-companion so I used the one that I assumed you would have used 4 months ago based on your commit (v1.4) to get your examples working. They worked!

All I had to do was change the image to:

jrcs/letsencrypt-nginx-proxy-companion:v1.4

@pavelsr
Copy link

pavelsr commented Jun 1, 2017

Hi,

Same problem, sample doesn't work with latest jrcs/letsencrypt-nginx-proxy-companion image, when I try access VIRTUAL_HOST / LETSENCRYPT_HOST domain is showing me default http (not https) nginx page instead of main page of sample site:

sample

No error on nginx logs, just 200/304 HTTP code.
When I'm trying to access site with https I got ERR_CONNECTION_REFUSED error and even no one string in log about it!

However problem also wasn't solved by changing image to jrcs/letsencrypt-nginx-proxy-companion:v1.4

@gilyes
Copy link
Owner

gilyes commented Jun 2, 2017

It (eventually) worked for me on a new server using the latest images. It took more than 5 minutes (in addition to the initial DH generation) to generate the certificates.

Part of that delay was about 2 minutes for each service to get to an error like

Unable to reach http://sample.mydomain.com/.well-known/acme-challenge/NCpWTlcsHysVza9GzclhOUp8zEN_jR0F7XIX_KlHlYE

even though I was actually able to manually load that URL during that time. Others are seeing the same issue: nginx-proxy/acme-companion#209

After these errors though the certificates got created anyway.

@pavelsr
Copy link

pavelsr commented Jun 2, 2017

I suspect that something wrong with nginx.tmpl. But no idea how to debug, asked on stack, but no one reply for now.

I found in logs such string:

2017/06/02 12:43:18 [emerg] 1#1: no servers are inside upstream in /etc/nginx/conf.d/default.conf:36

My docker-compose file:

version: "2"

services:
  nginx:
    restart: always
    image: nginx
    container_name: nginx
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/etc/nginx/conf.d"
      - "/etc/nginx/vhost.d"
      - "/usr/share/nginx/html"
      - "./certs:/etc/nginx/certs:ro"
    networks:
      - proxy-tier

  nginx-gen:
    restart: always
    image: jwilder/docker-gen
    container_name: nginx-gen
    volumes:
      - "/var/run/docker.sock:/tmp/docker.sock:ro"
      - "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
    volumes_from:
      - nginx
    entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf

  letsencrypt-nginx-proxy-companion:
    restart: always
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt-nginx-proxy-companion
    volumes_from:
      - nginx
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./certs:/etc/nginx/certs:rw"
    environment:
      - NGINX_DOCKER_GEN_CONTAINER=nginx-gen

networks:
  proxy-tier:
    external:
      name: nginx-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants