.
From f5cc2bb7f24e9bdb4cdb3be425383967fb4fdc53 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 18:36:27 +0200
Subject: [PATCH 094/984] Check if it's vesta package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Credits to: Numan Türle @numanturle
---
bin/v-update-sys-vesta | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/bin/v-update-sys-vesta b/bin/v-update-sys-vesta
index f3373823..8db9242d 100755
--- a/bin/v-update-sys-vesta
+++ b/bin/v-update-sys-vesta
@@ -28,6 +28,23 @@ source $VESTA/conf/vesta.conf
# Checking arg number
check_args '1' "$#" 'PACKAGE'
+valid=0
+if [ "$package" = "vesta" ]; then
+ valid=1
+fi
+if [ "$package" = "vesta-nginx" ]; then
+ valid=1
+fi
+if [ "$package" = "vesta-php" ]; then
+ valid=1
+fi
+if [ "$package" = "vesta-softaculous" ]; then
+ valid=1
+fi
+if [ $valid -eq 0 ]; then
+ echo "Package $package is not valid"
+ exit 1
+fi
#----------------------------------------------------------#
# Action #
From d20f1aebd0a189de7dd485ab820b9f835da1e8b0 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 18:48:41 +0200
Subject: [PATCH 095/984] Preventing multiple execution of v-backup-users
---
bin/v-backup-users | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/bin/v-backup-users b/bin/v-backup-users
index 640c1916..5b9f75f4 100755
--- a/bin/v-backup-users
+++ b/bin/v-backup-users
@@ -4,6 +4,14 @@
#
# The function backups all system users.
+scriptname="v-backup-users"
+pidof -x "$scriptname"
+for pid in $(pidof -x "$scriptname"); do
+ if [ $pid != $$ ]; then
+ echo "[$(date)] : $scriptname : Process is already running with PID $pid"
+ exit 1
+ fi
+done
#----------------------------------------------------------#
# Variable&Function #
From 75209618a0f45c9dd67b785be090d5fabe270c51 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 18:55:49 +0200
Subject: [PATCH 096/984] Update v-backup-users
---
bin/v-backup-users | 1 -
1 file changed, 1 deletion(-)
diff --git a/bin/v-backup-users b/bin/v-backup-users
index 5b9f75f4..9671c9e8 100755
--- a/bin/v-backup-users
+++ b/bin/v-backup-users
@@ -5,7 +5,6 @@
# The function backups all system users.
scriptname="v-backup-users"
-pidof -x "$scriptname"
for pid in $(pidof -x "$scriptname"); do
if [ $pid != $$ ]; then
echo "[$(date)] : $scriptname : Process is already running with PID $pid"
From 6ac6f50598d8de41b9f77a5819d293e0cc5888e7 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 19:05:47 +0200
Subject: [PATCH 097/984] Update vesta_compile.sh
---
src/deb/vesta_compile.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/deb/vesta_compile.sh b/src/deb/vesta_compile.sh
index d266d228..389781c9 100644
--- a/src/deb/vesta_compile.sh
+++ b/src/deb/vesta_compile.sh
@@ -58,9 +58,9 @@ BUILD_DATE=$(date +"%d-%b-%Y")
# Set Version for compiling
VESTA_V=$VESTA_VER"_amd64"
-NGINX_V='1.17.7'
-OPENSSL_V='1.1.1d'
-PCRE_V='8.43'
+NGINX_V='1.19.9'
+OPENSSL_V='1.1.1k'
+PCRE_V='8.44'
ZLIB_V='1.2.11'
PHP_V='5.6.40'
From 23d02598a1829a893766677175fded191eb9dd37 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 19:13:17 +0200
Subject: [PATCH 098/984] Update control
---
src/deb/nginx/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/deb/nginx/control b/src/deb/nginx/control
index a263250f..54cada5d 100644
--- a/src/deb/nginx/control
+++ b/src/deb/nginx/control
@@ -1,7 +1,7 @@
Source: vesta-nginx
Package: vesta-nginx
Priority: optional
-Version: 0.9.8-26
+Version: 0.9.8-26-44
Section: admin
Maintainer: Predrag Damnjanovic
Homepage: http://myvestacp.com
From 7d05689ca9cb42ab90f7c60c19e4215a3d6d9eda Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 19:17:58 +0200
Subject: [PATCH 099/984] Update copyright
---
src/deb/nginx/copyright | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/deb/nginx/copyright b/src/deb/nginx/copyright
index 5f58e6bd..3feceb98 100644
--- a/src/deb/nginx/copyright
+++ b/src/deb/nginx/copyright
@@ -3,7 +3,7 @@ Upstream-Name: vesta-nginx
Source: http://myvestacp.com
Files: *
-Copyright: 2019 MyVesta
+Copyright: 2021 MyVesta
License: GPL-3.0+
Remarks: MyVesta is a fork from VestaCP, special thanks to vestacp.com and Serghey Rodin
From 801395c2b1b2b8f544dcd90f9e5e643a3a1ee280 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 19:30:23 +0200
Subject: [PATCH 100/984] vesta-0.9.8-26-44
---
src/deb/latest.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/deb/latest.txt b/src/deb/latest.txt
index c9ff1cd0..56430e65 100644
--- a/src/deb/latest.txt
+++ b/src/deb/latest.txt
@@ -1 +1 @@
-vesta-0.9.8-26-43
+vesta-0.9.8-26-44
From 5f8579697c187e8621f0191cfd1600e45c9638ad Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 19:39:04 +0200
Subject: [PATCH 101/984] Update Changelog.md
---
Changelog.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Changelog.md b/Changelog.md
index a9f65487..250fbb89 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,10 @@
+Version 0.9.8-26-44 [04-Apr-2021]
+==================================================
+* [Security] Preventing denial-of-service in openssl library in vesta-nginx service (CVE-2021-3449)
+* [Security] Preventing admin to install non-vesta packages from vesta admin user interface (Credits to: Numan Türle @numanturle)
+* [Bugfix] Preventing multiple execution of v-backup-users
+* [UserInterface] CSS fix for Apache status table (Credits to: Milos Spasic)
+
Version 0.9.8-26-43 [15-Mar-2021]
==================================================
* [Security] fix for: CSRF remote code execution in UploadHandler.php - CVE-2021-28379 (Credits to: Fady Osman @fady_othman)
From 78f8c0cb110c4e8efb5f0a610d80b34fc994485c Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 4 Apr 2021 19:41:16 +0200
Subject: [PATCH 102/984] Update Changelog.md
---
Changelog.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Changelog.md b/Changelog.md
index 250fbb89..d4db2e5c 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,7 +1,7 @@
Version 0.9.8-26-44 [04-Apr-2021]
==================================================
* [Security] Preventing denial-of-service in openssl library in vesta-nginx service (CVE-2021-3449)
-* [Security] Preventing admin to install non-vesta packages from vesta admin user interface (Credits to: Numan Türle @numanturle)
+* [Security] Preventing admin to install non-vesta packages from vesta admin panel user interface (Credits to: Numan Türle @numanturle)
* [Bugfix] Preventing multiple execution of v-backup-users
* [UserInterface] CSS fix for Apache status table (Credits to: Milos Spasic)
From 39318bafef7079c02d2bac0a1bd960785ba8491f Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 11 Apr 2021 16:58:35 +0200
Subject: [PATCH 103/984] Logging LetsEncrypt process
---
bin/v-add-letsencrypt-domain | 101 ++++++++++++++++++++++++++++++++---
1 file changed, 93 insertions(+), 8 deletions(-)
diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain
index 15361ffb..9dbc335f 100755
--- a/bin/v-add-letsencrypt-domain
+++ b/bin/v-add-letsencrypt-domain
@@ -73,11 +73,16 @@ is_object_unsuspended 'user' 'USER' "$user"
is_object_valid 'web' 'DOMAIN' "$domain"
is_object_unsuspended 'web' 'DOMAIN' "$domain"
get_domain_values 'web'
+
+echo "-----------------------------------------------------------------------------------" >> /usr/local/vesta/log/letsencrypt.log
+echo "[$(date)] : v-add-letsencrypt-domain $domain [$aliases]" >> /usr/local/vesta/log/letsencrypt.log
+
# check if alias is the letsencrypt wildcard domain, if not, make the normal checks
if [[ "$aliases" != "*.$domain" ]]; then
for alias in $(echo "$aliases" |tr ',' '\n' |sort -u); do
check_alias="$(echo $ALIAS |tr ',' '\n' |grep ^$alias$)"
if [ -z "$check_alias" ]; then
+ echo "[$(date)] : EXIT=domain alias $alias doesn't exist" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_NOTEXIST "domain alias $alias doesn't exist"
fi
done
@@ -88,11 +93,14 @@ fi;
#----------------------------------------------------------#
# Registering LetsEncrypt user account
+echo "[$(date)] : v-add-letsencrypt-user $user" >> /usr/local/vesta/log/letsencrypt.log
$BIN/v-add-letsencrypt-user $user
+echo "[$(date)] : result: $?" >> /usr/local/vesta/log/letsencrypt.log
if [ "$?" -ne 0 ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
send_notice "LETSENCRYPT" "Account registration failed"
+ echo "[$(date)] : EXIT=LE account registration" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "LE account registration" >/dev/null
fi
@@ -101,9 +109,11 @@ source $USER_DATA/ssl/le.conf
# Checking wildcard alias
if [ "$aliases" = "*.$domain" ]; then
+ echo "[$(date)] : Checking wildcard alias" >> /usr/local/vesta/log/letsencrypt.log
wildcard='yes'
proto="dns-01"
if [ ! -e "$VESTA/data/users/$user/dns/$domain.conf" ]; then
+ echo "[$(date)] : EXIT=DNS domain $domain doesn't exist" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_NOTEXIST "DNS domain $domain doesn't exist"
fi
else
@@ -111,14 +121,21 @@ else
fi
# Requesting nonce / STEP 1
+echo "[$(date)] : --- Requesting nonce / STEP 1 ---" >> /usr/local/vesta/log/letsencrypt.log
+echo "[$(date)] : curl -s -I \"$API/directory\"" >> /usr/local/vesta/log/letsencrypt.log
answer=$(curl -s -I "$API/directory")
+echo "[$(date)] : answer=$answer" >> /usr/local/vesta/log/letsencrypt.log
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
+echo "[$(date)] : nonce=$nonce" >> /usr/local/vesta/log/letsencrypt.log
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+echo "[$(date)] : status=$status" >> /usr/local/vesta/log/letsencrypt.log
if [[ "$status" -ne 200 ]]; then
+ echo "[$(date)] : EXIT=Let's Encrypt nonce request status $status" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt nonce request status $status"
fi
# Placing new order / STEP 2
+echo "[$(date)] : --- Placing new order / STEP 2 ---" >> /usr/local/vesta/log/letsencrypt.log
url="$API/acme/new-order"
payload='{"identifiers":['
for identifier in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
@@ -127,38 +144,62 @@ for identifier in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
done
payload=$(echo "$payload"|sed "s/,$//")
payload=$payload']}'
+echo "[$(date)] : payload=$payload" >> /usr/local/vesta/log/letsencrypt.log
+echo "[$(date)] : query_le_v2 \"$url\" \"$payload\" \"$nonce\"" >> /usr/local/vesta/log/letsencrypt.log
answer=$(query_le_v2 "$url" "$payload" "$nonce")
+echo "[$(date)] : answer=$answer" >> /usr/local/vesta/log/letsencrypt.log
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
+echo "[$(date)] : nonce=$nonce" >> /usr/local/vesta/log/letsencrypt.log
authz=$(echo "$answer" |grep "acme/authz" |cut -f2 -d '"')
+echo "[$(date)] : authz=$authz" >> /usr/local/vesta/log/letsencrypt.log
finalize=$(echo "$answer" |grep 'finalize":' |cut -f4 -d '"')
+echo "[$(date)] : finalize=$finalize" >> /usr/local/vesta/log/letsencrypt.log
status=$(echo "$answer" |grep HTTP/ |tail -n1 |cut -f2 -d ' ')
+echo "[$(date)] : status=$status" >> /usr/local/vesta/log/letsencrypt.log
if [[ "$status" -ne 201 ]]; then
+ echo "[$(date)] : EXIT=Let's Encrypt new auth status $status" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt new auth status $status"
fi
# Requesting authorization token / STEP 3
+echo "[$(date)] : --- Requesting authorization token / STEP 3 ---" >> /usr/local/vesta/log/letsencrypt.log
for auth in $authz; do
payload=''
+ echo "[$(date)] : for auth=$auth" >> /usr/local/vesta/log/letsencrypt.log
+ echo "[$(date)] : query_le_v2 \"$auth\" \"$payload\" \"$nonce\"" >> /usr/local/vesta/log/letsencrypt.log
answer=$(query_le_v2 "$auth" "$payload" "$nonce")
+ echo "[$(date)] : answer=$answer" >> /usr/local/vesta/log/letsencrypt.log
url=$(echo "$answer" |grep -A3 $proto |grep url |cut -f 4 -d \")
+ echo "[$(date)] : url=$url" >> /usr/local/vesta/log/letsencrypt.log
token=$(echo "$answer" |grep -A3 $proto |grep token |cut -f 4 -d \")
+ echo "[$(date)] : token=$token" >> /usr/local/vesta/log/letsencrypt.log
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
+ echo "[$(date)] : nonce=$nonce" >> /usr/local/vesta/log/letsencrypt.log
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+ echo "[$(date)] : status=$status" >> /usr/local/vesta/log/letsencrypt.log
if [[ "$status" -ne 200 ]]; then
+ echo "[$(date)] : EXIT=Let's Encrypt acme/authz bad status $status" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt acme/authz bad status $status"
fi
- # Accepting challenge / STEP 4
+ # Configuring challenge / STEP 4
+ echo "[$(date)] : --- Configuring challenge / STEP 4 ---" >> /usr/local/vesta/log/letsencrypt.log
+ echo "[$(date)] : wildcard=$wildcard" >> /usr/local/vesta/log/letsencrypt.log
if [ "$wildcard" = 'yes' ]; then
record=$(printf "%s" "$token.$THUMB" |\
openssl dgst -sha256 -binary |encode_base64)
old_records=$($BIN/v-list-dns-records $user $domain plain|grep 'TXT')
old_records=$(echo "$old_records" |grep _acme-challenge |cut -f 1)
for old_record in $old_records; do
- $BIN/v-delete-dns-record $user $domain $old_record
+ $BIN/v-delete-dns-record "$user" "$domain" "$old_record"
done
- $BIN/v-add-dns-record $user $domain "_acme-challenge" "TXT" $record
- check_result $? "DNS _acme-challenge record wasn't created"
+ $BIN/v-add-dns-record "$user" "$domain" "_acme-challenge" "TXT" "$record"
+ exitstatus=$?
+ echo "[$(date)] : v-add-dns-record \"$user\" \"$domain\" \"_acme-challenge\" \"TXT\" \"$record\"" >> /usr/local/vesta/log/letsencrypt.log
+ if [ "$exitstatus" -ne 0 ]; then
+ echo "[$(date)] : EXIT=DNS _acme-challenge record wasn't created" >> /usr/local/vesta/log/letsencrypt.log
+ fi
+ check_result $exitstatus "DNS _acme-challenge record wasn't created"
else
if [ "$WEB_SYSTEM" = 'nginx' ] || [ ! -z "$PROXY_SYSTEM" ]; then
if [ -f "/usr/local/vesta/web/inc/nginx_proxy" ]; then
@@ -167,6 +208,7 @@ for auth in $authz; do
acme_challenge="$well_known/acme-challenge"
mkdir -p $acme_challenge
echo "$token.$THUMB" > $acme_challenge/$token
+ echo "[$(date)] : in $acme_challenge/$token we put: $token.$THUMB" >> /usr/local/vesta/log/letsencrypt.log
chown -R $user:$user $well_known
else
# default nginx method
@@ -179,15 +221,22 @@ for auth in $authz; do
echo ' return 200 "$1.'$THUMB'";' >> $conf
echo '}' >> $conf
fi
+ echo "[$(date)] : in $conf we put: $THUMB" >> /usr/local/vesta/log/letsencrypt.log
if [ ! -e "$sconf" ]; then
ln -s "$conf" "$sconf"
fi
+ echo "[$(date)] : v-restart-proxy" >> /usr/local/vesta/log/letsencrypt.log
$BIN/v-restart-proxy
if [ -z "$PROXY_SYSTEM" ]; then
# apache-less variant
+ echo "[$(date)] : v-restart-web" >> /usr/local/vesta/log/letsencrypt.log
$BIN/v-restart-web
fi
- check_result $? "Proxy restart failed" >/dev/null
+ exitstatus=$?
+ if [ "$exitstatus" -ne 0 ]; then
+ echo "[$(date)] : EXIT=Proxy restart failed = $exitstatus" >> /usr/local/vesta/log/letsencrypt.log
+ fi
+ check_result $exitstatus "Proxy restart failed" >/dev/null
fi
else
well_known="$HOMEDIR/$user/web/$domain/public_html/.well-known"
@@ -195,13 +244,16 @@ for auth in $authz; do
mkdir -p $acme_challenge
echo "$token.$THUMB" > $acme_challenge/$token
chown -R $user:$user $well_known
+ echo "[$(date)] : in $acme_challenge/$token we put: $token.$THUMB" >> /usr/local/vesta/log/letsencrypt.log
# $BIN/v-restart-web
# check_result $? "Web restart failed" >/dev/null
fi
fi
# Requesting ACME validation / STEP 5
+ echo "[$(date)] : --- Requesting ACME validation / STEP 5 ---" >> /usr/local/vesta/log/letsencrypt.log
validation_check=$(echo "$answer" |grep '"valid"')
+ echo "[$(date)] : validation_check=$validation_check" >> /usr/local/vesta/log/letsencrypt.log
if [[ ! -z "$validation_check" ]]; then
validation='valid'
else
@@ -211,22 +263,33 @@ for auth in $authz; do
# Doing pol check on status
i=1
while [ "$validation" = 'pending' ]; do
+ echo "[$(date)] : - Doing pol check on status" >> /usr/local/vesta/log/letsencrypt.log
payload='{}'
+ echo "[$(date)] : query_le_v2 \"$url\" \"$payload\" \"$nonce\"" >> /usr/local/vesta/log/letsencrypt.log
answer=$(query_le_v2 "$url" "$payload" "$nonce")
+ echo "[$(date)] : answer=$answer" >> /usr/local/vesta/log/letsencrypt.log
validation=$(echo "$answer"|grep -A1 $proto |tail -n1|cut -f4 -d \")
+ echo "[$(date)] : validation=$validation" >> /usr/local/vesta/log/letsencrypt.log
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
+ echo "[$(date)] : nonce=$nonce" >> /usr/local/vesta/log/letsencrypt.log
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+ echo "[$(date)] : status=$status" >> /usr/local/vesta/log/letsencrypt.log
if [[ "$status" -ne 200 ]]; then
+ echo "[$(date)] : EXIT=Let's Encrypt validation status $status" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt validation status $status"
fi
i=$((i + 1))
if [ "$i" -gt 10 ]; then
+ echo "[$(date)] : EXIT=Let's Encrypt domain validation timeout" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt domain validation timeout"
fi
- sleep $((i*2))
+ sleeping=$((i*2))
+ echo "[$(date)] : sleep $sleeping (i=$i)" >> /usr/local/vesta/log/letsencrypt.log
+ sleep $sleeping
done
if [ "$validation" = 'invalid' ]; then
+ echo "[$(date)] : EXIT=Let's Encrypt domain verification failed" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt domain verification failed"
fi
done
@@ -237,40 +300,62 @@ ssl_dir=$($BIN/v-generate-ssl-cert "$domain" "info@$domain" "US" "California"\
"San Francisco" "Vesta" "IT" "$aliases" |tail -n1 |awk '{print $2}')
# Sending CSR to finalize order / STEP 6
+echo "[$(date)] : --- Sending CSR to finalize order / STEP 6 ---" >> /usr/local/vesta/log/letsencrypt.log
+
csr=$(openssl req -in $ssl_dir/$domain.csr -outform DER |encode_base64)
payload='{"csr":"'$csr'"}'
+echo "[$(date)] : query_le_v2 \"$finalize\" \"$payload\" \"$nonce\"" >> /usr/local/vesta/log/letsencrypt.log
answer=$(query_le_v2 "$finalize" "$payload" "$nonce")
+echo "[$(date)] : answer=$answer" >> /usr/local/vesta/log/letsencrypt.log
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
+echo "[$(date)] : nonce=$nonce" >> /usr/local/vesta/log/letsencrypt.log
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+echo "[$(date)] : status=$status" >> /usr/local/vesta/log/letsencrypt.log
certificate=$(echo "$answer"|grep 'certificate":' |cut -f4 -d '"')
+echo "[$(date)] : certificate=$certificate" >> /usr/local/vesta/log/letsencrypt.log
if [[ "$status" -ne 200 ]]; then
+ echo "[$(date)] : EXIT=Let's Encrypt finalize bad status $status" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_CONNECT "Let's Encrypt finalize bad status $status"
fi
# Downloading signed certificate / STEP 7
+echo "[$(date)] : --- Downloading signed certificate / STEP 7 ---" >> /usr/local/vesta/log/letsencrypt.log
+echo "[$(date)] : query_le_v2 \"$certificate\" \"\" \"$nonce\"" >> /usr/local/vesta/log/letsencrypt.log
answer=$(query_le_v2 "$certificate" "" "$nonce" "$ssl_dir/$domain.pem")
+echo "[$(date)] : answer=$answer" >> /usr/local/vesta/log/letsencrypt.log
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+echo "[$(date)] : status=$status" >> /usr/local/vesta/log/letsencrypt.log
if [[ "$status" -ne 200 ]]; then
[ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
+ echo "[$(date)] : EXIT=Let's Encrypt downloading signed cert failed status: $status" >> /usr/local/vesta/log/letsencrypt.log
check_result $E_NOTEXIST "Let's Encrypt downloading signed cert failed status: $status"
fi
# Splitting up downloaded pem
+echo "[$(date)] : - Splitting up downloaded pem" >> /usr/local/vesta/log/letsencrypt.log
crt_end=$(grep -n END $ssl_dir/$domain.pem |head -n1 |cut -f1 -d:)
+echo "[$(date)] : crt_end=$crt_end" >> /usr/local/vesta/log/letsencrypt.log
head -n $crt_end $ssl_dir/$domain.pem > $ssl_dir/$domain.crt
pem_lines=$(wc -l $ssl_dir/$domain.pem |cut -f 1 -d ' ')
+echo "[$(date)] : pem_lines=$pem_lines" >> /usr/local/vesta/log/letsencrypt.log
ca_end=$(grep -n "BEGIN" $ssl_dir/$domain.pem |tail -n1 |cut -f 1 -d :)
+echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
ca_end=$(( pem_lines - crt_end + 1 ))
+echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
tail -n $ca_end $ssl_dir/$domain.pem > $ssl_dir/$domain.ca
# Adding SSL
ssl_home=$(search_objects 'web' 'LETSENCRYPT' 'yes' 'SSL_HOME')
$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1
+echo "[$(date)] : v-add-web-domain-ssl $user $domain $ssl_dir $ssl_home" >> /usr/local/vesta/log/letsencrypt.log
$BIN/v-add-web-domain-ssl $user $domain $ssl_dir $ssl_home
-if [ "$?" -ne '0' ]; then
+$exitstatus=$?
+echo "[$(date)] : v-add-web-domain-ssl status: $exitstatus" >> /usr/local/vesta/log/letsencrypt.log
+if [ "$exitstatus" -ne '0' ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
+ echo "[$(date)] : EXIT=$domain certificate installation failed" >> /usr/local/vesta/log/letsencrypt.log
send_notice 'LETSENCRYPT' "$domain certificate installation failed"
check_result $? "SSL install" >/dev/null
fi
@@ -301,7 +386,7 @@ sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
# Notifying user
send_notice 'LETSENCRYPT' "$domain SSL has been installed successfully"
-
+echo "[$(date)] : EXIT=***** $domain SSL has been installed successfully *****" >> /usr/local/vesta/log/letsencrypt.log
# Logging
log_event "$OK" "$ARGUMENTS"
From e9b6cd6d0928fe8b5767ae440fdd91e4c2dd328b Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 11 Apr 2021 18:12:07 +0200
Subject: [PATCH 104/984] Update v-add-letsencrypt-domain
---
bin/v-add-letsencrypt-domain | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain
index 9dbc335f..a87d7618 100755
--- a/bin/v-add-letsencrypt-domain
+++ b/bin/v-add-letsencrypt-domain
@@ -357,7 +357,7 @@ if [ "$exitstatus" -ne '0' ]; then
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
echo "[$(date)] : EXIT=$domain certificate installation failed" >> /usr/local/vesta/log/letsencrypt.log
send_notice 'LETSENCRYPT' "$domain certificate installation failed"
- check_result $? "SSL install" >/dev/null
+ check_result $exitstatus "SSL install" >/dev/null
fi
# Adding LE autorenew cronjob
From f1acff47effc1da5d0013d97d40af4b2121b18dc Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 11 Apr 2021 18:15:06 +0200
Subject: [PATCH 105/984] Temporary fix for double "END CERTIFICATE"
Credits to HestiaCP @hestiacp
---
bin/v-add-letsencrypt-domain | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain
index a87d7618..94ccb9be 100755
--- a/bin/v-add-letsencrypt-domain
+++ b/bin/v-add-letsencrypt-domain
@@ -345,6 +345,11 @@ ca_end=$(( pem_lines - crt_end + 1 ))
echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
tail -n $ca_end $ssl_dir/$domain.pem > $ssl_dir/$domain.ca
+# Temporary fix for double "END CERTIFICATE"
+if [[ $(head -n 1 $ssl_dir/$domain.ca) = "-----END CERTIFICATE-----" ]]; then
+ sed -i '1,2d' $ssl_dir/$domain.ca
+fi
+
# Adding SSL
ssl_home=$(search_objects 'web' 'LETSENCRYPT' 'yes' 'SSL_HOME')
$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1
From a7b209ff3f65e7e2741a214caee9650b65662a0a Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 11 Apr 2021 19:39:19 +0200
Subject: [PATCH 106/984] Update v-add-letsencrypt-domain
---
bin/v-add-letsencrypt-domain | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain
index 94ccb9be..3f666f67 100755
--- a/bin/v-add-letsencrypt-domain
+++ b/bin/v-add-letsencrypt-domain
@@ -332,17 +332,17 @@ if [[ "$status" -ne 200 ]]; then
fi
# Splitting up downloaded pem
-echo "[$(date)] : - Splitting up downloaded pem" >> /usr/local/vesta/log/letsencrypt.log
+# echo "[$(date)] : - Splitting up downloaded pem" >> /usr/local/vesta/log/letsencrypt.log
crt_end=$(grep -n END $ssl_dir/$domain.pem |head -n1 |cut -f1 -d:)
-echo "[$(date)] : crt_end=$crt_end" >> /usr/local/vesta/log/letsencrypt.log
+# echo "[$(date)] : crt_end=$crt_end" >> /usr/local/vesta/log/letsencrypt.log
head -n $crt_end $ssl_dir/$domain.pem > $ssl_dir/$domain.crt
pem_lines=$(wc -l $ssl_dir/$domain.pem |cut -f 1 -d ' ')
-echo "[$(date)] : pem_lines=$pem_lines" >> /usr/local/vesta/log/letsencrypt.log
+# echo "[$(date)] : pem_lines=$pem_lines" >> /usr/local/vesta/log/letsencrypt.log
ca_end=$(grep -n "BEGIN" $ssl_dir/$domain.pem |tail -n1 |cut -f 1 -d :)
-echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
+# echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
ca_end=$(( pem_lines - crt_end + 1 ))
-echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
+# echo "[$(date)] : ca_end=$ca_end" >> /usr/local/vesta/log/letsencrypt.log
tail -n $ca_end $ssl_dir/$domain.pem > $ssl_dir/$domain.ca
# Temporary fix for double "END CERTIFICATE"
From 74209ee7dbb393e70271af8c9547c31f52a840bf Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Mon, 12 Apr 2021 00:12:04 +0200
Subject: [PATCH 107/984] Warn admin if LE renewing failed for hostname
---
bin/v-update-letsencrypt-ssl | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl
index 36d7a1e9..3105c86c 100755
--- a/bin/v-update-letsencrypt-ssl
+++ b/bin/v-update-letsencrypt-ssl
@@ -23,6 +23,9 @@ source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
lecounter=0
+hostname=$(hostname)
+
+echo "[$(date)] : -----------------------------------------------------------------------------------" >> /usr/local/vesta/log/letsencrypt_cron.log
# Checking user certificates
for user in $($BIN/v-list-users plain |cut -f 1); do
@@ -31,8 +34,20 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
fail_counter=$(get_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
- if [[ "$fail_counter" -ge 7 ]]; then
- echo "$domain failed $fail_counter times for LetsEncrypt renewing, skipping"
+
+ if [[ "$fail_counter" -ge 8 ]]; then
+ if [ "$hostname" = "$domain" ]; then
+ if [ -z "$SKIP_HOSTNAME_LETSENCRIPT_RENEWING_WARNING" ]; then
+ email=$(grep CONTACT $VESTA/data/users/admin/user.conf)
+ email=$(echo "$email" | cut -f 2 -d "'")
+ echo "hostname $domain failed for LetsEncrypt renewing" | $SENDMAIL -s "LetsEncrypt renewing hostname $hostname" "$email" 'yes'
+ fi
+ fi
+ fi
+
+ if [[ "$fail_counter" -ge 8 ]]; then
+ # echo "$domain failed $fail_counter times for LetsEncrypt renewing, skipping"
+ echo "[$(date)] : $domain failed $fail_counter times for LetsEncrypt renewing, skipping" >> /usr/local/vesta/log/letsencrypt_cron.log
continue;
fi
crt_data=$(openssl x509 -text -in $USER_DATA/ssl/$domain.crt)
@@ -53,11 +68,13 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
aliases=$(echo "$aliases" |sed -e ':a;N;$!ba;s/\n/,/g')
msg=$($BIN/v-add-letsencrypt-domain $user $domain $aliases)
if [ $? -ne 0 ]; then
- echo "$domain $msg"
if [[ $msg == *"is suspended" ]]; then
- echo "OK, it's suspended"
+ echo "[$(date)] : SUSPENDED: $domain $msg" >> /usr/local/vesta/log/letsencrypt_cron.log
else
+ echo "[$(date)] : $domain $msg" >> /usr/local/vesta/log/letsencrypt_cron.log
+ echo "$domain $msg"
fail_counter=$(alter_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
+ echo "[$(date)] : fail_counter = $fail_counter" >> /usr/local/vesta/log/letsencrypt_cron.log
echo "fail_counter = $fail_counter"
fi
fi
From dba978b2007549097b4f29958b6bea9e488c0378 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Mon, 12 Apr 2021 00:13:33 +0200
Subject: [PATCH 108/984] Update v-update-letsencrypt-ssl
---
bin/v-update-letsencrypt-ssl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl
index 3105c86c..be61c6c9 100755
--- a/bin/v-update-letsencrypt-ssl
+++ b/bin/v-update-letsencrypt-ssl
@@ -35,7 +35,7 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
fail_counter=$(get_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
- if [[ "$fail_counter" -ge 8 ]]; then
+ if [[ "$fail_counter" -ge 7 ]]; then
if [ "$hostname" = "$domain" ]; then
if [ -z "$SKIP_HOSTNAME_LETSENCRIPT_RENEWING_WARNING" ]; then
email=$(grep CONTACT $VESTA/data/users/admin/user.conf)
@@ -45,7 +45,7 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
fi
fi
- if [[ "$fail_counter" -ge 8 ]]; then
+ if [[ "$fail_counter" -ge 7 ]]; then
# echo "$domain failed $fail_counter times for LetsEncrypt renewing, skipping"
echo "[$(date)] : $domain failed $fail_counter times for LetsEncrypt renewing, skipping" >> /usr/local/vesta/log/letsencrypt_cron.log
continue;
From 1f56c826e3f2cb0bc5a1052bc57540a44c6de6f7 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Mon, 12 Apr 2021 10:01:38 +0200
Subject: [PATCH 109/984] Update v-add-letsencrypt-domain
---
bin/v-add-letsencrypt-domain | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain
index 3f666f67..edd2c8d5 100755
--- a/bin/v-add-letsencrypt-domain
+++ b/bin/v-add-letsencrypt-domain
@@ -355,7 +355,7 @@ ssl_home=$(search_objects 'web' 'LETSENCRYPT' 'yes' 'SSL_HOME')
$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1
echo "[$(date)] : v-add-web-domain-ssl $user $domain $ssl_dir $ssl_home" >> /usr/local/vesta/log/letsencrypt.log
$BIN/v-add-web-domain-ssl $user $domain $ssl_dir $ssl_home
-$exitstatus=$?
+exitstatus=$?
echo "[$(date)] : v-add-web-domain-ssl status: $exitstatus" >> /usr/local/vesta/log/letsencrypt.log
if [ "$exitstatus" -ne '0' ]; then
touch $VESTA/data/queue/letsencrypt.pipe
From e1d962e60b6025b404f6428824807b5e8baf877c Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 10:50:53 +0200
Subject: [PATCH 110/984] Introducing UPDATE_SSL_SCRIPT2 callback
---
bin/v-add-web-domain-ssl | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl
index 2c0f78ae..6d9deb9b 100755
--- a/bin/v-add-web-domain-ssl
+++ b/bin/v-add-web-domain-ssl
@@ -149,6 +149,13 @@ if [ ! -z "$UPDATE_SSL_SCRIPT" ]; then
eval "$UPDATE_SSL_SCRIPT $user $domain"
fi
+UPDATE_SSL_SCRIPT2=''
+source $VESTA/conf/vesta.conf
+if [ ! -z "$UPDATE_SSL_SCRIPT2" ]; then
+ eval "$UPDATE_SSL_SCRIPT2 $user $domain"
+fi
+
+
# Logging
log_history "enabled ssl support for $domain"
log_event "$OK" "$ARGUMENTS"
From d40424eb4d5af632b39d3183d6928184da787eb8 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 12:44:27 +0200
Subject: [PATCH 111/984] Create node-app-3000.tpl
---
.../tools/nodejs-nginx-templates/node-app-3000.tpl | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.tpl
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.tpl
new file mode 100644
index 00000000..851ac0dc
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://%domain_idn%$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
From dd9c8cf1f6f1aca23582c71fafdd78f8df7f591c Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 12:45:32 +0200
Subject: [PATCH 112/984] nodejs nginx templates
---
.../node-app-3000-no-https-force.stpl | 52 +++++++++++++++++++
.../node-app-3000-no-https-force.tpl | 45 ++++++++++++++++
.../node-app-3000-pass-to-https.stpl | 52 +++++++++++++++++++
.../node-app-3000-pass-to-https.tpl | 8 +++
.../nodejs-nginx-templates/node-app-3000.stpl | 52 +++++++++++++++++++
.../node-app-nextjs-3000.stpl | 37 +++++++++++++
.../node-app-nextjs-3000.tpl | 8 +++
7 files changed, 254 insertions(+)
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.tpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.tpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl
new file mode 100644
index 00000000..85fb4a95
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ # test %port_num%
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ root %sdocroot%/public;
+ index index.html;
+
+ location / {
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+
+ # try_files $uri $uri/ @rewrites;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ }
+ }
+
+ location @rewrites {
+ rewrite ^(.+)$ /index.html last;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
\ No newline at end of file
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.tpl
new file mode 100644
index 00000000..fff0aebb
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.tpl
@@ -0,0 +1,45 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ root %sdocroot%/public;
+ index index.html;
+
+ location / {
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+
+ # try_files $uri $uri/ @rewrites;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ }
+ }
+
+ location @rewrites {
+ rewrite ^(.+)$ /index.html last;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl
new file mode 100644
index 00000000..a392afef
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ # test %port_num%
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ root %sdocroot%/public;
+ index index.html;
+
+ location / {
+ proxy_pass https://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+
+ # try_files $uri $uri/ @rewrites;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ }
+ }
+
+ location @rewrites {
+ rewrite ^(.+)$ /index.html last;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
\ No newline at end of file
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.tpl
new file mode 100644
index 00000000..851ac0dc
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://%domain_idn%$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl
new file mode 100644
index 00000000..85fb4a95
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ # test %port_num%
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ root %sdocroot%/public;
+ index index.html;
+
+ location / {
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+
+ # try_files $uri $uri/ @rewrites;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ }
+ }
+
+ location @rewrites {
+ rewrite ^(.+)$ /index.html last;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
\ No newline at end of file
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl
new file mode 100644
index 00000000..1d8dcffe
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl
@@ -0,0 +1,37 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ # test %port_num%
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ location / {
+ # reverse proxy for next server
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+ # we need to remove this 404 handling
+ # because next's _next folder and own handling
+ # try_files $uri $uri/ =404;
+ }
+
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
\ No newline at end of file
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl
new file mode 100644
index 00000000..851ac0dc
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://%domain_idn%$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
From d03d8e95371f9599b29ac7708e29b99549f3983c Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 18:07:03 +0200
Subject: [PATCH 113/984] send_email_to_admin function
---
func/main.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/func/main.sh b/func/main.sh
index c128202b..5f71bb1f 100644
--- a/func/main.sh
+++ b/func/main.sh
@@ -1098,3 +1098,19 @@ no_symlink_chmod() {
chmod "${filemode}" "${i}"
done
}
+
+# $1 = subject
+# $2 = body
+send_email_to_admin() {
+ email=$(grep CONTACT /usr/local/vesta/data/users/admin/user.conf)
+ email=$(echo "$email" | cut -f 2 -d "'")
+ if [ -z "$email" ]; then
+ if [ ! -z "$NOTIFY_ADMIN_FULL_BACKUP" ]; then
+ email=$NOTIFY_ADMIN_FULL_BACKUP
+ fi
+ fi
+ if [ -z "$email" ]; then
+ return;
+ fi
+ echo "$2" | $SENDMAIL -s "$1" "$email" 'yes'
+}
From 6b30357f9a3997917f9ea4d1cb8765e940e5515a Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 18:09:33 +0200
Subject: [PATCH 114/984] Update v-update-letsencrypt-ssl
---
bin/v-update-letsencrypt-ssl | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl
index be61c6c9..aa1f8167 100755
--- a/bin/v-update-letsencrypt-ssl
+++ b/bin/v-update-letsencrypt-ssl
@@ -38,9 +38,7 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
if [[ "$fail_counter" -ge 7 ]]; then
if [ "$hostname" = "$domain" ]; then
if [ -z "$SKIP_HOSTNAME_LETSENCRIPT_RENEWING_WARNING" ]; then
- email=$(grep CONTACT $VESTA/data/users/admin/user.conf)
- email=$(echo "$email" | cut -f 2 -d "'")
- echo "hostname $domain failed for LetsEncrypt renewing" | $SENDMAIL -s "LetsEncrypt renewing hostname $hostname" "$email" 'yes'
+ send_email_to_admin "LetsEncrypt renewing hostname $hostname" "Warning: hostname $domain failed for LetsEncrypt renewing"
fi
fi
fi
From be9710f9ead3ce8142d7cff8b76399c4bf04fcc1 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 18:25:56 +0200
Subject: [PATCH 115/984] Update v-update-letsencrypt-ssl
---
bin/v-update-letsencrypt-ssl | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl
index aa1f8167..80b07159 100755
--- a/bin/v-update-letsencrypt-ssl
+++ b/bin/v-update-letsencrypt-ssl
@@ -35,11 +35,10 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
fail_counter=$(get_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
- if [[ "$fail_counter" -ge 7 ]]; then
+ if [[ "$fail_counter" -eq 7 ]]; then
if [ "$hostname" = "$domain" ]; then
- if [ -z "$SKIP_HOSTNAME_LETSENCRIPT_RENEWING_WARNING" ]; then
- send_email_to_admin "LetsEncrypt renewing hostname $hostname" "Warning: hostname $domain failed for LetsEncrypt renewing"
- fi
+ fail_counter=$(alter_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
+ send_email_to_admin "LetsEncrypt renewing hostname $hostname" "Warning: hostname $domain failed for LetsEncrypt renewing"
fi
fi
From 3611b888e572257eb0b6a18b4627452452686c20 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 18:55:22 +0200
Subject: [PATCH 116/984] Update v-update-letsencrypt-ssl
---
bin/v-update-letsencrypt-ssl | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl
index 80b07159..ac3e2eda 100755
--- a/bin/v-update-letsencrypt-ssl
+++ b/bin/v-update-letsencrypt-ssl
@@ -33,16 +33,20 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
+ limit_check=1
fail_counter=$(get_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
- if [[ "$fail_counter" -eq 7 ]]; then
- if [ "$hostname" = "$domain" ]; then
+ if [[ "$hostname" = "$domain" ]]; then
+ if [[ "$fail_counter" -eq 7 ]]; then
+ limit_check=0
+ fi
+ if [[ "$fail_counter" -eq 8 ]]; then
fail_counter=$(alter_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
send_email_to_admin "LetsEncrypt renewing hostname $hostname" "Warning: hostname $domain failed for LetsEncrypt renewing"
fi
fi
- if [[ "$fail_counter" -ge 7 ]]; then
+ if [[ "$fail_counter" -ge 7 ]] && [[ "$limit_check" -eq 1 ]]; then
# echo "$domain failed $fail_counter times for LetsEncrypt renewing, skipping"
echo "[$(date)] : $domain failed $fail_counter times for LetsEncrypt renewing, skipping" >> /usr/local/vesta/log/letsencrypt_cron.log
continue;
From 76efd9a1cd14bd5eb05d1a6ab3606596168d34a2 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 19:05:07 +0200
Subject: [PATCH 117/984] Version 0.9.8-26-45
---
src/deb/latest.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/deb/latest.txt b/src/deb/latest.txt
index 56430e65..c95b3f55 100644
--- a/src/deb/latest.txt
+++ b/src/deb/latest.txt
@@ -1 +1 @@
-vesta-0.9.8-26-44
+vesta-0.9.8-26-45
From 7c5948b579df8e7944c0183c1807d5ddd69e131f Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 19:12:17 +0200
Subject: [PATCH 118/984] Update Changelog.md
---
Changelog.md | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Changelog.md b/Changelog.md
index d4db2e5c..cedb6cc7 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,4 +1,10 @@
-Version 0.9.8-26-44 [04-Apr-2021]
+Version 0.9.8-26-45 [13-Apr-2021]
+==================================================
+* [Feature] Logging whole LetsEncrypt process to /usr/local/vesta/log/letsencrypt.log and /usr/local/vesta/log/letsencrypt_cron.log
+* [Feature] Warn admin once (by sending email) if LetsEncrypt renewing failed for server hostname
+* [Bugfix] Correct truncating of CA LetsEncrypt certificate (thanks to HestiaCP @hestiacp for fix)
+
+* Version 0.9.8-26-44 [04-Apr-2021]
==================================================
* [Security] Preventing denial-of-service in openssl library in vesta-nginx service (CVE-2021-3449)
* [Security] Preventing admin to install non-vesta packages from vesta admin panel user interface (Credits to: Numan Türle @numanturle)
From 7293dd9f7b9de9310b97db0e5a2348a3dab39671 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 19:12:41 +0200
Subject: [PATCH 119/984] Update Changelog.md
---
Changelog.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Changelog.md b/Changelog.md
index cedb6cc7..78567100 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,7 +4,7 @@ Version 0.9.8-26-45 [13-Apr-2021]
* [Feature] Warn admin once (by sending email) if LetsEncrypt renewing failed for server hostname
* [Bugfix] Correct truncating of CA LetsEncrypt certificate (thanks to HestiaCP @hestiacp for fix)
-* Version 0.9.8-26-44 [04-Apr-2021]
+Version 0.9.8-26-44 [04-Apr-2021]
==================================================
* [Security] Preventing denial-of-service in openssl library in vesta-nginx service (CVE-2021-3449)
* [Security] Preventing admin to install non-vesta packages from vesta admin panel user interface (Credits to: Numan Türle @numanturle)
From e6067fa57be7528ff224aa2015a4ba19936544f7 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 21:16:22 +0200
Subject: [PATCH 120/984] Rename node-app-nextjs-3000.stpl to
node-app-that-also-handle-static files-3000.stpl
---
...00.stpl => node-app-that-also-handle-static files-3000.stpl} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename src/deb/for-download/tools/nodejs-nginx-templates/{node-app-nextjs-3000.stpl => node-app-that-also-handle-static files-3000.stpl} (99%)
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000.stpl
similarity index 99%
rename from src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl
rename to src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000.stpl
index 1d8dcffe..9b0a5853 100644
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.stpl
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000.stpl
@@ -34,4 +34,4 @@ server {
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
-}
\ No newline at end of file
+}
From 2a4832abf53a1bbad8b066a245ecad38e933d22c Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 21:19:57 +0200
Subject: [PATCH 121/984] Update and rename node-app-nextjs-3000.tpl to
node-app-that-also-handle-static files-3000tpl
---
.../node-app-nextjs-3000.tpl | 8 -----
...-app-that-also-handle-static files-3000tpl | 29 +++++++++++++++++++
2 files changed, 29 insertions(+), 8 deletions(-)
delete mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl
create mode 100644 src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000tpl
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl
deleted file mode 100644
index 851ac0dc..00000000
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-nextjs-3000.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-server {
- listen %ip%:%proxy_port%;
- server_name %domain_idn% %alias_idn%;
- location / {
- rewrite ^(.*) https://%domain_idn%$1 permanent;
- }
-include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
-}
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000tpl
new file mode 100644
index 00000000..93267737
--- /dev/null
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000tpl
@@ -0,0 +1,29 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ # reverse proxy for next server
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+ # we need to remove this 404 handling
+ # because next's _next folder and own handling
+ # try_files $uri $uri/ =404;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
From a4732472084c5959a008ad87a38932ddac3aa62b Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 21:24:34 +0200
Subject: [PATCH 122/984] Rename node-app-that-also-handle-static
files-3000.stpl to node-app-also-handle-static files-3000.stpl
---
...iles-3000.stpl => node-app-also-handle-static files-3000.stpl} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/deb/for-download/tools/nodejs-nginx-templates/{node-app-that-also-handle-static files-3000.stpl => node-app-also-handle-static files-3000.stpl} (100%)
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000.stpl
similarity index 100%
rename from src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000.stpl
rename to src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000.stpl
From 3bc6bcd9ab96039b7a782d21c53c39b5821b0dc5 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 21:24:59 +0200
Subject: [PATCH 123/984] Rename node-app-that-also-handle-static files-3000tpl
to node-app-also-handle-static files-3000tpl
---
...ic files-3000tpl => node-app-also-handle-static files-3000tpl} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/deb/for-download/tools/nodejs-nginx-templates/{node-app-that-also-handle-static files-3000tpl => node-app-also-handle-static files-3000tpl} (100%)
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000tpl
similarity index 100%
rename from src/deb/for-download/tools/nodejs-nginx-templates/node-app-that-also-handle-static files-3000tpl
rename to src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000tpl
From c5e4a069fa345520ced3ad5a08e105d13399e326 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 21:27:51 +0200
Subject: [PATCH 124/984] Rename node-app-also-handle-static files-3000.stpl to
node-app-also-handle-static-files-3000.stpl
---
...iles-3000.stpl => node-app-also-handle-static-files-3000.stpl} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/deb/for-download/tools/nodejs-nginx-templates/{node-app-also-handle-static files-3000.stpl => node-app-also-handle-static-files-3000.stpl} (100%)
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000.stpl
similarity index 100%
rename from src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000.stpl
rename to src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000.stpl
From 74823ca988ed552eac4797c7de6b02018548ad00 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Tue, 13 Apr 2021 21:28:21 +0200
Subject: [PATCH 125/984] Rename node-app-also-handle-static files-3000tpl to
node-app-also-handle-static-files-3000tpl
---
...ic files-3000tpl => node-app-also-handle-static-files-3000tpl} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/deb/for-download/tools/nodejs-nginx-templates/{node-app-also-handle-static files-3000tpl => node-app-also-handle-static-files-3000tpl} (100%)
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000tpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000tpl
similarity index 100%
rename from src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static files-3000tpl
rename to src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000tpl
From 543e6b5bc9c9796a287d876318311970d262bc33 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Thu, 15 Apr 2021 20:24:33 +0200
Subject: [PATCH 126/984] Sorting issue fix
Closing https://github.com/myvesta/vesta/issues/116
Thanks to @jaapmarcus and @hestiacp
---
web/templates/admin/list_user.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html
index 4685d183..7dd47577 100644
--- a/web/templates/admin/list_user.html
+++ b/web/templates/admin/list_user.html
@@ -81,7 +81,7 @@
?>
" sort-date="=strtotime($data[$key]['DATE'].' '.$data[$key]['TIME'])?>" sort-name="=$key?>"
+v_unit_id="=$key?>" sort-date="=strtotime($data[$key]['DATE'].' '.$data[$key]['TIME'])?>" sort-name="=strtolower($key)?>"
sort-bandwidth="=$data[$key]['U_BANDWIDTH']?>" sort-disk="=$data[$key]['U_DISK']?>" sort-star=" if($_SESSION['favourites']['USER'][$key] == 1) echo '1'; else echo '0'; ?>">