@@ -138,14 +138,16 @@ proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
138
138
proxy_set_header Proxy "";
139
139
{{ end }}
140
140
141
+ {{ $access_log := (or (and (not $.Env.DISABLE_ACCESS_LOGS) "access_log /var/log/nginx/access.log vhost;") "") }}
142
+
141
143
{{ $enable_ipv6 := eq (or ($.Env.ENABLE_IPV6) "") "true" }}
142
144
server {
143
145
server_name _; # This is just an invalid value which will never trigger on a real hostname.
144
146
listen {{ $external_http_port }};
145
147
{{ if $enable_ipv6 }}
146
148
listen [::]:{{ $external_http_port }};
147
149
{{ end }}
148
- access_log /var/log/nginx/access.log vhost;
150
+ {{ $ access_log }}
149
151
return 503;
150
152
}
151
153
@@ -156,7 +158,7 @@ server {
156
158
{{ if $enable_ipv6 }}
157
159
listen [::]:{{ $external_https_port }} ssl http2;
158
160
{{ end }}
159
- access_log /var/log/nginx/access.log vhost;
161
+ {{ $ access_log }}
160
162
return 503;
161
163
162
164
ssl_session_cache shared:SSL:50m;
@@ -248,7 +250,7 @@ server {
248
250
{{ if $enable_ipv6 }}
249
251
listen [::]:{{ $external_http_port }} {{ $default_server }};
250
252
{{ end }}
251
- access_log /var/log/nginx/access.log vhost;
253
+ {{ $ access_log }}
252
254
253
255
# Do not HTTPS redirect Let'sEncrypt ACME challenge
254
256
location /.well-known/acme-challenge/ {
@@ -271,7 +273,7 @@ server {
271
273
{{ if $enable_ipv6 }}
272
274
listen [::]:{{ $external_https_port }} ssl http2 {{ $default_server }};
273
275
{{ end }}
274
- access_log /var/log/nginx/access.log vhost;
276
+ {{ $ access_log }}
275
277
276
278
{{ if eq $network_tag "internal" }}
277
279
# Only allow traffic from internal clients
@@ -343,7 +345,7 @@ server {
343
345
{{ if $enable_ipv6 }}
344
346
listen [::]:80 {{ $default_server }};
345
347
{{ end }}
346
- access_log /var/log/nginx/access.log vhost;
348
+ {{ $ access_log }}
347
349
348
350
{{ if eq $network_tag "internal" }}
349
351
# Only allow traffic from internal clients
@@ -388,7 +390,7 @@ server {
388
390
{{ if $enable_ipv6 }}
389
391
listen [::]:{{ $external_https_port }} ssl http2 {{ $default_server }};
390
392
{{ end }}
391
- access_log /var/log/nginx/access.log vhost;
393
+ {{ $ access_log }}
392
394
return 500;
393
395
394
396
ssl_certificate /etc/nginx/certs/default.crt;
0 commit comments