From 064661586c88107005a01819ef8b0872e7fc2b0a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 25 Apr 2023 14:54:15 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- nodemgmt-scripts.sh | 12 +++++++----- templates/nginx.proxy.site | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/defaults.inc b/defaults.inc index 855cad9c..0f114dc1 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='4.3.16-04252023' +VERS='4.3.17-04252023' NODETYPES=MYSQL,LB,WEB,NC,WPD,LPD,PW #NODETYPES=WPD,LPD,PW. diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index afb93ad1..7a5cf970 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1328,18 +1328,19 @@ NEWSITE(){ #if [ -z ${SITE_TYPE+x} ]; then SITE_TYPE=local; fi #if [ -z ${CREATE_SSL+x} ]; then CREATE_SSL=true; fi if [ -z ${NEW_SITE+x} ]; then - echo -e -n "${idsCL[LightCyan]}New site domain name: ${idsCL[Default]}" + echo -e -n "${idsCL[LightCyan]}New site domain name (comma seperated for multiple) : ${idsCL[Default]}" read NEW_SITE showdivide=yes fi + if [ -z ${CREATE_SSL+x} ]; then echo -e -n "${idsCL[LightCyan]}Create SSL for site? [Y/n] ${idsCL[Default]}" read CREATE_SSL showdivide=yes if [[ $CREATE_SSL =~ ^[Yy]$ ]] || [ "${CREATE_SSL}" = "" ]; then CREATE_SSL=yes - echo -e -n "${idsCL[LightCyan]}Add additonal domain names to the SSL cert (comma seperated)? : ${idsCL[Default]}" - read ssladd + # echo -e -n "${idsCL[LightCyan]}Add additonal domain names to the SSL cert (comma seperated)? : ${idsCL[Default]}" + # read ssladd else CREATE_SSL=no fi @@ -1407,7 +1408,7 @@ NEWSITE(){ [ "${showdivide}" == "yes" ] && DIVIDER echo width=14 - printf "%-${width}s: %s\n" "New site" "${NEW_SITE}" + printf "%-${width}s: %s\n" "New site" "${NEWSITES}" printf "%-${width}s: %s\n" "Create SSL" "${CREATE_SSL}" printf "%-${width}s: %s\n" "Site type" "${SITE_TYPE}" if [ "${SITE_TYPE}" = "proxy" ]; then @@ -1511,7 +1512,8 @@ NEWSITE(){ [ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS="" cp ${FOLDER}/templates/nginx.proxy.site /etc/nginx/sites-enabled/${MAIN_SITE}.conf - sed -i "s/<>/${MAIN_SITE}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf + sed -i "s/<>/${NGINX_SERVERNAME}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf + sed -i "s/<>/${MAIN_SITE}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf sed -i "s/<>/${PROXYHOST}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf sed -i "s/<>/${PROXYPORT}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf sed -i "s/<>/${PROXYSCHEME}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf diff --git a/templates/nginx.proxy.site b/templates/nginx.proxy.site index 1094969f..107da028 100644 --- a/templates/nginx.proxy.site +++ b/templates/nginx.proxy.site @@ -6,15 +6,15 @@ server { listen 80; listen 443 ssl http2; - server_name <>; + server_name <>; include conf.d/include/letsencrypt-acme-challenge.conf; include conf.d/include/ssl-ciphers.conf; - #ssl_certificate /opt/lb-data/letsencrypt/live/<>/fullchain.pem; - #ssl_certificate_key /opt/lb-data/letsencrypt/live/<>/privkey.pem; + #ssl_certificate /opt/lb-data/letsencrypt/live/<>/fullchain.pem; + #ssl_certificate_key /opt/lb-data/letsencrypt/live/<>/privkey.pem; - access_log /var/log/nginx/<>.proxy.log proxy; - error_log /var/log/nginx/<>.error.log warn; + access_log /var/log/nginx/<>.proxy.log proxy; + error_log /var/log/nginx/<>.error.log warn; <> <>