Эх сурвалжийг харах

Merge branch 'master' into madeITBelgium-patch-1

Made I.T 8 жил өмнө
parent
commit
376916ca54
100 өөрчлөгдсөн 1495 нэмэгдсэн , 23 устгасан
  1. 17 5
      bin/v-add-backup-host
  2. 2 0
      bin/v-add-dns-record
  3. 2 0
      bin/v-add-mail-account-alias
  4. 2 0
      bin/v-add-mail-account-autoreply
  5. 1 0
      bin/v-add-mail-account-forward
  6. 2 0
      bin/v-add-mail-account-fwd-only
  7. 1 0
      bin/v-add-mail-domain
  8. 2 0
      bin/v-add-mail-domain-antispam
  9. 2 0
      bin/v-add-mail-domain-antivirus
  10. 1 0
      bin/v-add-mail-domain-catchall
  11. 2 0
      bin/v-add-mail-domain-dkim
  12. 2 0
      bin/v-add-web-domain-alias
  13. 2 0
      bin/v-add-web-domain-ftp
  14. 1 0
      bin/v-add-web-domain-stats
  15. 56 13
      bin/v-backup-user
  16. 2 0
      bin/v-change-dns-domain-exp
  17. 2 0
      bin/v-change-dns-domain-ip
  18. 2 0
      bin/v-change-dns-domain-soa
  19. 1 0
      bin/v-change-dns-domain-tpl
  20. 2 0
      bin/v-change-dns-domain-ttl
  21. 2 0
      bin/v-change-dns-record
  22. 2 0
      bin/v-change-dns-record-id
  23. 2 0
      bin/v-change-mail-account-password
  24. 2 0
      bin/v-change-mail-account-quota
  25. 1 0
      bin/v-change-mail-domain-catchall
  26. 1 0
      bin/v-change-web-domain-backend-tpl
  27. 2 0
      bin/v-change-web-domain-ftp-password
  28. 2 0
      bin/v-change-web-domain-ftp-path
  29. 2 0
      bin/v-change-web-domain-ip
  30. 2 0
      bin/v-change-web-domain-name
  31. 2 0
      bin/v-change-web-domain-proxy-tpl
  32. 2 0
      bin/v-change-web-domain-sslcert
  33. 2 0
      bin/v-change-web-domain-sslhome
  34. 1 0
      bin/v-change-web-domain-stats
  35. 2 0
      bin/v-change-web-domain-tpl
  36. 2 0
      bin/v-delete-dns-on-web-alias
  37. 2 0
      bin/v-delete-dns-record
  38. 1 0
      bin/v-delete-mail-account
  39. 1 0
      bin/v-delete-mail-account-alias
  40. 2 0
      bin/v-delete-mail-account-autoreply
  41. 1 0
      bin/v-delete-mail-account-forward
  42. 2 0
      bin/v-delete-mail-account-fwd-only
  43. 1 0
      bin/v-delete-mail-domain
  44. 2 0
      bin/v-delete-mail-domain-antispam
  45. 2 0
      bin/v-delete-mail-domain-antivirus
  46. 1 0
      bin/v-delete-mail-domain-catchall
  47. 2 0
      bin/v-delete-web-domain
  48. 2 0
      bin/v-delete-web-domain-backend
  49. 2 0
      bin/v-delete-web-domain-ftp
  50. 2 0
      bin/v-delete-web-domain-proxy
  51. 2 0
      bin/v-delete-web-domain-ssl
  52. 1 0
      bin/v-delete-web-domain-stats
  53. 2 0
      bin/v-get-dns-domain-value
  54. 2 0
      bin/v-get-mail-account-value
  55. 2 0
      bin/v-get-mail-domain-value
  56. 13 4
      bin/v-restore-user
  57. 2 0
      bin/v-suspend-dns-domain
  58. 2 0
      bin/v-suspend-dns-record
  59. 2 0
      bin/v-suspend-mail-account
  60. 3 0
      bin/v-suspend-mail-accounts
  61. 2 0
      bin/v-suspend-mail-domain
  62. 2 0
      bin/v-suspend-web-domain
  63. 2 0
      bin/v-unsuspend-dns-domain
  64. 2 0
      bin/v-unsuspend-dns-record
  65. 2 0
      bin/v-unsuspend-mail-account
  66. 2 0
      bin/v-unsuspend-mail-accounts
  67. 2 0
      bin/v-unsuspend-mail-domain
  68. 2 0
      bin/v-unsuspend-web-domain
  69. 2 0
      bin/v-update-mail-domain-disk
  70. 2 0
      bin/v-update-web-domain-disk
  71. 2 0
      bin/v-update-web-domain-ssl
  72. 1 0
      bin/v-update-web-domain-stat
  73. 2 0
      bin/v-update-web-domain-traff
  74. 5 0
      func/domain.sh
  75. 4 1
      func/main.sh
  76. 2 0
      func/rebuild.sh
  77. 56 0
      install/debian/7/templates/web/nginx/php5-fpm/laravel.stpl
  78. 50 0
      install/debian/7/templates/web/nginx/php5-fpm/laravel.tpl
  79. 56 0
      install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl
  80. 50 0
      install/debian/8/templates/web/nginx/php5-fpm/laravel.tpl
  81. 56 0
      install/rhel/5/templates/web/nginx/php-fpm/laravel.stpl
  82. 50 0
      install/rhel/5/templates/web/nginx/php-fpm/laravel.tpl
  83. 56 0
      install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl
  84. 50 0
      install/rhel/6/templates/web/nginx/php-fpm/laravel.tpl
  85. 56 0
      install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl
  86. 50 0
      install/rhel/7/templates/web/nginx/php-fpm/laravel.tpl
  87. 56 0
      install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.stpl
  88. 50 0
      install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.tpl
  89. 56 0
      install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.stpl
  90. 50 0
      install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.tpl
  91. 56 0
      install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.stpl
  92. 50 0
      install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.tpl
  93. 56 0
      install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.stpl
  94. 50 0
      install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.tpl
  95. 56 0
      install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.stpl
  96. 50 0
      install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.tpl
  97. 56 0
      install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.stpl
  98. 50 0
      install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.tpl
  99. 56 0
      install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.stpl
  100. 50 0
      install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.tpl

+ 17 - 5
bin/v-add-backup-host

@@ -122,8 +122,12 @@ if [ "$type" = 'ftp' ]; then
     fi
 
     # Checking write permissions
-    ftpc "mkdir $path" > /dev/null 2>&1
-    ftmpdir="$path/vst.bK76A9SUkt"
+    if [ -z $path ]; then
+        ftmpdir="vst.bK76A9SUkt"
+    else
+        ftpc "mkdir $path" > /dev/null 2>&1
+        ftmpdir="$path/vst.bK76A9SUkt"
+    fi
     ftp_result=$(ftpc "mkdir $ftmpdir" "rm $ftmpdir"|grep -v Trying)
     if [ ! -z "$ftp_result" ] ; then
         echo "$ftp_result"
@@ -137,9 +141,17 @@ if [ "$type" = 'sftp' ]; then
     if [ -z $port ]; then
         port=22
     fi
-    if sftpc "mkdir $path" > /dev/null 2>&1 ; then
-        sftmpdir="$path/vst.bK76A9SUkt"
-        sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
+    if [ -z $path ]; then
+            sftmpdir="vst.bK76A9SUkt"
+            sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
+    else
+        if sftpc "mkdir $path" > /dev/null 2>&1 ; then
+            sftmpdir="$path/vst.bK76A9SUkt"
+            sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
+        else
+            sftmpdir="$path/vst.bK76A9SUkt"
+            sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
+        fi
     fi
     rc=$?
     if [[ "$rc" != 0 ]]; then

+ 2 - 0
bin/v-add-dns-record

@@ -15,6 +15,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 record=$(idn -t --quiet -u "$3" )
 record=$(echo "$record" | tr '[:upper:]' '[:lower:]')
 rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]')
@@ -53,6 +54,7 @@ fi
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-mail-account-alias

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 malias=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-mail-account-autoreply

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 autoreply=$4
 
@@ -30,6 +31,7 @@ fi
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-add-mail-account-forward

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 forward=$4
 

+ 2 - 0
bin/v-add-mail-account-fwd-only

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 
 # Includes
@@ -29,6 +30,7 @@ fi
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-add-mail-domain

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 antispam=${3-yes}
 antivirus=${4-yes}
 dkim=${5-yes}

+ 2 - 0
bin/v-add-mail-domain-antispam

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-mail-domain-antivirus

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-add-mail-domain-catchall

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 email="$3"
 
 # Includes

+ 2 - 0
bin/v-add-mail-domain-dkim

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 dkim_size=${3-1024}
 
 # Includes
@@ -29,6 +30,7 @@ fi
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-web-domain-alias

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 aliases=$3
 restart="$4"
 
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 format_aliases
 
 

+ 2 - 0
bin/v-add-web-domain-ftp

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ftp_user=${1}_${3}
 password=$4; HIDE=4
 ftp_path=$5
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-add-web-domain-stats

@@ -16,6 +16,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 type=$3
 
 # Includes

+ 56 - 13
bin/v-backup-user

@@ -70,6 +70,7 @@ done
 
 # Creating temporary directory
 tmpdir=$(mktemp -p $BACKUP -d)
+
 if [ "$?" -ne 0 ]; then
     echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify
     check_result $E_NOTEXIST "can't create tmp dir"
@@ -137,6 +138,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
         mkdir -p $tmpdir/web/$domain/vesta
 
         # Get domain variables
+        domain_idn=$domain
         format_domain_idn
         get_domain_values 'web'
 
@@ -286,6 +288,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then
         echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log
         mkdir -p $tmpdir/mail/$domain/conf
         mkdir -p $tmpdir/mail/$domain/vesta
+        domain_idn=$domain
         format_domain_idn
 
         # Backup exim config
@@ -476,7 +479,7 @@ local_backup(){
     rm -f $BACKUP/$user.$date.tar
 
     # Checking retention
-    backup_list=$(ls -lrt $BACKUP/ |awk '{print $9}' |grep "^$user\.")
+    backup_list=$(ls -lrt $BACKUP/ |awk '{print $9}' |grep "^$user\." | grep ".tar")
     backups_count=$(echo "$backup_list" |wc -l)
     if [ "$BACKUPS" -le "$backups_count" ]; then
         backups_rm_number=$((backups_count - BACKUPS))
@@ -555,7 +558,6 @@ ftp_backup() {
         check_result "$E_PARSING" "$error"
     fi
 
-
     # Debug info
     echo -e "$(date "+%F %T") Remote: ftp://$HOST$BPATH/$user.$date.tar"
 
@@ -572,8 +574,12 @@ ftp_backup() {
     fi
 
     # Check ftp permissions
-    ftpc "mkdir $BPATH" > /dev/null 2>&1
-    ftmpdir="$BPATH/vst.bK76A9SUkt"
+    if [ -z $BPATH ]; then
+            ftmpdir="vst.bK76A9SUkt"
+        else
+            ftpc "mkdir $BPATH" > /dev/null 2>&1
+            ftmpdir="$BPATH/vst.bK76A9SUkt"
+    fi
     ftpc "mkdir $ftmpdir" "rm $ftmpdir"
     ftp_result=$(ftpc "mkdir $ftmpdir" "rm $ftmpdir" |grep -v Trying)
     if [ ! -z "$ftp_result" ] ; then
@@ -586,7 +592,11 @@ ftp_backup() {
     fi
 
     # Checking retention
-    backup_list=$(ftpc "cd $BPATH" "ls" |awk '{print $9}' |grep "^$user\.")
+    if [ -z $BPATH ]; then
+        backup_list=$(ftpc "ls" |awk '{print $9}' |grep "^$user\.")
+    else
+        backup_list=$(ftpc "cd $BPATH" "ls" |awk '{print $9}' |grep "^$user\.")
+    fi
     backups_count=$(echo "$backup_list" |wc -l)
     if [ "$backups_count" -ge "$BACKUPS" ]; then
         backups_rm_number=$((backups_count - BACKUPS + 1))
@@ -594,19 +604,31 @@ ftp_backup() {
             backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar$//")
             echo -e "$(date "+%F %T") Rotated ftp backup: $backup_date" |\
                 tee -a $BACKUP/$user.log
-            ftpc "cd $BPATH" "delete $backup"
+            if [ -z $BPATH ]; then
+                ftpc "delete $backup"
+            else
+                ftpc "cd $BPATH" "delete $backup"
+            fi
         done
     fi
 
     # Uploading backup archive
     if [ "$localbackup" = 'yes' ]; then
         cd $BACKUP
-        ftpc "cd $BPATH" "put $user.$date.tar"
+        if [ -z $BPATH ]; then
+            ftpc "put $user.$date.tar"
+         else
+            ftpc "cd $BPATH" "put $user.$date.tar"
+        fi
     else
         cd $tmpdir
         tar -cf $BACKUP/$user.$date.tar .
         cd $BACKUP/
-        ftpc "cd $BPATH" "put $user.$date.tar"
+        if [ -z $BPATH ]; then
+            ftpc "put $user.$date.tar"
+        else
+            ftpc "cd $BPATH" "put $user.$date.tar"
+        fi
         rm -f $user.$date.tar
     fi
 }
@@ -704,7 +726,11 @@ sftp_backup() {
         tee -a $BACKUP/$user.log
 
     # Checking network connection and write permissions
-    sftmpdir="$BPATH/vst.bK76A9SUkt"
+    if [ -z $BPATH ]; then
+        sftmpdir="vst.bK76A9SUkt"
+    else
+        sftmpdir="$BPATH/vst.bK76A9SUkt"
+    fi
     sftpc "mkdir $BPATH" > /dev/null 2>&1
     sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
     rc=$?
@@ -721,7 +747,11 @@ sftp_backup() {
     fi
 
     # Checking retention
-    backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}'|grep "^$user\.")
+    if [ -z $BPATH ]; then
+        backup_list=$(sftpc "ls -l" |awk '{print $9}'|grep "^$user\.")
+    else
+        backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}'|grep "^$user\.")
+    fi
     backups_count=$(echo "$backup_list" |wc -l)
     if [ "$backups_count" -ge "$BACKUPS" ]; then
         backups_rm_number=$((backups_count - BACKUPS + 1))
@@ -729,7 +759,11 @@ sftp_backup() {
             backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar.*$//")
             echo -e "$(date "+%F %T") Rotated sftp backup: $backup_date" |\
                 tee -a $BACKUP/$user.log
-            sftpc "cd $BPATH" "rm $backup" > /dev/null 2>&1
+            if [ -z $BPATH ]; then
+                sftpc "rm $backup" > /dev/null 2>&1
+            else
+                sftpc "cd $BPATH" "rm $backup" > /dev/null 2>&1
+            fi
         done
     fi
 
@@ -737,12 +771,20 @@ sftp_backup() {
     echo "$(date "+%F %T") Uploading $user.$date.tar"|tee -a $BACKUP/$user.log
     if [ "$localbackup" = 'yes' ]; then
         cd $BACKUP
-        sftpc "cd $BPATH" "put $user.$date.tar" > /dev/null 2>&1
+        if [ -z $BPATH ]; then
+            sftpc "put $user.$date.tar" "chmod 0600 $user.$date.tar" > /dev/null 2>&1
+        else
+            sftpc "cd $BPATH" "put $user.$date.tar" "chmod 0600 $user.$date.tar" > /dev/null 2>&1
+        fi
     else
         cd $tmpdir
         tar -cf $BACKUP/$user.$date.tar .
         cd $BACKUP/
-        sftpc "cd $BPATH" "put $user.$date.tar" > /dev/null 2>&1
+        if [ -z $BPATH ]; then
+            sftpc "put $user.$date.tar" "chmod 0600 $user.$date.tar" > /dev/null 2>&1
+        else
+            sftpc "cd $BPATH" "put $user.$date.tar" "chmod 0600 $user.$date.tar" > /dev/null 2>&1
+        fi
         rm -f $user.$date.tar
     fi
 }
@@ -851,6 +893,7 @@ update_user_value "$user" '$U_BACKUPS' "$U_BACKUPS"
 
 # Send notification
 if [ -e "$BACKUP/$user.log" ]; then
+    cd $BACKUP
     subj="$user → backup has been completed"
     email=$(get_user_value '$CONTACT')
     cat $BACKUP/$user.log |$SENDMAIL -s "$subj" $email $notify

+ 2 - 0
bin/v-change-dns-domain-exp

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 exp=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-dns-domain-ip

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ip=$3
 restart=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-dns-domain-soa

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
 restart=$4
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-change-dns-domain-tpl

@@ -14,6 +14,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 template=$3
 restart=$4
 

+ 2 - 0
bin/v-change-dns-domain-ttl

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ttl=$3
 restart=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-dns-record

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 id=$3
 dvalue=$(idn -t --quiet -u "$4" )
 priority=$5
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-dns-record-id

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 id=$3
 newid=$4
 restart=$5
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-mail-account-password

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 password=$4; HIDE=4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-mail-account-quota

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 quota=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-change-mail-domain-catchall

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 email=$3
 
 # Includes

+ 1 - 0
bin/v-change-web-domain-backend-tpl

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 template=$3
 restart=$4
 

+ 2 - 0
bin/v-change-web-domain-ftp-password

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ftp_user=$3
 password=$4; HIDE=4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-web-domain-ftp-path

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ftp_user=$3
 ftp_path=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-web-domain-ip

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ip=$3
 restart=$4
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-web-domain-name

@@ -12,6 +12,7 @@
 # Argument defenition
 user=$1
 domain=$2
+domain_idn=$2
 new_domain=$3
 restart=$4
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-web-domain-proxy-tpl

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 template=$3
 default_extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,\
 exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm"
@@ -27,6 +28,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-web-domain-sslcert

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ssl_dir=$3
 restart=$4
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-web-domain-sslhome

@@ -8,6 +8,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ssl_home=$3
 restart=$4
 
@@ -19,6 +20,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-change-web-domain-stats

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 type=$3
 
 # Includes

+ 2 - 0
bin/v-change-web-domain-tpl

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 template=$3
 restart=$4
 
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-dns-on-web-alias

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 dom_alias=$(idn -t --quiet -u "$3" )
 dom_alias=$(echo $dom_alias |sed -e 's/\.*$//g' -e 's/^\.*//g')
 dom_alias=$(echo $dom_alias |tr '[:upper:]' '[:lower:]')
@@ -26,6 +27,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-dns-record

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 id=$3
 restart=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-delete-mail-account

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 
 # Includes

+ 1 - 0
bin/v-delete-mail-account-alias

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 malias=$4
 

+ 2 - 0
bin/v-delete-mail-account-autoreply

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 malias=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-delete-mail-account-forward

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 forward=$4
 

+ 2 - 0
bin/v-delete-mail-account-fwd-only

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-delete-mail-domain

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh

+ 2 - 0
bin/v-delete-mail-domain-antispam

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-mail-domain-antivirus

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-delete-mail-domain-catchall

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh

+ 2 - 0
bin/v-delete-web-domain

@@ -15,6 +15,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 restart=$3
 
 # Includes
@@ -26,6 +27,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-web-domain-backend

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-web-domain-ftp

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ftp_user=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-web-domain-proxy

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 restart=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-web-domain-ssl

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 restart=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-delete-web-domain-stats

@@ -13,6 +13,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh

+ 2 - 0
bin/v-get-dns-domain-value

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 key=$(echo "$3"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
 
 # Includes
@@ -20,6 +21,7 @@ source $VESTA/func/main.sh
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-get-mail-account-value

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 key=$(echo "$4"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
 
@@ -21,6 +22,7 @@ source $VESTA/func/main.sh
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-get-mail-domain-value

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 key=$(echo "$3"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
 
 # Includes
@@ -20,6 +21,7 @@ source $VESTA/func/main.sh
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 13 - 4
bin/v-restore-user

@@ -62,7 +62,11 @@ ftp_download() {
     if [ -z "$PORT" ]; then
         PORT='21'
     fi
-    ftpc "cd $BPATH" "get $1"
+    if [ -z $BPATH ]; then
+        ftpc "get $1"
+    else
+        ftpc "cd $BPATH" "get $1"
+    fi
 }
 
 # sftp command function
@@ -99,8 +103,6 @@ sftpc() {
                     set arg [lindex \$argv \$count]
                     send "\$arg\r"
                     incr count
-                } else {
-                    incr count
                 } else {
                     send "exit\r"
                     set output "Disconnected."
@@ -131,7 +133,11 @@ sftp_download() {
         PORT='22'
     fi
     cd $BACKUP
-    sftpc "cd $BPATH" "get $1" > /dev/null 2>&1
+    if [ -z $BPATH ]; then
+        sftpc "get $1" > /dev/null 2>&1
+    else
+        sftpc "cd $BPATH" "get $1" > /dev/null 2>&1
+    fi
 
 }
 
@@ -567,6 +573,9 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
 
         # Rebuilding mail config
         rebuild_mail_domain_conf
+        
+        domain_idn=$domain
+        format_domain_idn
 
         # Restoring emails
         if [ -e "$tmpdir/mail/$domain/accounts.tar.gz" ]; then

+ 2 - 0
bin/v-suspend-dns-domain

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 restart="$3"
 
 # Includes
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-suspend-dns-record

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 id=$3
 restart=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-suspend-mail-account

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 3 - 0
bin/v-suspend-mail-accounts

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -19,6 +20,8 @@ source $VESTA/conf/vesta.conf
 
 # Additional argument formatting
 format_domain
+format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-suspend-mail-domain

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-suspend-web-domain

@@ -14,6 +14,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 restart=$3
 
 # Includes
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-unsuspend-dns-domain

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-unsuspend-dns-record

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 id=$3
 restart=$4
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-unsuspend-mail-account

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 account=$3
 
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-unsuspend-mail-accounts

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-unsuspend-mail-domain

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-unsuspend-web-domain

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 restart=$3
 
 # Includes
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-update-mail-domain-disk

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-update-web-domain-disk

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 2 - 0
bin/v-update-web-domain-ssl

@@ -15,6 +15,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 ssl_dir=$3
 restart=$4
 
@@ -27,6 +28,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-update-web-domain-stat

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh

+ 2 - 0
bin/v-update-web-domain-traff

@@ -12,6 +12,7 @@
 # Argument definition
 user=$1
 domain=$2
+domain_idn=$2
 
 # Includes
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 format_domain
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 #----------------------------------------------------------#

+ 5 - 0
func/domain.sh

@@ -172,6 +172,9 @@ add_web_config() {
         conf="$HOMEDIR/$user/conf/web/s$1.conf"
     fi
 
+    domain_idn=$domain
+    format_domain_idn
+
     cat $WEBTPL/$1/$WEB_BACKEND/$2 | \
         sed -e "s|%ip%|$local_ip|g" \
             -e "s|%domain%|$domain|g" \
@@ -228,6 +231,8 @@ get_web_config_lines() {
         check_result $E_PARSING "can't parse template $1"
     fi
 
+    domain_idn=$domain
+    format_domain_idn
     vhost_lines=$(grep -niF "name $domain_idn" $2)
     vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #"
     vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :)

+ 4 - 1
func/main.sh

@@ -737,7 +737,7 @@ is_cron_format_valid() {
             fi
         done
     fi
-    if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -lt $limit ]; then
+    if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -le $limit ]; then
         check_format='ok'
     fi
     if [ "$check_format" != 'ok' ]; then
@@ -864,6 +864,9 @@ format_domain() {
 }
 
 format_domain_idn() {
+    if [ -z "$domain_idn" ]; then
+        domain_idn=$domain
+    fi
     if [[ "$domain_idn" = *[![:ascii:]]* ]]; then
         domain_idn=$(idn -t --quiet -a $domain_idn)
     fi

+ 2 - 0
func/rebuild.sh

@@ -227,6 +227,8 @@ rebuild_web_domain_conf() {
 
     # Adding web stats parser
     if [ ! -z "$STATS" ]; then
+        domain_idn=$domain
+        format_domain_idn
         cat $WEBTPL/$STATS/$STATS.tpl |\
             sed -e "s|%ip%|$local_ip|g" \
                 -e "s|%web_system%|$WEB_SYSTEM|g" \

+ 56 - 0
install/debian/7/templates/web/nginx/php5-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/debian/7/templates/web/nginx/php5-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/debian/8/templates/web/nginx/php5-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

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

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

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

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/rhel/6/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/rhel/7/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 56 - 0
install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.stpl

@@ -0,0 +1,56 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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         on;
+    ssl_certificate      %ssl_pem%;
+    ssl_certificate_key  %ssl_key%;
+    
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

+ 50 - 0
install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.tpl

@@ -0,0 +1,50 @@
+server {
+    listen      %ip%:%web_port%;
+    server_name %domain_idn% %alias_idn%;
+    root        %docroot%/public;
+    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;
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+            expires     max;
+        }
+
+        location ~ [^/]\.php(/|$) {
+            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+            if (!-f $document_root$fastcgi_script_name) {
+                return  404;
+            }
+
+            fastcgi_pass    %backend_lsnr%;
+            fastcgi_index   index.php;
+            include         /etc/nginx/fastcgi_params;
+        }
+    }
+
+    error_page  403 /error/404.html;
+    error_page  404 /error/404.html;
+    error_page  500 502 503 504 /error/50x.html;
+
+    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*;
+    }
+
+    include     /etc/nginx/conf.d/phpmyadmin.inc*;
+    include     /etc/nginx/conf.d/phppgadmin.inc*;
+    include     /etc/nginx/conf.d/webmail.inc*;
+
+    include     %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
+}

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно