allow custom ports from params file
This commit is contained in:
@@ -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... "
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user