{% if ansible_os_family == "RedHat" %} include /usr/share/nginx/modules/mod-http-xslt-filter.conf; {% endif %} user {{ nginx_user }}; worker_processes auto; error_log {{ nginx_logdir }}/error.log; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $host'; access_log {{ nginx_logdir }}/access.log main; ssl on; ssl_session_timeout 1d; ssl_session_cache shared:MozSSL:10m; ssl_session_tickets off; ssl_dhparam {{ tls_certs }}/ffdhe3072.pem; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off; add_header Strict-Transport-Security "max-age=63072000" always; proxy_ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt; proxy_ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key; server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name {{ inventory_hostname }}; ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}-fullchain.crt; ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key; ssl_client_certificate {{ tls_certs }}/ca.crt; ssl_verify_client on; root /srv/web/{{ inventory_hostname }}; include /etc/nginx/conf.d/{{ inventory_hostname }}/*.conf; } include /etc/nginx/mime.types; include /etc/nginx/conf.d/*.conf; }