diff --git a/deployment/bare_metal/install.sh b/deployment/bare_metal/install.sh index 933571e7e..dfd8dab7a 100755 --- a/deployment/bare_metal/install.sh +++ b/deployment/bare_metal/install.sh @@ -102,4 +102,4 @@ sudo certbot --certonly # Generate gradido.conf from template # TODO order - first certbot, then nginx setup -envsubst < gradido.conf.template > gradido.conf \ No newline at end of file +envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < gradido.conf.template > gradido.conf \ No newline at end of file diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf.template b/deployment/bare_metal/nginx/sites-available/gradido.conf.template index 2868ac136..cceee1ef5 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.template @@ -1,5 +1,5 @@ -if ($NGINX_SSL = 'true') - server { +server { + if ($NGINX_SSL = 'true') { if ($host = $NGINX_SERVER_NAME) { return 301 https://$host$request_uri; }