<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hello everyone,<br></div>I am using Nginx in a production environment since some years, but I am almost a newbie with SSL certificates and connections. A the moment I have a configuration with two levels:<br><br></div>1. A first level Nginx that operate as load balancer<br></div>2. Two second level Nginx: the first host a web site and it do not need a SSL connection, the second hosts an Owncloud instance and it need a SSL connection.<br><br></div>I am using Certbot and Let's Encrypt to generate signed certificates. A the moment I have certificates installed in both levels and until last month this configuration was working. After certificates renewal (every three months) I am getting an ERR_CERT_DATE_INVALID and I can not access to Owncloud. Only second level certificate has been renewed. <br><br></div>But if I try to connect directly to second level Nginx, I do not get any error and I can access to Owncloud.<br><br></div>This is first level Nginx config:<br><br><span style="color:rgb(0,0,255)"><span style="font-family:monospace,monospace">upstream cloud {<br> server 10.39.0.52;<br>}<br><br>upstream cloud_ssl {<br> server <a href="http://10.39.0.52:443">10.39.0.52:443</a>;<br>}<br><br><br>server {<br> listen 80 default_server;<br> listen [::]:80 default_server;<br> server_name <a href="http://cloud.diakont.it">cloud.diakont.it</a> cloud.diakont.srl;<br> return 301 https://$server_name$request_uri;<br>}<br><br>server {<br> listen 443 ssl default_server;<br> listen [::]:443 ssl default_server;<br> ssl on;<br> server_name <a href="http://cloud.diakont.it">cloud.diakont.it</a> cloud.diakont.srl;<br> include snippets/cloud.diakont.it.conf;<br> include snippets/ssl-params.conf;<br><br> error_log /var/log/nginx/cloudssl.diakont.it.error.log info;<br> access_log /var/log/nginx/cloudssl.diakont.it.access.log;<br><br> location / {<br> proxy_pass <a href="https://cloud_ssl/">https://cloud_ssl/</a>;<br> proxy_redirect default;<br> proxy_set_header X-Real-IP $remote_addr;<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br> proxy_set_header Host $host;<br> }<br>}</span></span><br><br><br></div>I would like to set first level Nginx to establish a SSL connection with Owncloud without
<span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">having to renew the certificates on both levels</span></span>. Is it possible? How do I have to change my config?<br><br></div>Thanks in advance.<br><br></div>Meph<br></div>