From e45b2e703b7a4ef922d0ee0f9889adb9fbf38184 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 23 Apr 2025 10:21:10 +0100 Subject: [PATCH] add logging format --- terraform/nginx_config.tftpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/terraform/nginx_config.tftpl b/terraform/nginx_config.tftpl index e122f03..9efd4d7 100644 --- a/terraform/nginx_config.tftpl +++ b/terraform/nginx_config.tftpl @@ -32,6 +32,8 @@ server { root /var/www/certbot; } + access_log /var/log/nginx/access.log my_custom_format; + ${extra-value} %{~ if http2_bool~} http2 on; @@ -39,10 +41,16 @@ server { %{~ endif ~} listen 443 ssl; + %{~ if listen_port_80_bool~} + listen 80; + %{~ endif ~} + ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem; ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem; } +%{~ if redirect_to_https_bool~} + server { if ($host = www.${name_site}.tryton.geeraert.eu) { return 301 https://$host$request_uri; @@ -58,4 +66,4 @@ server { return 404; } - +%{~ endif ~}