server {
listen 80; #IPv4 Unsecured
listen [::]:80; #IPv6 Unsecured
listen 443 ssl http2; #IPv4 HTTPS PORT
listen [::]:443 ssl http2; #IPv6 HTTPS PORT
server_name networkflare.com www.networkflare.com; #domain name(s)
#Certificate Paths
ssl_certificate /filepath/cert/site/certificate.pem;
ssl_certificate_key /filepath/cert/site/key.key;
#SSL Settings
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_session_tickets off;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!MD5:!DSS:!EXP:!ADH:!LOW:!MEDIUM;So I am curious if there is a way with Lua I won't have to restart my Nginx when the SSL cert/key/chain currently being used for the server in the defined directory gets updated / modified by the letsencrypt program (scheduled task).server { listen 80; #IPv4 Unsecured listen [::]:80; #IPv6 Unsecured listen 443 ssl http2; #IPv4 HTTPS PORT listen [::]:443 ssl http2; #IPv6 HTTPS PORT server_name networkflare.com www.networkflare.com; #domain name(s) #Certificate Paths ssl_certificate /filepath/cert/site/certificate.pem; ssl_certificate_key /filepath/cert/site/key.key; #SSL Settings ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_session_tickets off; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!MD5:!DSS:!EXP:!ADH:!LOW:!MEDIUM;
Be much more useful if Lua could make it so we don't need our nginx restarted every time letsencrypt updates a server locations certs, Every time nginx restarts it wipes our caches etc.
Also who ever the unlucky person who tries to visit in the seconds / milliseconds that an nginx restarts takes place obviously can't access the site.
ssl_certificate_by_lua_block {Hey there,
Thanks for the info and links.
I see they use thisssl_certificate_by_lua_block {
I take it with that Lua directive I can just define ssl_cert_path_to_certificate and ssl_key_path_to_key to use that would load any dynamicly changing certificate and key from the directory i specify on the fly in a non blocking manner does anyone have a example ?
These are the certificate and key files i have to choose from but i notice the Lua syntax says DER and these files that was generated by my letsencrypt are all PEM format.
https://cloud.githubusercontent.com/assets/12204587/24085357/84e08b68-0cf2-11e7-860d-a2f5fb48e3bf.png
The chain file is PEM the only DER file is this one "networkflare.com-crt"