Browse Source

Merge branch 'staging/fixes' into main

Kristan Kenney 5 years ago
parent
commit
15405d64ca
100 changed files with 1345 additions and 260 deletions
  1. 4 0
      CHANGELOG.md
  2. 1 7
      bin/v-add-cron-hestia-autoupdate
  3. 7 2
      bin/v-add-sys-webmail
  4. 8 9
      bin/v-add-user
  5. 11 10
      bin/v-change-user-name
  6. 1 0
      bin/v-delete-cron-hestia-autoupdate
  7. 7 3
      bin/v-delete-sys-webmail
  8. 6 4
      bin/v-download-backup
  9. 5 6
      bin/v-list-user
  10. 4 5
      bin/v-list-users
  11. 2 2
      bin/v-rebuild-mail-domain
  12. 2 2
      bin/v-rebuild-mail-domains
  13. 3 1
      func/ip.sh
  14. 1 2
      func/main.sh
  15. 8 1
      func/rebuild.sh
  16. 1 21
      func/upgrade.sh
  17. 1 1
      install/deb/filemanager/filegator/backend/Services/Auth/Adapters/HestiaAuth.php
  18. 2 2
      install/deb/nginx/phpmyadmin.inc
  19. 1 1
      install/deb/nginx/phppgadmin.inc
  20. 5 0
      install/deb/templates/web/apache2/default.stpl
  21. 5 0
      install/deb/templates/web/apache2/default.tpl
  22. 5 0
      install/deb/templates/web/apache2/hosting.stpl
  23. 5 0
      install/deb/templates/web/apache2/hosting.tpl
  24. 5 0
      install/deb/templates/web/apache2/php-fpm/default.stpl
  25. 5 0
      install/deb/templates/web/apache2/php-fpm/default.tpl
  26. 5 0
      install/deb/templates/web/apache2/phpcgi.stpl
  27. 5 0
      install/deb/templates/web/apache2/phpcgi.tpl
  28. 5 0
      install/deb/templates/web/apache2/phpfcgid.stpl
  29. 5 0
      install/deb/templates/web/apache2/phpfcgid.tpl
  30. 5 0
      install/deb/templates/web/nginx/caching.stpl
  31. 5 0
      install/deb/templates/web/nginx/caching.tpl
  32. 5 0
      install/deb/templates/web/nginx/default.stpl
  33. 5 0
      install/deb/templates/web/nginx/default.tpl
  34. 5 0
      install/deb/templates/web/nginx/hosting.stpl
  35. 5 0
      install/deb/templates/web/nginx/hosting.tpl
  36. 5 0
      install/deb/templates/web/nginx/php-fpm/cms_made_simple.stpl
  37. 5 0
      install/deb/templates/web/nginx/php-fpm/cms_made_simple.tpl
  38. 5 0
      install/deb/templates/web/nginx/php-fpm/codeigniter2.stpl
  39. 5 0
      install/deb/templates/web/nginx/php-fpm/codeigniter2.tpl
  40. 5 0
      install/deb/templates/web/nginx/php-fpm/codeigniter3.stpl
  41. 5 0
      install/deb/templates/web/nginx/php-fpm/codeigniter3.tpl
  42. 5 0
      install/deb/templates/web/nginx/php-fpm/datalife_engine.stpl
  43. 5 0
      install/deb/templates/web/nginx/php-fpm/datalife_engine.tpl
  44. 5 0
      install/deb/templates/web/nginx/php-fpm/default.stpl
  45. 5 0
      install/deb/templates/web/nginx/php-fpm/default.tpl
  46. 5 0
      install/deb/templates/web/nginx/php-fpm/dokuwiki.stpl
  47. 5 0
      install/deb/templates/web/nginx/php-fpm/dokuwiki.tpl
  48. 90 0
      install/deb/templates/web/nginx/php-fpm/drupal-composer.stpl
  49. 86 0
      install/deb/templates/web/nginx/php-fpm/drupal-composer.tpl
  50. 90 0
      install/deb/templates/web/nginx/php-fpm/drupal-social.stpl
  51. 86 0
      install/deb/templates/web/nginx/php-fpm/drupal-social.tpl
  52. 5 0
      install/deb/templates/web/nginx/php-fpm/drupal6.stpl
  53. 5 0
      install/deb/templates/web/nginx/php-fpm/drupal6.tpl
  54. 43 30
      install/deb/templates/web/nginx/php-fpm/drupal7.stpl
  55. 43 30
      install/deb/templates/web/nginx/php-fpm/drupal7.tpl
  56. 43 30
      install/deb/templates/web/nginx/php-fpm/drupal8.stpl
  57. 45 31
      install/deb/templates/web/nginx/php-fpm/drupal8.tpl
  58. 5 0
      install/deb/templates/web/nginx/php-fpm/joomla.stpl
  59. 5 0
      install/deb/templates/web/nginx/php-fpm/joomla.tpl
  60. 5 0
      install/deb/templates/web/nginx/php-fpm/laravel.stpl
  61. 5 0
      install/deb/templates/web/nginx/php-fpm/laravel.tpl
  62. 5 0
      install/deb/templates/web/nginx/php-fpm/magento.stpl
  63. 5 0
      install/deb/templates/web/nginx/php-fpm/magento.tpl
  64. 5 0
      install/deb/templates/web/nginx/php-fpm/modx.stpl
  65. 5 0
      install/deb/templates/web/nginx/php-fpm/modx.tpl
  66. 5 0
      install/deb/templates/web/nginx/php-fpm/moodle.stpl
  67. 5 0
      install/deb/templates/web/nginx/php-fpm/moodle.tpl
  68. 5 0
      install/deb/templates/web/nginx/php-fpm/no-php.stpl
  69. 5 0
      install/deb/templates/web/nginx/php-fpm/no-php.tpl
  70. 5 0
      install/deb/templates/web/nginx/php-fpm/odoo.stpl
  71. 5 0
      install/deb/templates/web/nginx/php-fpm/odoo.tpl
  72. 5 0
      install/deb/templates/web/nginx/php-fpm/opencart.stpl
  73. 5 0
      install/deb/templates/web/nginx/php-fpm/opencart.tpl
  74. 5 0
      install/deb/templates/web/nginx/php-fpm/owncloud.stpl
  75. 5 0
      install/deb/templates/web/nginx/php-fpm/owncloud.tpl
  76. 5 0
      install/deb/templates/web/nginx/php-fpm/piwik.stpl
  77. 5 0
      install/deb/templates/web/nginx/php-fpm/piwik.tpl
  78. 5 0
      install/deb/templates/web/nginx/php-fpm/pyrocms.stpl
  79. 5 0
      install/deb/templates/web/nginx/php-fpm/pyrocms.tpl
  80. 5 0
      install/deb/templates/web/nginx/php-fpm/sendy.stpl
  81. 5 0
      install/deb/templates/web/nginx/php-fpm/sendy.tpl
  82. 90 0
      install/deb/templates/web/nginx/php-fpm/thunder.stpl
  83. 86 0
      install/deb/templates/web/nginx/php-fpm/thunder.tpl
  84. 5 0
      install/deb/templates/web/nginx/php-fpm/wordpress.stpl
  85. 5 0
      install/deb/templates/web/nginx/php-fpm/wordpress.tpl
  86. 5 0
      install/deb/templates/web/nginx/proxy_ip.tpl
  87. 6 14
      install/hst-install-debian.sh
  88. 5 13
      install/hst-install-ubuntu.sh
  89. 28 5
      install/upgrade/versions/latest.sh
  90. 0 3
      src/deb/hestia/postinst
  91. 8 2
      test/test.bats
  92. 7 9
      web/add/user/index.php
  93. 35 0
      web/css/src/styles.css
  94. 0 0
      web/css/styles.min.css
  95. 5 8
      web/edit/user/index.php
  96. 31 0
      web/inc/i18n/ar.php
  97. 33 2
      web/inc/i18n/az.php
  98. 31 0
      web/inc/i18n/bg.php
  99. 60 2
      web/inc/i18n/bs.php
  100. 34 2
      web/inc/i18n/cn.php

+ 4 - 0
CHANGELOG.md

@@ -2,7 +2,11 @@
 All notable changes to this project will be documented in this file.
 
 ## [CURRENT] - Development
+### Features
 
+### Bugfixes
+- Improved quality of default web domain templates for Drupal.
+ 
 ## [1.2.0] - Major Release (Feature / Quality Update)
 ### Features
 - **NOTE:** Debian 8 is no longer supported as it has reached EOL (end-of-life) status.

+ 1 - 7
bin/v-add-cron-hestia-autoupdate

@@ -44,9 +44,6 @@ time_n_date=$(date +'%T %F')
 time=$(echo "$time_n_date" |cut -f 1 -d \ )
 date=$(echo "$time_n_date" |cut -f 2 -d \ )
 
-# Remove existing cron job
-$BIN/v-delete-cron-hestia-autoupdate
-
 # Define time somewhere at night
 if [ -z "$mode" ] || [ "$mode" = "apt" ]; then
     min=$(generate_password '012345' '2')
@@ -82,9 +79,6 @@ sort_cron_jobs
 # Sync cronjobs with system crond
 sync_cron_jobs
 
-# Perform verification if read-only mode is enabled
-check_hestia_demo_mode
-
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#
@@ -97,7 +91,7 @@ $BIN/v-restart-cron
 check_result $? "Cron restart failed" >/dev/null
 
 # Logging
-log_history "added cron job $job"
+log_history "enabled automatic updates"
 log_event "$OK" "$ARGUMENTS"
 
 exit

+ 7 - 2
bin/v-add-sys-webmail

@@ -1,7 +1,9 @@
 #!/bin/bash
 # info: add webmail support for a domain
-# options: USER DOMAIN [RESTART]
+# options: USER DOMAIN [RESTART] [QUIET]
 #
+# this function adds support for webmail services
+# to a mail domain.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #
@@ -11,6 +13,7 @@
 user=$1
 domain=$2
 restart="$3"
+quiet=$4
 
 # Additional argument formatting
 if [[ "$domain" =~ [[:upper:]] ]]; then
@@ -123,7 +126,9 @@ if [ "$3" = 'yes' ]; then
 fi
 
 # Logging
-log_history "enabled webmail support for $domain"
+if [ "$quiet" != 'yes' ]; then
+    log_history "enabled webmail support for $domain"
+fi
 log_event "$OK" "$ARGUMENTS"
 
 exit

+ 8 - 9
bin/v-add-user

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add system user
-# options: USER PASSWORD EMAIL [PACKAGE] [FNAME] [LNAME]
+# options: USER PASSWORD EMAIL [PACKAGE] [NAME]
 #
 # The function creates new user account.
 
@@ -14,8 +14,7 @@ user=$1
 password=$2; HIDE=2
 email=$3
 package=${4-default}
-fname=$5
-lname=$6
+name=$5
 
 # Includes
 source $HESTIA/func/main.sh
@@ -32,11 +31,12 @@ is_user_free() {
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER PASSWORD EMAIL [PACKAGE] [FNAME] [LNAME]'
+check_args '3' "$#" 'USER PASSWORD EMAIL [PACKAGE] [NAME] '
 is_format_valid 'user' 'email' 'package'
-if [ ! -z "$fname" ]; then
-    is_format_valid 'fname' 'lname'
+if [ ! -z "$name" ]; then
+    is_format_valid 'name' 
 fi
+
 is_user_free "$user"
 is_password_valid
 is_package_valid
@@ -176,8 +176,7 @@ else
     u_users=1
 fi
 
-echo "FNAME='$fname'
-LNAME='$lname'
+echo "NAME='$name'
 PACKAGE='$package'
 $pkg_data
 CONTACT='$email'
@@ -230,7 +229,7 @@ fi
 
 # Run template trigger
 if [ -x "$HESTIA/data/packages/$package.sh" ]; then
-    $HESTIA/data/packages/$package.sh "$user" "$email" "$fname" "$lname"
+    $HESTIA/data/packages/$package.sh "$user" "$email" "$name"
 fi
 
 # Adding jailed sftp env

+ 11 - 10
bin/v-change-user-name

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change user full name
-# options: USER FNAME LNAME
+# options: USER NAME
 #
 # The function allow to change user's full name.
 
@@ -11,7 +11,7 @@
 
 # Argument definition
 user=$1
-fname=$2
+name=$2
 lname=$3
 
 # Includes
@@ -23,8 +23,8 @@ source $HESTIA/conf/hestia.conf
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER FNAME LNAME'
-is_format_valid 'user' 'fname' 'lname'
+check_args '2' "$#" 'USER NAME'
+is_format_valid 'user' 'name'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 
@@ -37,20 +37,21 @@ check_hestia_demo_mode
 #----------------------------------------------------------#
 
 # Get old values
-old_fname=$(get_user_value '$FNAME')
-old_lname=$(get_user_value '$LNAME')
+old_name=$(get_user_value '$NAME')
 
 # Changing ns values
-update_user_value "$user" '$FNAME' "$fname"
-update_user_value "$user" '$LNAME' "$lname"
-
+if [ ! -z "$lname" ]; then
+    update_user_value "$user" '$NAME' "$name $lname"
+else
+    update_user_value "$user" '$NAME' "$name"
+fi
 
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#
 
 # Logging
-log_history "changed user name to $fname $lname"
+log_history "changed user display name to $name"
 log_event "$OK" "$ARGUMENTS"
 
 exit

+ 1 - 0
bin/v-delete-cron-hestia-autoupdate

@@ -63,6 +63,7 @@ $BIN/v-restart-cron
 check_result $? "Cron restart failed" >/dev/null
 
 # Logging
+log_history "disabled automatic updates"
 log_event "$OK" "$ARGUMENTS"
 
 exit

+ 7 - 3
bin/v-delete-sys-webmail

@@ -1,8 +1,9 @@
 #!/bin/bash
 # info: delete webmail support for a domain
-# options: USER DOMAIN [RESTART]
+# options: USER DOMAIN [RESTART] [QUIET]
 #
-# The function delete ssl certificates.
+# this function removes support for webmail from
+# a specified mail domain.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #
@@ -12,6 +13,7 @@
 user=$1
 domain=$2
 restart="$3"
+quiet=$4
 
 # Includes
 source $HESTIA/func/main.sh
@@ -74,7 +76,9 @@ if [ ! -z "$3" ]; then
 fi
 
 # Logging
-log_history "disabled webmail support for $domain"
+if [ "$quiet" != 'yes' ]; then
+    log_history "disabled webmail support for $domain"
+fi
 log_event "$OK" "$ARGUMENTS"
 
 exit

+ 6 - 4
bin/v-download-backup

@@ -169,6 +169,9 @@ if [ ! -e "$BACKUP/$backup" ]; then
         downloaded='yes'
     fi
     if [ -z "$downloaded" ]; then
+        subj="Download of $backup failed for $user"
+        $BIN/v-add-user-notification $user "$subj" "<b>Unable to retrieve backup file from remote server.</b><br><b>Error:</b> $backup file doesn't exist in '${BACKUP}' directory."
+        sed -i "/v-download-backup $user /d" $HESTIA/data/queue/backup.pipe
         check_result $E_NOTEXIST "backup file $backup doesn't exist in '${BACKUP}' folder"
     else
         if [ -e "$BACKUP/$backup" ]; then
@@ -186,11 +189,10 @@ fi
 # Send notification
 if [ -e "$BACKUP/$backup" ]; then
     cd $BACKUP
-    subj="$user → Download of $backup has been completed"
+    subj="Download of $backup completed for $user"
     email=$(get_user_value '$CONTACT')
-    echo "Download of $backup has been completed you are able to download it for 12 hours" |$SENDMAIL -s "$subj" $email $notify
-    $BIN/v-add-user-notification $user "$subj" "Download of $backup has been completed you are able to download it for 12 hours"
-    
+    echo "Backup file $backup was retrieved from the remote server and will be available to download for 12 hours." | $SENDMAIL -s "$subj" $email $notify
+    $BIN/v-add-user-notification $user "$subj" "Backup file <b>$backup</b> was retrieved from the remote server and will be available to download for <b>12 hours</b>."
 fi
 
 # Cleaning restore queue

+ 5 - 6
bin/v-list-user

@@ -20,8 +20,7 @@ source $HESTIA/func/main.sh
 json_list() {
         echo '{
     "'$USER'": {
-        "FNAME": "'$FNAME'",
-        "LNAME": "'$LNAME'",
+        "NAME": "'$NAME'",
         "PACKAGE": "'$PACKAGE'",
         "WEB_TEMPLATE": "'$WEB_TEMPLATE'",
         "BACKEND_TEMPLATE": "'$BACKEND_TEMPLATE'",
@@ -85,7 +84,7 @@ json_list() {
 # SHELL list function
 shell_list() {
     echo "USERNAME:       $USER"
-    echo "FULL NAME:      $FNAME $LNAME"
+    echo "FULL NAME:      $NAME"
     echo "EMAIL:          $CONTACT"
     echo "LANGUAGE:       $LANGUAGE"
     echo "SUSPENDED:      $SUSPENDED"
@@ -109,7 +108,7 @@ shell_list() {
 
 # PLAIN list function
 plain_list() {
-    echo -ne "$USER\t$FNAME\t$LNAME\t$PACKAGE\t$WEB_TEMPLATE\t"
+    echo -ne "$USER\t$NAME\t$PACKAGE\t$WEB_TEMPLATE\t"
     echo -ne "$BACKEND_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t"
     echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t"
     echo -ne "$MAIL_DOMAINS\t$MAIL_ACCOUNTS\t$DATABASES\t$CRON_JOBS\t"
@@ -127,7 +126,7 @@ plain_list() {
 
 # CSV list function
 csv_list() {
-    echo -n "USER,FNAME,LNAME,PACKAGE,WEB_TEMPLATE,BACKEND_TEMPLATE,"
+    echo -n "USER,NAME,PACKAGE,WEB_TEMPLATE,BACKEND_TEMPLATE,"
     echo -n "PROXY_TEMPLATE,DNS_TEMPLATE,WEB_DOMAINS,WEB_ALIASES,"
     echo -n "DNS_DOMAINS,DNS_RECORDS,MAIL_DOMAINS,MAIL_ACCOUNTS,"
     echo -n "DATABASES,CRON_JOBS,DISK_QUOTA,BANDWIDTH,NS,HOME,SHELL,"
@@ -138,7 +137,7 @@ csv_list() {
     echo -n "U_WEB_SSL,U_WEB_ALIASES,U_DNS_DOMAINS,U_DNS_RECORDS,"
     echo -n "U_MAIL_DOMAINS,U_MAIL_DKIM,U_MAIL_ACCOUNTS,U_DATABASES"
     echo "U_CRON_JOBS,U_BACKUPS,LANGUAGE,NOTIFICATIONS,TIME,DATE"
-    echo -n "$USER,\"$FNAME\",\"$LNAME\",$PACKAGE,$WEB_TEMPLATE,"
+    echo -n "$USER,\"$NAME\",$PACKAGE,$WEB_TEMPLATE,"
     echo -n "$BACKEND_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE,$WEB_DOMAINS,"
     echo -n "$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS,$MAIL_DOMAINS,"
     echo -n "$MAIL_ACCOUNTS,$DATABASES,$CRON_JOBS,$DISK_QUOTA,$BANDWIDTH,"

+ 4 - 5
bin/v-list-users

@@ -26,8 +26,7 @@ json_list() {
         fi
         source $HESTIA/data/users/$USER/user.conf
         echo -n '    "'$USER'": {
-        "FNAME": "'$FNAME'",
-        "LNAME": "'$LNAME'",
+        "NAME": "'$NAME'",
         "PACKAGE": "'$PACKAGE'",
         "WEB_TEMPLATE": "'$WEB_TEMPLATE'",
         "BACKEND_TEMPLATE": "'$BACKEND_TEMPLATE'",
@@ -108,7 +107,7 @@ plain_list() {
             continue;
         fi
         source $HESTIA/data/users/$USER/user.conf
-        echo -ne "$USER\t$FNAME\t$LNAME\t$PACKAGE\t$WEB_TEMPLATE\t"
+        echo -ne "$USER\t$NAME\t$PACKAGE\t$WEB_TEMPLATE\t"
         echo -ne "$BACKEND_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t"
         echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t"
         echo -ne "$MAIL_DOMAINS\t$MAIL_ACCOUNTS\t$DATABASES\t$CRON_JOBS\t"
@@ -127,7 +126,7 @@ plain_list() {
 
 # CSV list function
 csv_list() {
-    echo -n "USER,FNAME,LNAME,PACKAGE,WEB_TEMPLATE,BACKEND_TEMPLATE,"
+    echo -n "USER,NAME,PACKAGE,WEB_TEMPLATE,BACKEND_TEMPLATE,"
     echo -n "PROXY_TEMPLATE,DNS_TEMPLATE,WEB_DOMAINS,WEB_ALIASES,"
     echo -n "DNS_DOMAINS,DNS_RECORDS,MAIL_DOMAINS,MAIL_ACCOUNTS,"
     echo -n "DATABASES,CRON_JOBS,DISK_QUOTA,BANDWIDTH,NS,HOME,SHELL,"
@@ -144,7 +143,7 @@ csv_list() {
             continue;
         fi
         source $HESTIA/data/users/$USER/user.conf
-        echo -n "$USER,\"$FNAME\",\"$LNAME\",$PACKAGE,$WEB_TEMPLATE,"
+        echo -n "$USER,\"$NAME\",$PACKAGE,$WEB_TEMPLATE,"
         echo -n "$BACKEND_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE,"
         echo -n "$WEB_DOMAINS,$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS,"
         echo -n "$MAIL_DOMAINS,$MAIL_ACCOUNTS,$DATABASES,$CRON_JOBS,"

+ 2 - 2
bin/v-rebuild-mail-domain

@@ -53,8 +53,8 @@ rebuild_mail_domain_conf
 # Rebuild webmail configuration
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
     if [ ! -z "$IMAP_SYSTEM" ]; then
-        $BIN/v-delete-sys-webmail $user $domain ''
-        $BIN/v-add-sys-webmail $user $domain ''
+        $BIN/v-delete-sys-webmail $user $domain '' 'yes'
+        $BIN/v-add-sys-webmail $user $domain '' 'yes'
     fi
 fi
 

+ 2 - 2
bin/v-rebuild-mail-domains

@@ -57,8 +57,8 @@ for domain in $(search_objects 'mail' 'SUSPENDED' "*" 'DOMAIN'); do
     rebuild_mail_domain_conf
     if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
         if [ ! -z "$IMAP_SYSTEM" ]; then
-            $BIN/v-delete-sys-webmail $user $domain ''
-            $BIN/v-add-sys-webmail $user $domain ''
+            $BIN/v-delete-sys-webmail $user $domain '' 'yes'
+            $BIN/v-add-sys-webmail $user $domain '' 'yes'
         fi
     fi
 done

+ 3 - 1
func/ip.sh

@@ -31,7 +31,9 @@ is_ip_rdns_valid() {
     local awk_ip=$(echo $network_ip | sed 's|\.|/\&\&/|g')
     local rev_awk_ip=$(echo $awk_ip | rev)
 
-    [ -z "$rdns" ] && local rdns=$(dig +short -x $ip | head -n 1 | sed 's/.$//')
+    if [ -z "$rdns" ]; then
+        local rdns=$(dig +short -x "$ip" | head -n 1 | sed 's/.$//') || unset rdns
+    fi
 
     if [ ! -z "$rdns" ] && [ ! $(echo $rdns | awk "/$awk_ip/ || /$rev_awk_ip/") ]; then
         echo $rdns

+ 1 - 2
func/main.sh

@@ -929,7 +929,6 @@ is_format_valid() {
                 email_forward)  is_email_format_valid "$arg" ;;
                 exp)            is_date_format_valid "$arg" ;;
                 extentions)     is_common_format_valid "$arg" 'extentions' ;;
-                fname)          is_name_format_valid "$arg" "first name" ;;
                 ftp_password)   is_password_format_valid "$arg" ;;
                 ftp_user)       is_user_format_valid "$arg" "$arg_name" ;;
                 host)           is_object_format_valid "$arg" "$arg_name" ;;
@@ -940,11 +939,11 @@ is_format_valid() {
                 ip_status)      is_ip_status_format_valid "$arg" ;;
                 job)            is_int_format_valid "$arg" 'job' ;;
                 key)            is_user_format_valid "$arg" "$arg_name" ;;
-                lname)          is_name_format_valid "$arg" "last name" ;;
                 malias)         is_user_format_valid "$arg" "$arg_name" ;;
                 max_db)         is_int_format_valid "$arg" 'max db';;
                 min)            is_cron_format_valid "$arg" $arg_name ;;
                 month)          is_cron_format_valid "$arg" $arg_name ;;
+                name)           is_name_format_valid "$arg" "name" ;;
                 nat_ip)         is_ip_format_valid "$arg" ;;
                 netmask)        is_ip_format_valid "$arg" 'netmask' ;;
                 newid)          is_int_format_valid "$arg" 'id' ;;

+ 8 - 1
func/rebuild.sh

@@ -13,10 +13,17 @@ rebuild_user_conf() {
     chmod 660 $USER_DATA/history.log
     touch $USER_DATA/stats.log
     chmod 660 $USER_DATA/stats.log
+    
+    # Update FNAME LNAME to NAME
+    if [ -z $NAME ]; then 
+        NAME="$FNAME $LNAME"
+        sed -i "s/FNAME='$FNAME'/NAME='$NAME'/g" $USER_DATA/user.conf
+        sed -i "/LNAME='$LNAME'/d" $USER_DATA/user.conf  
+    fi
 
     # Run template trigger
     if [ -x "$HESTIA/data/packages/$PACKAGE.sh" ]; then
-        $HESTIA/data/packages/$PACKAGE.sh "$user" "$CONTACT" "$FNAME" "$LNAME"
+        $HESTIA/data/packages/$PACKAGE.sh "$user" "$CONTACT" "$NAME"
     fi
 
     # Rebuild user

+ 1 - 21
func/upgrade.sh

@@ -217,27 +217,6 @@ upgrade_phpmyadmin() {
     fi
 }
 
-update_php_templates() {
-    echo "[ * ] Updating default PHP templates..."
-    # Update default template
-    cp -f $HESTIA_INSTALL_DIR/templates/web/php-fpm/default.tpl \
-        $HESTIA/data/templates/web/php-fpm/default.tpl
-
-    # Update no-php template
-    cp -f $HESTIA_INSTALL_DIR/templates/web/php-fpm/no-php.tpl \
-        $HESTIA/data/templates/web/php-fpm/no-php.tpl
-
-    # Update  socket template
-    cp -f $HESTIA_INSTALL_DIR/templates/web/php-fpm/socket.tpl \
-        $HESTIA/data/templates/web/php-fpm/socket.tpl
-
-    for version in $($HESTIA/bin/v-list-sys-php plain); do 
-        echo "[ * ] Updating templates for PHP ${version}..."
-        cp -f $HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl \
-            $HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl; 
-    done
-}
-
 upgrade_get_version() {
     # Retrieve new version number for Hestia Control Panel from .deb package
     new_version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
@@ -261,6 +240,7 @@ upgrade_rebuild_users() {
         if [ ! -z "$MAIL_SYSTEM" ]; then 
             $BIN/v-rebuild-mail-domains $user 'no' >/dev/null 2>&1
         fi
+        $BIN/v-rebuild-user $user 'no' >/dev/null 2>&1
     done
 }
 

+ 1 - 1
install/deb/filemanager/filegator/backend/Services/Auth/Adapters/HestiaAuth.php

@@ -59,7 +59,7 @@ class HestiaAuth implements Service, AuthInterface
     {
         $user = new User();
         $user->setUsername($this->hestia_user);
-        $user->setName($this->hestia_user . " (" . $hstuser['FNAME'] . " " . $hstuser['LNAME'] . ")");
+        $user->setName($this->hestia_user . " (" . $hstuser['NAME']. ")");
         $user->setRole('user');
         $user->setPermissions($this->permissions);
         $user->setHomedir('/');

+ 2 - 2
install/deb/nginx/phpmyadmin.inc

@@ -6,14 +6,14 @@ location /%pma_alias% {
         return 404;
     }
 
-    location ~ ^/phpmyadmin/(.*\.php)$ {
+    location ~ ^/%pma_alias%/(.*\.php)$ {
         alias /usr/share/phpmyadmin/$1;
         fastcgi_pass 127.0.0.1:9000;
         fastcgi_index index.php;
         include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME $request_filename;
     }
-    location /phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
+    location /%pma_alias%/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
         root /usr/share/phpmyadmin/;
     }
 }

+ 1 - 1
install/deb/nginx/phppgadmin.inc

@@ -1,7 +1,7 @@
 location /%pga_alias% {
     alias /usr/share/phppgadmin/;
 
-    location ~ ^/phppgadmin/(.*\.php)$ {
+    location ~ ^/%pga_alias%/(.*\.php)$ {
         alias /usr/share/phppgadmin/$1;
         fastcgi_pass 127.0.0.1:9000;
         fastcgi_index index.php;

+ 5 - 0
install/deb/templates/web/apache2/default.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_ssl_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/default.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/hosting.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_ssl_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/hosting.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/php-fpm/default.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_ssl_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/php-fpm/default.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/phpcgi.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_ssl_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/phpcgi.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/phpfcgid.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_ssl_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/apache2/phpfcgid.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 <VirtualHost %ip%:%web_port%>
 
     ServerName %domain_idn%

+ 5 - 0
install/deb/templates/web/nginx/caching.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%proxy_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/caching.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%proxy_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/default.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%proxy_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/default.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%proxy_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/hosting.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%proxy_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/hosting.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%proxy_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/cms_made_simple.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/cms_made_simple.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/codeigniter2.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/codeigniter2.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/codeigniter3.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/codeigniter3.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/datalife_engine.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/datalife_engine.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/default.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/default.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/dokuwiki.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/dokuwiki.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 90 - 0
install/deb/templates/web/nginx/php-fpm/drupal-composer.stpl

@@ -0,0 +1,90 @@
+server {
+    listen      %ip%:%web_ssl_port% ssl http2;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/web;
+    index       index.php index.html index.htm;
+    access_log  /var/log/nginx/domains/%domain%.log combined;
+    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
+    error_log   /var/log/nginx/domains/%domain%.error.log error;
+
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
+    location = /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+
+    location = /robots.txt {
+        allow all;
+        log_not_found off;
+        access_log off;
+    }
+
+    location ~ \..*/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/.*/private/ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/[^/]+/files/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
+    }
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
+    }
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
+    }
+
+    rewrite ^/index.php/(.*) /$1 permanent;
+
+    location /error/ {
+        alias   %home%/%user%/web/%domain%/document_errors/;
+    }
+
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
+}
+

+ 86 - 0
install/deb/templates/web/nginx/php-fpm/drupal-composer.tpl

@@ -0,0 +1,86 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/web;
+    index       index.php index.html index.htm;
+    access_log  /var/log/nginx/domains/%domain%.log combined;
+    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
+    error_log   /var/log/nginx/domains/%domain%.error.log error;
+
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
+
+    location = /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+
+    location = /robots.txt {
+        allow all;
+        log_not_found off;
+        access_log off;
+    }
+
+    location ~ \..*/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/.*/private/ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/[^/]+/files/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
+    }
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
+    }
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
+    }
+
+    rewrite ^/index.php/(.*) /$1 permanent;
+
+    location /error/ {
+        alias   %home%/%user%/web/%domain%/document_errors/;
+    }
+
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     %home%/%user%/conf/web/%domain%/nginx.conf_*;
+}
+

+ 90 - 0
install/deb/templates/web/nginx/php-fpm/drupal-social.stpl

@@ -0,0 +1,90 @@
+server {
+    listen      %ip%:%web_ssl_port% ssl http2;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/html;
+    index       index.php index.html index.htm;
+    access_log  /var/log/nginx/domains/%domain%.log combined;
+    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
+    error_log   /var/log/nginx/domains/%domain%.error.log error;
+
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
+    location = /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+
+    location = /robots.txt {
+        allow all;
+        log_not_found off;
+        access_log off;
+    }
+
+    location ~ \..*/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/.*/private/ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/[^/]+/files/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
+    }
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
+    }
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
+    }
+
+    rewrite ^/index.php/(.*) /$1 permanent;
+
+    location /error/ {
+        alias   %home%/%user%/web/%domain%/document_errors/;
+    }
+
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
+}
+

+ 86 - 0
install/deb/templates/web/nginx/php-fpm/drupal-social.tpl

@@ -0,0 +1,86 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/html;
+    index       index.php index.html index.htm;
+    access_log  /var/log/nginx/domains/%domain%.log combined;
+    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
+    error_log   /var/log/nginx/domains/%domain%.error.log error;
+
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
+
+    location = /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+
+    location = /robots.txt {
+        allow all;
+        log_not_found off;
+        access_log off;
+    }
+
+    location ~ \..*/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/.*/private/ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/[^/]+/files/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
+    }
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
+    }
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
+    }
+
+    rewrite ^/index.php/(.*) /$1 permanent;
+
+    location /error/ {
+        alias   %home%/%user%/web/%domain%/document_errors/;
+    }
+
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     %home%/%user%/conf/web/%domain%/nginx.conf_*;
+}
+

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/drupal6.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/drupal6.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 43 - 30
install/deb/templates/web/nginx/php-fpm/drupal7.stpl

@@ -1,7 +1,12 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;
-    root        %sdocroot%;
+    root        %docroot%;
     index       index.php index.html index.htm;
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
@@ -25,62 +30,69 @@ server {
         access_log off;
     }
 
-    location ~* \.(txt|log)$ {
-        allow 192.168.0.0/16;
+    location ~ /(changelog.txt|copyright.txt|install.mysql.txt|install.pgsql.txt|install.sqlite.txt|install.txt|license.txt|maintainers.txt|license|license.txt|readme.txt|readme.md|upgrade.txt) {
         deny all;
+        return 404;
     }
 
     location ~ \..*/.*\.php$ {
-        return 403;
+        deny all;
+        return 404;
     }
 
     location ~ ^/sites/.*/private/ {
-        return 403;
+        deny all;
+        return 404;
     }
 
     location ~ ^/sites/[^/]+/files/.*\.php$ {
         deny all;
-    }
-    
-    location / {
-        try_files $uri /index.php?$query_string;
+        return 404;
     }
 
     location ~ /vendor/.*\.php$ {
         deny all;
         return 404;
-    }        
-
-    location ~ ^/sites/.*/files/styles/ {
-        try_files $uri @rewrite;
     }
 
-    location ~ ^(/[a-z\-]+)?/system/files/ {
-        try_files $uri /index.php?$query_string;
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
     }
 
-    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
-        try_files $uri @rewrite;
-        expires max;
-        log_not_found off;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
     }
-    
-    location ~ '\.php$|^/update.php' {
-        fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
-        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-        fastcgi_pass %backend_lsnr%;
-        include         /etc/nginx/fastcgi_params;
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
     }
 
+    rewrite ^/index.php/(.*) /$1 permanent;
+
     location /error/ {
         alias   %home%/%user%/web/%domain%/document_errors/;
     }
 
-    location ~* "/\.(htaccess|htpasswd)$" {
-        deny    all;
-        return  404;
-    }
-
     location /vstats/ {
         alias   %home%/%user%/web/%domain%/stats/;
         include %home%/%user%/web/%domain%/stats/auth.conf*;
@@ -90,3 +102,4 @@ server {
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
 }
+

+ 43 - 30
install/deb/templates/web/nginx/php-fpm/drupal7.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;
@@ -20,62 +25,69 @@ server {
         access_log off;
     }
 
-    location ~* \.(txt|log)$ {
-        allow 192.168.0.0/16;
+    location ~ /(changelog.txt|copyright.txt|install.mysql.txt|install.pgsql.txt|install.sqlite.txt|install.txt|license.txt|maintainers.txt|license|license.txt|readme.txt|readme.md|upgrade.txt) {
         deny all;
+        return 404;
     }
 
     location ~ \..*/.*\.php$ {
-        return 403;
-        }
+        deny all;
+        return 404;
+    }
 
     location ~ ^/sites/.*/private/ {
-        return 403;
+        deny all;
+        return 404;
     }
-    
+
     location ~ ^/sites/[^/]+/files/.*\.php$ {
         deny all;
-    }
-    
-    location / {
-        try_files $uri /index.php?$query_string;
+        return 404;
     }
 
     location ~ /vendor/.*\.php$ {
         deny all;
         return 404;
-    }        
-
-    location ~ ^/sites/.*/files/styles/ {
-        try_files $uri @rewrite;
     }
 
-    location ~ ^(/[a-z\-]+)?/system/files/ {
-        try_files $uri /index.php?$query_string;
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
     }
 
-    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
-        try_files $uri @rewrite;
-        expires max;
-        log_not_found off;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
     }
 
-    location ~ '\.php$|^/update.php' {
-        fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
-        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-        fastcgi_pass %backend_lsnr%;
-        include         /etc/nginx/fastcgi_params;
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
     }
 
+    rewrite ^/index.php/(.*) /$1 permanent;
+
     location /error/ {
         alias   %home%/%user%/web/%domain%/document_errors/;
     }
 
-    location ~* "/\.(htaccess|htpasswd)$" {
-        deny    all;
-        return  404;
-    }
-
     location /vstats/ {
         alias   %home%/%user%/web/%domain%/stats/;
         include %home%/%user%/web/%domain%/stats/auth.conf*;
@@ -85,3 +97,4 @@ server {
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     %home%/%user%/conf/web/%domain%/nginx.conf_*;
 }
+

+ 43 - 30
install/deb/templates/web/nginx/php-fpm/drupal8.stpl

@@ -1,7 +1,12 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;
-    root        %sdocroot%;
+    root        %docroot%;
     index       index.php index.html index.htm;
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
@@ -25,62 +30,69 @@ server {
         access_log off;
     }
 
-    location ~* \.(txt|log)$ {
-        allow 192.168.0.0/16;
+    location ~ /(changelog.txt|copyright.txt|install.mysql.txt|install.pgsql.txt|install.sqlite.txt|install.txt|license.txt|maintainers.txt|license|license.txt|readme.txt|readme.md|upgrade.txt) {
         deny all;
+        return 404;
     }
 
     location ~ \..*/.*\.php$ {
-        return 403;
+        deny all;
+        return 404;
     }
 
     location ~ ^/sites/.*/private/ {
-        return 403;
+        deny all;
+        return 404;
     }
 
     location ~ ^/sites/[^/]+/files/.*\.php$ {
         deny all;
-    }
-    
-    location / {
-        try_files $uri /index.php?$query_string;
+        return 404;
     }
 
     location ~ /vendor/.*\.php$ {
         deny all;
         return 404;
-    }        
-
-    location ~ ^/sites/.*/files/styles/ {
-        try_files $uri @rewrite;
     }
 
-    location ~ ^(/[a-z\-]+)?/system/files/ {
-        try_files $uri /index.php?$query_string;
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
     }
 
-    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
-        try_files $uri @rewrite;
-        expires max;
-        log_not_found off;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
     }
-    
-    location ~ '\.php$|^/update.php' {
-        fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
-        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-        fastcgi_pass %backend_lsnr%;
-        include         /etc/nginx/fastcgi_params;
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
     }
 
+    rewrite ^/index.php/(.*) /$1 permanent;
+
     location /error/ {
         alias   %home%/%user%/web/%domain%/document_errors/;
     }
 
-    location ~* "/\.(htaccess|htpasswd)$" {
-        deny    all;
-        return  404;
-    }
-
     location /vstats/ {
         alias   %home%/%user%/web/%domain%/stats/;
         include %home%/%user%/web/%domain%/stats/auth.conf*;
@@ -90,3 +102,4 @@ server {
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
 }
+

+ 45 - 31
install/deb/templates/web/nginx/php-fpm/drupal8.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;
@@ -6,7 +11,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
-        
+
     include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
@@ -20,62 +25,70 @@ server {
         access_log off;
     }
 
-    location ~* \.(txt|log)$ {
-        allow 192.168.0.0/16;
+    location ~ /(changelog.txt|copyright.txt|install.mysql.txt|install.pgsql.txt|install.sqlite.txt|install.txt|license.txt|maintainers.txt|license|license.txt|readme.txt|readme.md|upgrade.txt) {
         deny all;
+        return 404;
     }
 
     location ~ \..*/.*\.php$ {
-        return 403;
-        }
+        deny all;
+        return 404;
+    }
 
     location ~ ^/sites/.*/private/ {
-        return 403;
+        deny all;
+        return 404;
     }
-    
+
     location ~ ^/sites/[^/]+/files/.*\.php$ {
         deny all;
-    }
-    
-    location / {
-        try_files $uri /index.php?$query_string;
+        return 404;
     }
 
     location ~ /vendor/.*\.php$ {
         deny all;
         return 404;
-    }        
-
-    location ~ ^/sites/.*/files/styles/ {
-        try_files $uri @rewrite;
     }
 
-    location ~ ^(/[a-z\-]+)?/system/files/ {
-        try_files $uri /index.php?$query_string;
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
     }
 
-    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
-        try_files $uri @rewrite;
-        expires max;
-        log_not_found off;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
     }
 
-    location ~ '\.php$|^/update.php' {
-        fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
-        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-        fastcgi_pass %backend_lsnr%;
-        include         /etc/nginx/fastcgi_params;
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
     }
 
+    rewrite ^/index.php/(.*) /$1 permanent;
+
     location /error/ {
         alias   %home%/%user%/web/%domain%/document_errors/;
     }
 
-    location ~* "/\.(htaccess|htpasswd)$" {
-        deny    all;
-        return  404;
-    }
-
     location /vstats/ {
         alias   %home%/%user%/web/%domain%/stats/;
         include %home%/%user%/web/%domain%/stats/auth.conf*;
@@ -85,3 +98,4 @@ server {
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     %home%/%user%/conf/web/%domain%/nginx.conf_*;
 }
+

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/joomla.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/joomla.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/laravel.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/laravel.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/magento.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/magento.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/modx.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/modx.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/moodle.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/moodle.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/no-php.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/no-php.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/odoo.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/odoo.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/opencart.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/opencart.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/owncloud.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/owncloud.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/piwik.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/piwik.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/pyrocms.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/pyrocms.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/sendy.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/sendy.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 90 - 0
install/deb/templates/web/nginx/php-fpm/thunder.stpl

@@ -0,0 +1,90 @@
+server {
+    listen      %ip%:%web_ssl_port% ssl http2;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/docroot;
+    index       index.php index.html index.htm;
+    access_log  /var/log/nginx/domains/%domain%.log combined;
+    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
+    error_log   /var/log/nginx/domains/%domain%.error.log error;
+
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
+    location = /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+
+    location = /robots.txt {
+        allow all;
+        log_not_found off;
+        access_log off;
+    }
+
+    location ~ \..*/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/.*/private/ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/[^/]+/files/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
+    }
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
+    }
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
+    }
+
+    rewrite ^/index.php/(.*) /$1 permanent;
+
+    location /error/ {
+        alias   %home%/%user%/web/%domain%/document_errors/;
+    }
+
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
+}
+

+ 86 - 0
install/deb/templates/web/nginx/php-fpm/thunder.tpl

@@ -0,0 +1,86 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/docroot;
+    index       index.php index.html index.htm;
+    access_log  /var/log/nginx/domains/%domain%.log combined;
+    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
+    error_log   /var/log/nginx/domains/%domain%.error.log error;
+
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
+
+    location = /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+
+    location = /robots.txt {
+        allow all;
+        log_not_found off;
+        access_log off;
+    }
+
+    location ~ \..*/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/.*/private/ {
+        deny all;
+        return 404;
+    }
+
+    location ~ ^/sites/[^/]+/files/.*\.php$ {
+        deny all;
+        return 404;
+    }
+
+    location ~ /\.(?!well-known\/) {
+        deny all;
+        return 404;
+    }
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+
+        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
+            try_files $uri @rewrite;
+            expires 30d;
+            fastcgi_hide_header "Set-Cookie";
+        }
+
+        location ~ [^/]\.php(/|$)|^/update.php {
+            fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            try_files $uri =404;
+            fastcgi_pass %backend_lsnr%;
+            fastcgi_index index.php;
+            fastcgi_param SCRIPT_FILENAME $request_filename;
+            include /etc/nginx/fastcgi_params;
+        }
+
+        location ~ ^/sites/.*/files/styles/ {
+            try_files $uri @rewrite;
+        }
+    }
+
+    location @rewrite {
+        rewrite ^/(.*)$ /index.php?q=$1;
+    }
+
+    rewrite ^/index.php/(.*) /$1 permanent;
+
+    location /error/ {
+        alias   %home%/%user%/web/%domain%/document_errors/;
+    }
+
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     %home%/%user%/conf/web/%domain%/nginx.conf_*;
+}
+

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/wordpress.stpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_ssl_port% ssl http2;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/wordpress.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen      %ip%:%web_port%;
     server_name %domain_idn% %alias_idn%;

+ 5 - 0
install/deb/templates/web/nginx/proxy_ip.tpl

@@ -1,3 +1,8 @@
+#=======================================================================#
+# Default Web Domain Template                                           #
+# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
+#=======================================================================#
+
 server {
     listen       %ip%:%proxy_port% default;
     server_name  _;

+ 6 - 14
install/hst-install-debian.sh

@@ -41,7 +41,7 @@ if [ "$release" -eq 9 ]; then
         dovecot-pop3d roundcube-core net-tools roundcube-mysql roundcube-plugins
         mariadb-client mariadb-common mariadb-server postgresql
         postgresql-contrib phppgadmin phpmyadmin mc flex whois rssh git idn zip
-        sudo bc ftp lsof ntpdate rrdtool quota e2fslibs bsdutils e2fsprogs curl
+        sudo bc ftp lsof rrdtool quota e2fslibs bsdutils e2fsprogs curl
         imagemagick fail2ban dnsutils bsdmainutils cron hestia hestia-nginx
         hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
         rsyslog ssh setpriv ipset libapache2-mod-ruid2"
@@ -57,7 +57,7 @@ elif [ "$release" -eq 10 ]; then
         clamav-daemon spamassassin dovecot-imapd dovecot-pop3d roundcube-core
         net-tools roundcube-mysql roundcube-plugins mariadb-client
         mariadb-common mariadb-server postgresql postgresql-contrib phpmyadmin
-        phppgadmin mc flex whois git idn zip sudo bc ftp lsof ntpdate rrdtool
+        phppgadmin mc flex whois git idn zip sudo bc ftp lsof rrdtool
         quota e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
         bsdmainutils cron hestia hestia-nginx hestia-php expect
         libmail-dkim-perl unrar-free vim-common acl sysstat rsyslog ssh util-linux
@@ -310,13 +310,6 @@ apt-get -qq update
 # Creating backup directory
 mkdir -p $hst_backups
 
-# Checking ntpdate
-if [ ! -e '/usr/sbin/ntpdate' ]; then
-    echo "[ * ] Installing ntpdate..."
-    apt-get -y install ntpdate >> $LOG
-    check_result $? "Can't install ntpdate"
-fi
-
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
     echo "[ * ] Installing wget..."
@@ -965,10 +958,9 @@ if [ -z "$(grep ^/usr/sbin/nologin /etc/shells)" ]; then
 fi
 
 # Configuring NTP
-echo '#!/bin/sh' > /etc/cron.daily/ntpdate
-echo "$(which ntpdate) -s pool.ntp.org" >> /etc/cron.daily/ntpdate
-chmod 755 /etc/cron.daily/ntpdate
-ntpdate -s pool.ntp.org
+sed -i 's/#NTP=/NTP=pool.ntp.org/' /etc/systemd/timesyncd.conf
+systemctl enable systemd-timesyncd
+systemctl start systemd-timesyncd
 
 # Setup rssh
 if [ ! "$release" -eq 10 ]; then
@@ -1765,7 +1757,7 @@ $HESTIA/bin/v-add-sys-sftp-jail > /dev/null 2>&1
 check_result $? "can't enable sftp jail"
 
 # Adding Hestia admin account
-$HESTIA/bin/v-add-user admin $vpass $email default System Administrator
+$HESTIA/bin/v-add-user admin $vpass $email default "System Administrator"
 check_result $? "can't create admin user"
 $HESTIA/bin/v-change-user-shell admin nologin
 $HESTIA/bin/v-change-user-language admin $lang

+ 5 - 13
install/hst-install-ubuntu.sh

@@ -35,7 +35,7 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
     cron curl dnsutils dovecot-imapd dovecot-pop3d e2fslibs e2fsprogs exim4
     exim4-daemon-heavy expect fail2ban flex ftp git idn imagemagick
     libapache2-mod-fcgid libapache2-mod-php$fpm_v libapache2-mod-rpaf
-    lsof mc mariadb-client mariadb-common mariadb-server nginx ntpdate
+    lsof mc mariadb-client mariadb-common mariadb-server nginx
     php$fpm_v php$fpm_v-cgi php$fpm_v-common php$fpm_v-curl phpmyadmin
     php$fpm_v-mysql php$fpm_v-imap php$fpm_v-ldap php$fpm_v-apcu phppgadmin
     php$fpm_v-pgsql php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli php$fpm_v-gd
@@ -292,13 +292,6 @@ apt-get -qq update
 # Creating backup directory
 mkdir -p $hst_backups
 
-# Checking ntpdate
-if [ ! -e '/usr/sbin/ntpdate' ]; then
-    echo "[ * ] Installing ntpdate..."
-    apt-get -y install ntpdate >> $LOG
-    check_result $? "Can't install ntpdate"
-fi
-
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
     echo "[ * ] Installing wget..."
@@ -959,10 +952,9 @@ if [ -z "$(grep nologin /etc/shells)" ]; then
 fi
 
 # Configuring NTP
-echo '#!/bin/sh' > /etc/cron.daily/ntpdate
-echo "$(which ntpdate) -s pool.ntp.org" >> /etc/cron.daily/ntpdate
-chmod 755 /etc/cron.daily/ntpdate
-ntpdate -s pool.ntp.org
+sed -i 's/#NTP=/NTP=pool.ntp.org/' /etc/systemd/timesyncd.conf
+systemctl enable systemd-timesyncd
+systemctl start systemd-timesyncd
 
 # Setup rssh
 if [ "$release" != '20.04' ]; then
@@ -1764,7 +1756,7 @@ $HESTIA/bin/v-add-sys-sftp-jail > /dev/null 2>&1
 check_result $? "can't enable sftp jail"
 
 # Adding Hestia admin account
-$HESTIA/bin/v-add-user admin $vpass $email default System Administrator
+$HESTIA/bin/v-add-user admin $vpass $email default "System Administrator"
 check_result $? "can't create admin user"
 $HESTIA/bin/v-change-user-shell admin nologin
 $HESTIA/bin/v-change-user-language admin $lang

+ 28 - 5
install/upgrade/versions/latest.sh

@@ -181,20 +181,33 @@ if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
     chmod 0644 /var/lib/phpmyadmin/blowfish_secret.inc.php
 fi
 
-# Add phpMyAdmin/phpPgAdmin aliases to hestia.conf and correct configuration/templates
+# Ensure that backup compression level is correctly set
+GZIP_LVL_CHECK=$(cat $HESTIA/conf/hestia.conf | grep BACKUP_GZIP)
+if [ -z "$GZIP_LVL_CHECK" ]; then
+    echo "[ * ] Updating backup compression level variable..."
+    $BIN/v-change-sys-config-value "BACKUP_GZIP" '9'
+fi
+
+# Update phpMyAdmin/phpPgAdmin templates and set missing alias variables if necessary
 if [ -e "/var/lib/phpmyadmin" ]; then
-PMA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PMA_ALIAS)
+    PMA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PMA_ALIAS)
     if [ -z "$PMA_ALIAS_CHECK" ]; then
         echo "[ * ] Updating phpMyAdmin alias..."
-        $HESTIA/bin/v-change-sys-db-alias "pma" "phpmyadmin"
+        $HESTIA/bin/v-change-sys-db-alias "pma" "phpMyAdmin"
+    else
+        echo "[ * ] Updating phpMyAdmin configuration..."
+        $HESTIA/bin/v-change-sys-db-alias "pma" "$DB_PMA_ALIAS"
     fi
 fi
 
 if [ -e "/var/lib/phppgadmin" ]; then
-PGA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PGA_ALIAS)
+    PGA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PGA_ALIAS)
     if [ -z "$PGA_ALIAS_CHECK" ]; then
         echo "[ * ] Updating phpPgAdmin alias..."
-        $HESTIA/bin/v-change-sys-db-alias "pga" "phppgadmin"
+        $HESTIA/bin/v-change-sys-db-alias "pga" "phpPgAdmin"
+    else
+        echo "[ * ] Updating phpPgAdmin configuration..."
+        $HESTIA/bin/v-change-sys-db-alias "pga" "$DB_PGA_ALIAS"
     fi
 fi
 
@@ -204,3 +217,13 @@ if [ -z "$GZIP_LVL_CHECK" ]; then
     echo "[ * ] Updating backup compression level variable..."
     $BIN/v-change-sys-config-value "BACKUP_GZIP" '9'
 fi
+
+# Update template files to add warnings
+# Backup current templates
+cp -r -f $HESTIA/data/templates/* $HESTIA_BACKUP/templates/
+echo "[ ! ] Updating default web domain templates..."
+$BIN/v-update-web-templates
+echo "[ ! ] Updating default mail domain templates..."
+$BIN/v-update-mail-templates
+echo "[ ! ] Updating default DNS zone templates..."
+$BIN/v-update-dns-templates

+ 0 - 3
src/deb/hestia/postinst

@@ -34,9 +34,6 @@ upgrade_welcome_message
 # Execute version-specific upgrade scripts
 upgrade_start_routine
 
-# Update PHP templates
-update_php_templates
-
 # Upgrade phpMyAdmin if applicable
 upgrade_phpmyadmin
 

+ 8 - 2
test/test.bats

@@ -145,7 +145,7 @@ function validate_webmail_domain() {
 
 @test "Add new userXXX" {
     skip
-    run v-add-user $user $user $user@hestiacp.com default Super Test
+    run v-add-user $user $user $user@hestiacp.com default "Super Test"
     assert_success
     refute_output
 }
@@ -208,7 +208,7 @@ function validate_webmail_domain() {
 #----------------------------------------------------------#
 
 @test "Add new user" {
-    run v-add-user $user $user $user@hestiacp.com default Super Test
+    run v-add-user $user $user $user@hestiacp.com default "Super Test"
     assert_success
     refute_output
 }
@@ -231,6 +231,12 @@ function validate_webmail_domain() {
     assert_output --partial 'Error: invalid email format'
 }
 
+@test "Change user name" {
+    run v-change-user-name "$user" "New name"
+    assert_success
+    refute_output
+}
+
 @test "Change user shell" {
     run v-change-user-shell $user bash
     assert_success

+ 7 - 9
web/add/user/index.php

@@ -26,8 +26,7 @@ if (!empty($_POST['ok'])) {
     if (empty($_POST['v_password'])) $errors[] = __('password');
     if (empty($_POST['v_package'])) $errrors[] = __('package');
     if (empty($_POST['v_email'])) $errors[] = __('email');
-    if (empty($_POST['v_fname'])) $errors[] = __('first name');
-    if (empty($_POST['v_lname'])) $errors[] = __('last name');
+    if (empty($_POST['v_name'])) $errors[] = __('name');
     if (!empty($errors[0])) {
         foreach ($errors as $i => $error) {
             if ( $i == 0 ) {
@@ -55,8 +54,7 @@ if (!empty($_POST['ok'])) {
     $v_email = escapeshellarg($_POST['v_email']);
     $v_package = escapeshellarg($_POST['v_package']);
     $v_language = escapeshellarg($_POST['v_language']);
-    $v_fname = escapeshellarg($_POST['v_fname']);
-    $v_lname = escapeshellarg($_POST['v_lname']);
+    $v_name = escapeshellarg($_POST['v_name']);
     $v_notify = $_POST['v_notify'];
 
 
@@ -66,7 +64,7 @@ if (!empty($_POST['ok'])) {
         $fp = fopen($v_password, "w");
         fwrite($fp, $_POST['v_password']."\n");
         fclose($fp);
-        exec (HESTIA_CMD."v-add-user ".$v_username." ".$v_password." ".$v_email." ".$v_package." ".$v_fname." ".$v_lname, $output, $return_var);
+        exec (HESTIA_CMD."v-add-user ".$v_username." ".$v_password." ".$v_email." ".$v_package." ".$v_name, $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);
         unlink($v_password);
@@ -87,8 +85,9 @@ if (!empty($_POST['ok'])) {
         $hostname = exec('hostname');
         unset($output);
         $from = _translate($_POST['v_language'],'MAIL_FROM',$hostname);
-        if (!empty($_POST['v_fname'])) {
-            $mailtext = _translate($_POST['v_language'],'GREETINGS_GORDON_FREEMAN',$_POST['v_fname'],$_POST['v_lname']);
+        
+        if (!empty($_POST['v_name'])) {
+            $mailtext = _translate($_POST['v_language'],'GREETINGS_GORDON',$_POST['v_name']);
         } else {
             $mailtext = _translate($_POST['v_language'],'GREETINGS');
         }
@@ -103,8 +102,7 @@ if (!empty($_POST['ok'])) {
         unset($v_username);
         unset($v_password);
         unset($v_email);
-        unset($v_fname);
-        unset($v_lname);
+        unset($v_name);
         unset($v_notify);
     }
 }

+ 35 - 0
web/css/src/styles.css

@@ -1510,6 +1510,29 @@ div.l-content > div.l-separator:nth-of-type(4) {
   font-weight: 400;
 }
 
+.body-firewall.lang-bg .l-select {
+  width: 120px;
+}
+
+.body-firewall.lang-el .l-select {
+  max-width: 90px; 
+}
+
+.body-mail.lang-el .l-select {
+  max-width: 80px;
+}
+.body-mail.lang-el td.l-sort-toolbar__search-box {
+  display: none;
+}
+
+.body-cron.lang-el .search-input {
+  max-width: 80px;
+}
+
+.body-cron.lang-el .l-select {
+  max-width: 120px;
+}
+
 .lang-ru .l-select {
   width: 170px;
 }
@@ -1526,6 +1549,16 @@ div.l-content > div.l-separator:nth-of-type(4) {
   max-width: 135px;
 }
 
+.lang-bg .l-stat__col-title {
+  font-size: 0.75rem;
+  font-weight: bold;
+}
+
+.lang-bg .l-stat__col .fas, 
+.lang-bg .l-stat__col--active .fas {
+  font-size: 0.85rem;
+}
+
 .l-select:after {
   pointer-events: none;
   width: 7px;
@@ -3922,6 +3955,8 @@ form#vstobjects.suspended {
 
 .userlist-email {
   font-size: 0.75rem;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }
 
 .userlist-username {

File diff suppressed because it is too large
+ 0 - 0
web/css/styles.min.css


+ 5 - 8
web/edit/user/index.php

@@ -33,8 +33,7 @@ $v_password = "";
 $v_email = $data[$v_username]['CONTACT'];
 $v_package = $data[$v_username]['PACKAGE'];
 $v_language = $data[$v_username]['LANGUAGE'];
-$v_fname = $data[$v_username]['FNAME'];
-$v_lname = $data[$v_username]['LNAME'];
+$v_name = $data[$v_username]['NAME'];
 $v_shell = $data[$v_username]['SHELL'];
 $v_twofa = $data[$v_username]['TWOFA'];
 $v_qrcode = $data[$v_username]['QRCODE'];
@@ -180,14 +179,12 @@ if (!empty($_POST['save'])) {
     }
 
     // Change full name
-    if (($v_fname != $_POST['v_fname']) || ($v_lname != $_POST['v_lname']) && (empty($_SESSION['error_msg']))) {
-        $v_fname = escapeshellarg($_POST['v_fname']);
-        $v_lname = escapeshellarg($_POST['v_lname']);
-        exec (HESTIA_CMD."v-change-user-name ".escapeshellarg($v_username)." ".$v_fname." ".$v_lname, $output, $return_var);
+    if ($v_name != $_POST['v_name']){
+        $v_name = escapeshellarg($_POST['v_name']);
+        exec (HESTIA_CMD."v-change-user-name ".escapeshellarg($v_username). " ". "$v_name", $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);
-        $v_fname = $_POST['v_fname'];
-        $v_lname = $_POST['v_lname'];
+        $v_name = $_POST['v_name'];
     }
 
     // Change NameServers

+ 31 - 0
web/inc/i18n/ar.php

@@ -856,4 +856,35 @@ $LANG['ar'] = array(
     'Enable 2FA' => 'تمكين المصادقة الثنائية',
     'Please scan the code below in your 2FA application:' => 'لإنهاء إعداد المصادقة ذات العاملين ، امسح رمز الاستجابة السريعة أدناه <br /> باستخدام تطبيق المصادقة (مثل <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Google Authenticator</a>):',
     '2FA Reset Code:' => 'رمز استرداد الحساب:',
+    
+    //list user 
+    'Name' => 'Name',
+    //Add / Edit user
+    'Contact' => 'Name',
+    'GREETINGS_GORDON' => "Hello, %s,\n",
+    
+    //List Mail Accounts
+    'Forwarding' => 'Forwarding',
+
+    //Cron Jobs
+    'Cron Job' => 'Cron Job',
+    //Edit server 
+    'Host' => 'Host',
+  
+      //list Backups
+    '1 backups' => '1 backups',
+    '%s backups' => '%s backups',
+    //list Firewall Rules
+    '1 firewall rule' => '1 firewall rule',
+    '%s firewall rules' => '%s firewall rules',
+    //list ip
+    '1 banned IP address' => '1 banned IP address',
+    '%s banned IP addresses' => '%s banned IP addresses', 
+    //list DNS
+    'Records_DNS' => 'Records',
+    //Dowload Backup
+    'BACKUP_DOWNLOAD_SCHEDULED' => 'Download for Backup has been scheduled.',
+    'backend server' =>  'Backend Server',
+    'traffic' => 'Traffic',
+    'disk' => 'Disk',
 );

+ 33 - 2
web/inc/i18n/az.php

@@ -543,9 +543,9 @@ $LANG['az'] = array(
     'AntiSpam' => 'AntiSpam',
     'Webmail URL' => 'Vebmail URL',
     'MySQL Support' => 'MySQL dəstək',
-    'phpMyAdmin URL' => 'phpMyAdmin URL',
+    'phpMyAdmin URL' => 'phpMyAdmin Alias',
     'PostgreSQL Support' => 'PostgreSQL dəstəyi',
-    'phpPgAdmin URL' => 'phpPgAdmin URL',
+    'phpPgAdmin URL' => 'phpPgAdmin Alias',
     'Maximum Number Of Databases' => 'Verilənlər bazasının maksimum sayı',
     'Current Number Of Databases' => 'Current Number Of Databases',
     'Local backup' => 'Yerli backup',
@@ -820,4 +820,35 @@ $LANG['az'] = array(
     'Enable 2FA' => 'İki faktorlu identifikasiyanı aktivləşdirin',
     'Please scan the code below in your 2FA application:' => 'İki faktorlu identifikasiyanı qurmağı başa çatdırmaq üçün aşağıdakı qr kodu yoxlayın <br /> bir identifikasiya tətbiqindən istifadə edərəkp (kimi <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Google Authenticator</a>):',
     '2FA Reset Code:' => 'Hesab bərpa kodu:',
+    
+        //list user 
+    'Name' => 'Name',
+    //Add / Edit user
+    'Contact' => 'Name',
+    'GREETINGS_GORDON' => "Hello, %s,\n",
+    
+    //List Mail Accounts
+    'Forwarding' => 'Forwarding',
+
+    //Cron Jobs
+    'Cron Job' => 'Cron Job',
+    //Edit server 
+    'Host' => 'Host',
+  
+      //list Backups
+    '1 backups' => '1 backups',
+    '%s backups' => '%s backups',
+    //list Firewall Rules
+    '1 firewall rule' => '1 firewall rule',
+    '%s firewall rules' => '%s firewall rules',
+    //list ip
+    '1 banned IP address' => '1 banned IP address',
+    '%s banned IP addresses' => '%s banned IP addresses', 
+    //list DNS
+    'Records_DNS' => 'Records',
+    //Dowload Backup
+    'BACKUP_DOWNLOAD_SCHEDULED' => 'Download for Backup has been scheduled.',
+    'backend server' =>  'Backend Server',    
+    'traffic' => 'Traffic',
+    'disk' => 'Disk',
 );

+ 31 - 0
web/inc/i18n/bg.php

@@ -846,5 +846,36 @@ $LANG['bg'] = array(
     'Enable 2FA' => 'Активиране на двуфакторна автентификация',
     'Please scan the code below in your 2FA application:' => 'за да завършите настройката на двуфакторната автентификация, сканирайте QR кода по-долу <br /> с помощта на приложение за удостоверяване (като <a href = "https://play.google.com/store/apps/details?id=com"). google.android.apps.authenticator2 "> Google Удостоверител </a>):',
     '2FA Reset Code:' => 'Код за възстановяване на акаунта:',
+    
+        //list user 
+    'Name' => 'Name',
+    //Add / Edit user
+    'Contact' => 'Name',
+    'GREETINGS_GORDON' => "Hello, %s,\n",
+    
+    //List Mail Accounts
+    'Forwarding' => 'Forwarding',
+
+    //Cron Jobs
+    'Cron Job' => 'Cron Job',
+    //Edit server 
+    'Host' => 'Host',
+  
+      //list Backups
+    '1 backups' => '1 backups',
+    '%s backups' => '%s backups',
+    //list Firewall Rules
+    '1 firewall rule' => '1 firewall rule',
+    '%s firewall rules' => '%s firewall rules',
+    //list ip
+    '1 banned IP address' => '1 banned IP address',
+    '%s banned IP addresses' => '%s banned IP addresses', 
+    //list DNS
+    'Records_DNS' => 'Records',
+    //Dowload Backup
+    'BACKUP_DOWNLOAD_SCHEDULED' => 'Download for Backup has been scheduled.',
+    'backend server' =>  'Backend Server',
+    'traffic' => 'Traffic',
+    'disk' => 'Disk',
 );
 

+ 60 - 2
web/inc/i18n/bs.php

@@ -561,9 +561,9 @@ $LANG['bs'] = array(
     'AntiSpam' => 'AntiSpam',
     'Webmail URL' => 'Webmail Alias',
     'MySQL Support' => 'MySQL Support',
-    'phpMyAdmin URL' => 'phpMyAdmin URL',
+    'phpMyAdmin URL' => 'phpMyAdmin Alias',
     'PostgreSQL Support' => 'PostgreSQL Support',
-    'phpPgAdmin URL' => 'phpPgAdmin URL',
+    'phpPgAdmin URL' => 'phpPgAdmin Alias',
     'Maximum Number Of Databases' => 'Maksimalan broj baza',
     'Current Number Of Databases' => 'Trenutačan broj baza',
     'Local backup' => 'Lokalni backup',
@@ -848,4 +848,62 @@ $LANG['bs'] = array(
     'Enable 2FA' => 'Omogući dvofaktorsku provjeru identiteta',
     'Please scan the code below in your 2FA application:' => 'Da biste dovršili postavljanje dvofaktorske provjere autentičnosti, skenirajte QR kôd ispod <br /> pomoću autentifikacijske aplikacije (poput <a href = "https://play.google.com/store/apps/details?id=com" google.android.apps.authenticator2 "> Google Autentičar </a>):',
     '2FA Reset Code:' => 'Kôd za povrat računa:',
+    
+    //list user 
+    'Name' => 'Name',
+    //Add / Edit user
+    'Contact' => 'Name',
+    'GREETINGS_GORDON' => "Hello, %s,\n",
+    
+    //List Mail Accounts
+    'Forwarding' => 'Forwarding',
+
+    //Cron Jobs
+    'Cron Job' => 'Cron Job',
+    //Edit server 
+    'Host' => 'Host',
+  
+      //list Backups
+    '1 backups' => '1 backups',
+    '%s backups' => '%s backups',
+    //list Firewall Rules
+    '1 firewall rule' => '1 firewall rule',
+    '%s firewall rules' => '%s firewall rules',
+    //list ip
+    '1 banned IP address' => '1 banned IP address',
+    '%s banned IP addresses' => '%s banned IP addresses', 
+    //list DNS
+    'Records_DNS' => 'Records',
+    //Dowload Backup
+    'BACKUP_DOWNLOAD_SCHEDULED' => 'Download for Backup has been scheduled.',
+        //list user 
+    'Name' => 'Name',
+    //Add / Edit user
+    'Contact' => 'Name',
+    'GREETINGS_GORDON' => "Hello, %s,\n",
+    
+    //List Mail Accounts
+    'Forwarding' => 'Forwarding',
+
+    //Cron Jobs
+    'Cron Job' => 'Cron Job',
+    //Edit server 
+    'Host' => 'Host',
+  
+      //list Backups
+    '1 backups' => '1 backups',
+    '%s backups' => '%s backups',
+    //list Firewall Rules
+    '1 firewall rule' => '1 firewall rule',
+    '%s firewall rules' => '%s firewall rules',
+    //list ip
+    '1 banned IP address' => '1 banned IP address',
+    '%s banned IP addresses' => '%s banned IP addresses', 
+    //list DNS
+    'Records_DNS' => 'Records',
+    //Dowload Backup
+    'BACKUP_DOWNLOAD_SCHEDULED' => 'Download for Backup has been scheduled.';
+    'backend server' =>  'Backend Server',
+    'traffic' => 'Traffic',
+    'disk' => 'Disk',    
 );

+ 34 - 2
web/inc/i18n/cn.php

@@ -573,9 +573,9 @@ $LANG['cn'] = array(
     'Use Web Domain SSL Certificate' => '采用网站域名SSL证书',
     'Webmail URL' => '网页邮箱网址',
     'MySQL Support' => 'MySQL 支持',
-    'phpMyAdmin URL' => '设置 phpMyAdmin 网址',
+    'phpMyAdmin URL' => 'phpMyAdmin别名',
     'PostgreSQL Support' => 'PostgreSQL 支持',
-    'phpPgAdmin URL' => '设置 phpPgAdmin 网址',
+    'phpPgAdmin URL' => 'phpPgAdmin别名',
     'Maximum Number Of Databases' => '数据库最大数量',
     'Current Number Of Databases' => '数据库当前数量',
     'Local backup' => '本地备份',
@@ -861,4 +861,36 @@ $LANG['cn'] = array(
     'Enable 2FA' => '启用两因素身份验证',
     'Please scan the code below in your 2FA application:' => '要完成两因素身份验证的设置,请扫描以下QR码<br />使用身份验证应用程序,例如 <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Google身份验证器</a>):',
     '2FA Reset Code:' => '帐户恢复代码:',
+    
+        //list user 
+    'Name' => 'Name',
+    //Add / Edit user
+    'Contact' => 'Name',
+    'GREETINGS_GORDON' => "Hello, %s,\n",
+    
+    //List Mail Accounts
+    'Forwarding' => 'Forwarding',
+
+    //Cron Jobs
+    'Cron Job' => 'Cron Job',
+    //Edit server 
+    'Host' => 'Host',
+  
+      //list Backups
+    '1 backups' => '1 backups',
+    '%s backups' => '%s backups',
+    //list Firewall Rules
+    '1 firewall rule' => '1 firewall rule',
+    '%s firewall rules' => '%s firewall rules',
+    //list ip
+    '1 banned IP address' => '1 banned IP address',
+    '%s banned IP addresses' => '%s banned IP addresses', 
+    //list DNS
+    'Records_DNS' => 'Records',
+    //Dowload Backup
+    'BACKUP_DOWNLOAD_SCHEDULED' => 'Download for Backup has been scheduled.',
+    
+    'backend server' =>  'Backend Server',
+    'traffic' => 'Traffic',
+    'disk' => 'Disk',
 );

Some files were not shown because too many files changed in this diff