I have a nginx image load balanced setup. Lets encrypt works great on my basic site but having issues with the load balanced part. Any help would be great.
I ran the steps below. Then I copied my pem files to the server 1 and server 2. Does not seem to be working
Please fill out the fields below so we can help you better.
My domain is: pics.example.com
nginx load balancer
nginx server 1
nginx server 2
…etc
================ start ==========================
This is my load balance round robin server
philipfwilson@picslb:/etc/nginx/conf.d$ cat ld-balancer.com
upstream picsinfo {
server 192.168.00.123:1234;
server 192.168.00.124:1234;
server 192.168.00.115:1234;
}
server {
listen 443 ssl;
server_name pics.example.com;
proxy_ssl_certificate /etc/letsencrypt/live/pics.example.com/fullchain.pem;
proxy_ssl_certificate_key /etc/letsencrypt/live/pics.example.com/privkey.pem;
proxy_ssl_trusted_certificate /etc/letsencrypt/live/pics.example.com/chain.pem;
ssl_certificate /etc/letsencrypt/live/pics.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/pics.example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/pics.example.com/chain.pem;
proxy_ssl_verify on;
proxy_ssl_verify_depth 2;
proxy_ssl_session_reuse on;
location / {
proxy_pass http://picsinfo;
}
}
================ end lb round robin setup ==========================
================ start server setup ==========================
server {
listen 443 ssl;
server_name default_server;
proxy_ssl_certificate /etc/letsencrypt/live/pics.example.com/fullchain.pem;
proxy_ssl_certificate_key /etc/letsencrypt/live/pics.example.com/privkey.pem;
proxy_ssl_trusted_certificate /etc/letsencrypt/live/pics.example.com/chain.pem;
ssl_certificate /etc/letsencrypt/live/pics.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/pics.example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/pics.example.com/chain.pem;
proxy_ssl_verify on;
proxy_ssl_verify_depth 2;
proxy_ssl_session_reuse on;
root /var/www/pics_images;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location /pics_images/ {
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
================ end server setup ==========================
==========================
I ran this command:
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install certbot
sudo certbot certonly --standalone -d pics.example.com
It produced this output:
phil@picsloader:/etc/nginx$ sudo certbot certonly --standalone -d pics.example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices) (Enter ‘c’ to
cancel):philipfwilson@emailaddress.com
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
(A)gree/©ancel: A
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let’s Encrypt project and the non-profit
organization that develops Certbot? We’d like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
(Y)es/(N)o: N
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for pics.example.com
Waiting for verification…
Cleaning up challenges
Generating key (2048 bits): /etc/letsencrypt/keys/1234_key-certbot.pem
Creating CSR: /etc/letsencrypt/csr/0000_csr-certbot.pem
IMPORTANT NOTES:
-
Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/pics.example.com/fullchain.pem. Your cert
will expire on 2017-07-27. To obtain a new or tweaked version of
this certificate in the future, simply run certbot again. To
non-interactively renew all of your certificates, run “certbot
renew” -
If you lose your account credentials, you can recover through
e-mails sent to philipfwilson@yahoo.com. -
Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal. -
If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let’s Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
My operating system is (include version):
ubuntu 16.04
My web server is (include version):
nginx
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don’t know):
yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no