diff --git a/scripts/nginx_config_create.sh b/scripts/nginx_config_create.sh index 9430e3b..96ee59a 100755 --- a/scripts/nginx_config_create.sh +++ b/scripts/nginx_config_create.sh @@ -41,8 +41,13 @@ file="/tmp/$DOMAIN.conf" if [[ "$HTTP_PORT" != "80" ]]; then echo "server { -listen 80 proxy_protocol; -set_real_ip_from 0.0.0.0/0; +listen 80 proxy_protocol;" + if [[ "$ALIASES_HTTP" != "" ]]; then + echo "server_name $DOMAIN_NAME $ALIASES_HTTP;" + else + echo "server_name $DOMAIN_NAME;" + fi +echo "set_real_ip_from 0.0.0.0/0; real_ip_header proxy_protocol; rewrite_log on; return 301 https://$DOMAIN_NAME;