update
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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/<<HOSTNAME>>/${MAIN_SITE}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
sed -i "s/<<SERVER_NAME>>/${NGINX_SERVERNAME}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
sed -i "s/<<MAIN_SITE>>/${MAIN_SITE}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
sed -i "s/<<PROXY_IP>>/${PROXYHOST}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
sed -i "s/<<PROXY_PORT>>/${PROXYPORT}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
sed -i "s/<<PROXY_SCHEME>>/${PROXYSCHEME}/g" /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
|
||||
@@ -6,15 +6,15 @@ server {
|
||||
listen 80;
|
||||
listen 443 ssl http2;
|
||||
|
||||
server_name <<HOSTNAME>>;
|
||||
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/<<HOSTNAME>>/fullchain.pem;
|
||||
#ssl_certificate_key /opt/lb-data/letsencrypt/live/<<HOSTNAME>>/privkey.pem;
|
||||
#ssl_certificate /opt/lb-data/letsencrypt/live/<<MAIN_SITE>>/fullchain.pem;
|
||||
#ssl_certificate_key /opt/lb-data/letsencrypt/live/<<MAIN_SITE>>/privkey.pem;
|
||||
|
||||
access_log /var/log/nginx/<<HOSTNAME>>.proxy.log proxy;
|
||||
error_log /var/log/nginx/<<HOSTNAME>>.error.log warn;
|
||||
access_log /var/log/nginx/<<MAIN_SITE>>.proxy.log proxy;
|
||||
error_log /var/log/nginx/<<MAIN_SITE>>.error.log warn;
|
||||
|
||||
<<EXPLOITS>>
|
||||
<<WEBSOCKET>>
|
||||
|
||||
Reference in New Issue
Block a user