only replace variables that are defined, try to fix nginx template

This commit is contained in:
Ulf Gebhardt 2022-01-08 04:57:30 +01:00
parent 58f391f167
commit f511882f57
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 3 additions and 3 deletions

View File

@ -102,4 +102,4 @@ sudo certbot --certonly
# Generate gradido.conf from template # Generate gradido.conf from template
# TODO order - first certbot, then nginx setup # TODO order - first certbot, then nginx setup
envsubst < gradido.conf.template > gradido.conf envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < gradido.conf.template > gradido.conf

View File

@ -1,5 +1,5 @@
if ($NGINX_SSL = 'true') server {
server { if ($NGINX_SSL = 'true') {
if ($host = $NGINX_SERVER_NAME) { if ($host = $NGINX_SERVER_NAME) {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }