wmnnd / nginx-certbot

Boilerplate configuration for nginx and certbot with docker-compose
MIT License
3.15k stars 1.17k forks source link

script places dh parameters in wrong place #71

Open hanscees opened 4 years ago

hanscees commented 4 years ago

Hi,

the howto says

https://medium.com/@pentacent/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71

use this: include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

But the script puts the files in /etc/letsencrypt/conf/options-ssl-nginx.conf;

At least thats what happened in my case.

weleoka commented 4 years ago

Hi,

That is correct, if I am not mistaken, then this is not an issue.

There is a mapping concerning the volume mounting between the two containers nginx and certbot. See relevant lines in docker-compose.yml:

  nginx:
    volumes:
      - ./data/nginx:/etc/nginx/conf.d
      - ./data/certbot/conf:/etc/letsencrypt <-- here!
      - ./data/certbot/www:/var/www/certbot
      . . .
  certbot:
    volumes:
      - ./data/certbot/conf:/etc/letsencrypt
      - ./data/certbot/www:/var/www/certbot
     . . .

so the script saves to hostmachine on $datafolder/conf which is thus ./data/certbot/conf and that is mounted to the nginx container to the path /etc/letsencrypt.

Resolves issue?