Closed tocks53 closed 8 years ago
The problem is that you are mounting over top of /etc/nginx
, which includes required configuration files from the image. If you want to mount in site-specific Nginx config files, mount them at /etc/nginx/conf.d
. Keep in mind, though, if you mount that directory you'll want to copy the default.conf
file from this repo into that directory to maintain the default SSL options and redirect.
I'd recommend just creating an image that starts FROM bradjonesllc/docker-nginx-letsencrypt
and adding the config files and other tweaks, there.
2) in my letsencript/live, the are only one directory. My first CERTS. The second CERTS don't create a directory ?
That's because this image is a quick-start to obtain and renew a single cert chain - it might have alternate names (e.g., if you specify host1.example.com,host2.example.com
, you get a single cert valid for both hosts) but it's a single Let's Encrypt cert. Since Nginx, unlike HAProxy, can't dynamically find a certificate in a directory, this is a shortcut to getting a fixed universe of related sites going under a single SSL cert. Managing multiple certificates is possible (and I'm doing so with a different project I might end up publishing) but it requires you to specify the cert filename in the vhost config.
thanks a lot for your help.
It's perfect
Hello, thanks a lot for your docker. But i have a problem.
I run the docker on a synology.
I use 2 domains : tata.mydomain.eu and dsm.mydomain.eu
I create 3 folders :
my conf : mont a directory for /etc/ssl/dhparam, /etc/letsencrypt and /etc/nginx
I select the good forward ports, and add CERTS and EMAIL
and, i run the docker
my logs :
2016-08-22 14:10:54 stdout nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:54 stdout 2016/08/22 14:10:54 [emerg] 26#26: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:51 stdout nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:51 stdout 2016/08/22 14:10:51 [emerg] 25#25: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:49 stdout nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:49 stdout 2016/08/22 14:10:49 [emerg] 24#24: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:48 stdout dnsmasq[23]: read /etc/hosts - 7 addresses 2016-08-22 14:10:48 stdout dnsmasq[23]: using nameserver 8.8.8.8#53 2016-08-22 14:10:48 stdout dnsmasq[23]: reading /etc/resolv.conf 2016-08-22 14:10:48 stdout dnsmasq[23]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect 2016-08-22 14:10:48 stdout dnsmasq[23]: started, version 2.72 cache disabled 2016-08-22 14:10:48 stdout nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:48 stdout 2016/08/22 14:10:48 [emerg] 22#22: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) 2016-08-22 14:10:47 stdout 2016-08-22 14:10:47,889 CRIT Server 'inet_http_server' running without any HTTP authentication checking 2016-08-22 14:10:47 stdout 2016-08-22 14:10:47,868 CRIT Supervisor running as root (no user in config file) 2016-08-22 14:10:47 stdout 'Supervisord is running as root and it is searching ' 2016-08-22 14:10:47 stdout /usr/local/lib/python2.7/dist-packages/supervisor-3.3.0-py2.7.egg/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. 2016-08-22 14:10:47 stdout 2016-08-22 14:10:47 stdout Donating to EFF: https://eff.org/donate-le 2016-08-22 14:10:47 stdout Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate 2016-08-22 14:10:47 stdout 2016-08-22 14:10:47 stdout - If you like Certbot, please consider supporting our work by: 2016-08-22 14:10:47 stdout making regular backups of this folder is ideal. 2016-08-22 14:10:47 stdout also contain certificates and private keys obtained by Certbot so 2016-08-22 14:10:47 stdout secure backup of this folder now. This configuration directory will 2016-08-22 14:10:47 stdout configuration directory at /etc/letsencrypt. You should make a 2016-08-22 14:10:47 stdout - Your account credentials have been saved in your Certbot 2016-08-22 14:10:47 stdout e-mails sent to bertrand.sarradin@gmail.com. 2016-08-22 14:10:47 stdout - If you lose your account credentials, you can recover through 2016-08-22 14:10:47 stdout renew" 2016-08-22 14:10:47 stdout non-interactively renew *all* of your certificates, run "certbot 2016-08-22 14:10:47 stdout this certificate in the future, simply run certbot again. To 2016-08-22 14:10:47 stdout will expire on 2016-11-20. To obtain a new or tweaked version of 2016-08-22 14:10:47 stdout /etc/letsencrypt/live/tata.sarradin.eu/fullchain.pem. Your cert 2016-08-22 14:10:47 stdout [0m - Congratulations! Your certificate and chain have been saved at 2016-08-22 14:10:47 stdout IMPORTANT NOTES: 2016-08-22 14:10:47 stdout [1m 2016-08-22 14:10:36 stdout ...................................................................+........................+...........................................................................................................+............................+............................+.......................+............................................+........................................................................+............+.....................................................+........................................................................................................................................................+.........................................................................................................+..................................................................................................................................................................................................................................................+.....................................................................................................................+......................................+.........................................................................................................................................................................................+..........................................................+...................................................................................................................................................................................................+....+........................................................................................................................................................................................................................................................................+.........+.....................................................................................................................................................................+......................................................................................................................................................+............................................................................................................................................................................................+...............................+...............................................................................................................................+...+.........................................................+...................................................................+............+.................................................................................+............................+..............................+...+...........................................................................................................+.............................................................................................+............................................................................................................................................+..................+.................................................+.............................+.......................................................................................................................+.....+................................+...........................+..............................................................................................................................................................................................................................................+...................................................+....+.....................................................................................................+.........................................................................................+................................................+...................................................+............................................+..................................+..........................................................................+.....+..+....+...................................................................................................................+................+........................+...................+.........+....................+...............................................+...............................................................................................................................................................+...........................................................................................................................................................................................................................................................+.........................................................................................................................................................................................................................................................................................................................+.....................................................................................................+......................................................................+.............................+........................................................................................+............................+................+...............................................................................................................+..................+......................................+.....................................................+......................................................................................................................................................................+..........................+...................+.......................................................................+..+........................................................+.........................................................................................................+...........................................................................+.............................................................................................+......................................................................................+........................................+..........+..................................+........................................................................................................................................................+..................+...............+.................................+..........................................................+.........................+.................................................................+........+................................................+................................+.................................+..............................................................................................................................................................................................+....................................................................................................................................+................................................................................................................................+...............................................................................................+.+......................................................................................+...........................................................................................+.......................................................+...................................................................................................................................................................................+.....................................+.....................+..........................................................................................................................+..........................................................+....+..............................................+.......................................+...........................................+............................................................................................+..+................................................................+...................................................................................................................................................................................................+...........+.....................................................................................................................+....................................................................................................................................................................................+....................................+..................................................+...................................................................................................................+..............................................+............................+........+.+.......................+.....................................................................................................+..........................................................................................................................................+...............................................................................................+..........................................................................................................+....................................................................++*++* 2016-08-22 14:06:21 stdout This is going to take a long time 2016-08-22 14:06:21 stdout Generating DH parameters, 2048 bit long safe prime, generator 2
I can read : 2016/08/22 14:10:48 [emerg] 22#22: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
1 )I don't understand why the docker dont create the nginx.cong ?
2) in my letsencript/live, the are only one directory. My first CERTS. The second CERTS don't create a directory ?
3) in letsencrupt/live.tata.mydomain.eu : there are no file ?
Thanks for your work. Can you help me ?