allow custom ports from params file

This commit is contained in:
Asif Bacchus
2019-10-17 21:43:28 -06:00
parent 39fa12eab6
commit 9fee0fdebf
3 changed files with 15 additions and 7 deletions
+6
View File
@@ -10,6 +10,12 @@ printf "\nUpdating server name list... "
sed -i -e "s%<SERVER_NAMES>%${SERVER_NAMES}%" /etc/nginx/server_names.conf
printf "done\n"
# update HTTPS redirect port if SSL server test block exists
if [ -f "/etc/nginx/sites/note" ]; then
printf "\nUpdating port redirects...\n"
sed -i -e "s%<HTTPS_PORT>%${HTTPS_PORT}%" /etc/nginx/sites/05-test_secured.conf.disabled
fi
# activate HSTS
if [ "$HSTS" = TRUE ]; then
printf "Activating HSTS configuration... "
+1 -1
View File
@@ -6,7 +6,7 @@ server {
# default redirect to properly formed HTTPS location
location / {
return 301 https://$host$request_uri;
return 301 https://$host:<HTTPS_PORT>$request_uri;
}
# process Let's Encrypt challenges