File tree 2 files changed +16
-0
lines changed 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 18
18
# Note: if $DHPARAM_BITS is not defined, generate-dhparam.sh will use 2048 as a default
19
19
/app/generate-dhparam.sh $DHPARAM_BITS
20
20
21
+ # Compute the DNS resolvers for use in the templates
22
+ export RESOLVERS=$( awk ' $1 == "nameserver" {print $2}' ORS=' ' /etc/resolv.conf | sed ' s/ *$//g' )
23
+ if [ " x$RESOLVERS " = " x" ]; then
24
+ echo " Warning: unable to determine DNS resolvers for nginx" >&2
25
+ fi
26
+
21
27
# If the user has run the default command and the socket doesn't exist, fail
22
28
if [ " $socketMissing " = 1 -a " $1 " = forego -a " $2 " = start -a " $3 " = ' -r' ]; then
23
29
exit 1
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ log_format vhost '$host $remote_addr - $remote_user [$time_local] '
58
58
59
59
access_log off;
60
60
61
+ {{ if ne $.Env.RESOLVERS "" }}
62
+ resolver {{ $.Env.RESOLVERS }};
63
+ {{ end }}
64
+
61
65
{{ if (exists "/etc/nginx/proxy.conf") }}
62
66
include /etc/nginx/proxy.conf;
63
67
{{ else }}
@@ -198,6 +202,12 @@ server {
198
202
ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }};
199
203
{{ end }}
200
204
205
+ {{ if (exists (printf "/etc/nginx/certs/%s.chain.crt" $cert)) }}
206
+ ssl_stapling on;
207
+ ssl_stapling_verify on;
208
+ ssl_trusted_certificate {{ printf "/etc/nginx/certs/%s.chain.crt" $cert }};
209
+ {{ end }}
210
+
201
211
{{ if (ne $https_method "noredirect") }}
202
212
add_header Strict-Transport-Security "max-age=31536000";
203
213
{{ end }}
You can’t perform that action at this time.
0 commit comments