Add proxy snippets and use nginx-light

This commit is contained in:
Alexandre Iooss 2019-03-14 10:53:44 +01:00
parent f9473d0769
commit a8fa5d69ff
5 changed files with 82 additions and 16 deletions

View file

@ -0,0 +1,29 @@
# {{ ansible_managed }}
# Listen for IPv4 and IPv6 with HTTP2
listen [::]:443 ssl http2;
listen 443 ssl http2;
# Hide NGINX version
server_tokens off;
# Reverse Proxy Adm
set_real_ip_from 10.128.0.0/16;
real_ip_header P-Real-Ip;
# SSL
ssl on;
ssl_session_timeout 5m;
ssl_ciphers "HIGH:!aNULL:!eNULL:!EXP:!LOW:!MD5:!DES:!3DES";
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
# In buster we will be able to use TLSv1.3
ssl_protocols TLSv1.2;
# Executer "cd /etc/ssl/certs; openssl dhparam -out dhparam.pem 4096" avant d'activer
ssl_dhparam /etc/ssl/certs/dhparam.pem;
# Enable OCSP Stapling, point to certificate chain
ssl_stapling on;
ssl_stapling_verify on;

View file

@ -0,0 +1,12 @@
# {{ ansible_managed }}
# Listen for IPv4 and IPv6 with HTTP2
listen 80 http2;
listen [::]:80 http2;
# Hide NGINX version
server_tokens off;
# Reverse Proxy Adm
set_real_ip_from 10.128.0.0/16;
real_ip_header P-Real-Ip;