Просмотр исходного кода

Merge branch 'master' into feature/800

Conflicts:
	web/edit/web/index.php
Derrick Hammer 9 лет назад
Родитель
Сommit
09e1238d54
100 измененных файлов с 855 добавлено и 62 удалено
  1. 2 1
      bin/v-add-user
  2. 2 6
      bin/v-add-web-domain-ftp
  3. 15 9
      bin/v-add-web-domain-stats-user
  4. 41 0
      bin/v-backup-user
  5. 1 1
      bin/v-change-domain-owner
  6. 77 0
      bin/v-change-sys-vesta-ssl
  7. 1 1
      bin/v-list-sys-services
  8. 130 0
      bin/v-list-sys-vesta-ssl
  9. 1 1
      bin/v-rebuild-web-domains
  10. 122 8
      bin/v-restore-user
  11. 2 1
      bin/v-update-sys-ip
  12. 8 3
      func/domain.sh
  13. 10 4
      func/rebuild.sh
  14. 1 1
      install/debian/7/packages/default.pkg
  15. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.stpl
  16. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.tpl
  17. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.stpl
  18. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.tpl
  19. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.stpl
  20. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.tpl
  21. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.stpl
  22. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.tpl
  23. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/default.stpl
  24. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/default.tpl
  25. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl
  26. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl
  27. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl
  28. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl
  29. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl
  30. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl
  31. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl
  32. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl
  33. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/joomla.stpl
  34. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/joomla.tpl
  35. 12 7
      install/debian/7/templates/web/nginx/php5-fpm/modx.stpl
  36. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/modx.tpl
  37. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/moodle.stpl
  38. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/moodle.tpl
  39. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/no-php.stpl
  40. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/no-php.tpl
  41. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl
  42. 10 0
      install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl
  43. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/piwik.stpl
  44. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/piwik.tpl
  45. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl
  46. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl
  47. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/wordpress.stpl
  48. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/wordpress.tpl
  49. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/wordpress2.stpl
  50. 5 0
      install/debian/7/templates/web/nginx/php5-fpm/wordpress2.tpl
  51. 0 10
      install/debian/7/templates/web/nginx/php5-fpm/www.conf
  52. 1 1
      install/debian/8/packages/default.pkg
  53. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.stpl
  54. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.tpl
  55. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.stpl
  56. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.tpl
  57. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.stpl
  58. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.tpl
  59. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.stpl
  60. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.tpl
  61. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/default.stpl
  62. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/default.tpl
  63. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl
  64. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl
  65. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl
  66. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl
  67. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl
  68. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl
  69. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl
  70. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl
  71. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/joomla.stpl
  72. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/joomla.tpl
  73. 12 7
      install/debian/8/templates/web/nginx/php5-fpm/modx.stpl
  74. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/modx.tpl
  75. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl
  76. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/moodle.tpl
  77. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/no-php.stpl
  78. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/no-php.tpl
  79. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl
  80. 10 0
      install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl
  81. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/piwik.stpl
  82. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/piwik.tpl
  83. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl
  84. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl
  85. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/wordpress.stpl
  86. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/wordpress.tpl
  87. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/wordpress2.stpl
  88. 5 0
      install/debian/8/templates/web/nginx/php5-fpm/wordpress2.tpl
  89. 1 1
      install/rhel/5/packages/default.pkg
  90. 6 0
      install/rhel/5/pma/phpMyAdmin.conf
  91. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.stpl
  92. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.tpl
  93. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.stpl
  94. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.tpl
  95. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.stpl
  96. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.tpl
  97. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.stpl
  98. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.tpl
  99. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/default.stpl
  100. 5 0
      install/rhel/5/templates/web/nginx/php-fpm/default.tpl

+ 2 - 1
bin/v-add-user

@@ -74,7 +74,8 @@ fi
 
 if [ ! -z "$MAIL_SYSTEM" ]; then
     mkdir $HOMEDIR/$user/conf/mail $HOMEDIR/$user/mail
-    chmod 751 $HOMEDIR/$user/mail $HOMEDIR/$user/conf/mail
+    chmod 751 $HOMEDIR/$user/mail 
+    chmod 755 $HOMEDIR/$user/conf/mail
 fi
 
 if [ ! -z "$DNS_SYSTEM" ]; then

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

@@ -51,12 +51,8 @@ is_password_valid
 get_domain_values 'web'
 
 # Defining ftp user shell
-if [ -z "$FTP_SHELL" ]; then
-    shell='/sbin/nologin'
-    if [ -e "/usr/bin/rssh" ]; then
-        shell='/usr/bin/rssh'
-    fi
-else
+shell='/sbin/nologin'
+if [ ! -z "$FTP_SHELL" ]; then
     shell=$FTP_SHELL
 fi
 

+ 15 - 9
bin/v-add-web-domain-stats-user

@@ -11,7 +11,7 @@
 
 # Argument definition
 user=$1
-domain=$(idn -t --quiet -u "$2" )
+domain=$2
 stats_user=$3
 password=$4; HIDE=4
 
@@ -43,15 +43,21 @@ is_password_valid
 stats_dir="$HOMEDIR/$user/web/$domain/stats"
 
 # Adding htaccess file
-echo "AuthUserFile $stats_dir/.htpasswd
-AuthName \"Web Statistics\"
-AuthType Basic
-Require valid-user" > $stats_dir/.htaccess
+if [ "$WEB_SYSTEM" = 'nginx' ]; then
+    echo "auth_basic \"Web Statistics\";" > $stats_dir/auth.conf
+    echo "auth_basic_user_file $stats_dir/.htpasswd;" >> $stats_dir/auth.conf
+else
+    echo "AuthUserFile $stats_dir/.htpasswd" > $stats_dir/.htaccess
+    echo "AuthName \"Web Statistics\"" >> $stats_dir/.htaccess
+    echo "AuthType Basic" >> $stats_dir/.htaccess
+    echo "Require valid-user" >> $stats_dir/.htaccess
+fi
 
 # Generating htaccess user and password
-rm -f $stats_dir/.htpasswd
-htpasswd -bc $stats_dir/.htpasswd "$stats_user" "$password" &>/dev/null
-stats_crypt=$(grep $stats_user: $stats_dir/.htpasswd |cut -f 2 -d :)
+salt=$(generate_password "$PW_MATRIX" "8")
+stats_pass=$($BIN/v-generate-password-hash md5 $salt $password)
+echo "$stats_user:$stats_pass" > $stats_dir/.htpasswd
+
 
 #----------------------------------------------------------#
 #                       Vesta                              #
@@ -59,7 +65,7 @@ stats_crypt=$(grep $stats_user: $stats_dir/.htpasswd |cut -f 2 -d :)
 
 # Adding stats user in config
 update_object_value 'web' 'DOMAIN' "$domain" '$STATS_USER' "$stats_user"
-update_object_value 'web' 'DOMAIN' "$domain" '$STATS_CRYPT' "$stats_crypt"
+update_object_value 'web' 'DOMAIN' "$domain" '$STATS_CRYPT' "$stats_pass"
 
 # Logging
 log_history "added password protection for web stats on $domain"

+ 41 - 0
bin/v-backup-user

@@ -747,6 +747,46 @@ sftp_backup() {
     fi
 }
 
+google_backup() {
+
+    # Defining google settings
+    source $VESTA/conf/google.backup.conf
+    gsutil="$VESTA/3rdparty/gsutil/gsutil"
+    export BOTO_CONFIG="$VESTA/conf/.google.backup.boto"
+
+    # Debug info
+    echo -e "$(date "+%F %T") Remote: gs://$BUCKET/$BPATH/$user.$date.tar"
+
+    # Checking retention
+    backup_list=$(${gsutil} ls gs://$BUCKET/$BPATH/$user.* 2>/dev/null)
+    backups_count=$(echo "$backup_list" |wc -l)
+    if [ "$backups_count" -ge "$BACKUPS" ]; then
+        backups_rm_number=$((backups_count - BACKUPS + 1))
+        for backup in $(echo "$backup_list" |head -n $backups_rm_number); do 
+            echo -e "$(date "+%F %T") Roated gcp backup: $backup"
+            $gsutil rm $backup > /dev/null 2>&1
+        done
+    fi
+
+    # Uploading backup archive
+    echo -e "$(date "+%F %T") Uploading $user.$date.tar ..."
+    if [ "$localbackup" = 'yes' ]; then
+        cd $BACKUP
+        ${gsutil} cp $user.$date.tar gs://$BUCKET/$BPATH/ > /dev/null 2>&1
+    else
+        cd $tmpdir
+        tar -cf $BACKUP/$user.$date.tar .
+        cd $BACKUP/
+        ${gsutil} cp $user.$date.tar gs://$BUCKET/$BPATH/ > /dev/null 2>&1
+        rc=$?
+        rm -f $user.$date.tar
+        if [ "$rc" -ne 0 ]; then
+            check_result "$E_CONNECT" "gsutil failed to upload $user.$date.tar"
+        fi
+    fi
+}
+
+
 echo -e "\n-- SUMMARY --" |tee -a $BACKUP/$user.log
 
 # Switching on backup system types
@@ -755,6 +795,7 @@ for backup_type in $(echo -e "${BACKUP_SYSTEM//,/\\n}"); do
         local) local_backup ;;
         ftp)   ftp_backup ;;
         sftp)  sftp_backup ;;
+        google) google_backup ;;
     esac
 done
 

+ 1 - 1
bin/v-change-domain-owner

@@ -27,7 +27,7 @@ check_args '2' "$#" 'DOMAIN USER'
 is_format_valid 'domain' 'user'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
-owner=$(v-search-domain-owner $domain)
+owner=$($BIN/v-search-domain-owner $domain)
 if [ -z "$owner" ]; then
     check_result $E_NOTEXIST "domain $domain doesn't exist"
 fi

+ 77 - 0
bin/v-change-sys-vesta-ssl

@@ -0,0 +1,77 @@
+#!/bin/bash
+# info: change vesta ssl certificate
+# options: SSL_DIR [RESTART]
+#
+# The function changes vesta SSL certificate and the key.
+
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+# Argument definition
+domain='certificate'
+ssl_dir=$1
+restart=$2
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/func/domain.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+check_args '1' "$#" 'SSL_DIR [RESTART]'
+is_format_valid 'ssl_dir'
+
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+# Checking new certificate
+certificate=$(cat $ssl_dir/$domain.crt |grep -n END)
+certificate_count=$(echo "$certificate" |wc -l)
+if [ "$certificate_count" -gt 1 ]; then
+    crt_end=$(echo "$certificate" |head -n1 |cut -f 1 -d :)
+    crt_lines=$(wc -l $ssl_dir/$domain.crt |cut -f1 -d ' ')
+    pem_begin=$((crt_lines - crt_end))
+    mv $ssl_dir/$domain.crt $ssl_dir/$domain.crt_full
+    head -n $crt_end $ssl_dir/$domain.crt_full > $ssl_dir/$domain.crt
+    tail -n $pem_begin $ssl_dir/$domain.crt_full > $ssl_dir/$domain.ca
+    is_web_domain_cert_valid
+    mv -f $ssl_dir/$domain.crt_full $ssl_dir/$domain.crt
+    rm -f $ssl_dir/$domain.ca
+else
+    is_web_domain_cert_valid
+fi
+
+# Moving old certificate
+mv $VESTA/ssl/certificate.crt $VESTA/ssl/certificate.crt.back
+mv $VESTA/ssl/certificate.key $VESTA/ssl/certificate.key.back
+
+# Adding new certificate
+cp -f $ssl_dir/certificate.crt $VESTA/ssl/certificate.crt
+cp -f $ssl_dir/certificate.key $VESTA/ssl/certificate.key
+
+
+#----------------------------------------------------------#
+#                       Vesta                              #
+#----------------------------------------------------------#
+
+# Restarting web server
+if [ "$restart" != 'no' ]; then
+    kill -HUP $(cat /var/run/vesta-nginx.pid)
+    $BIN/v-restart-mail
+    if [ ! -z "$IMAP_SYSTEM" ]; then
+        v-restart-service "$IMAP_SYSTEM"
+    fi
+fi
+
+# Logging
+log_event "$OK" "$ARGUMENTS"
+
+exit

+ 1 - 1
bin/v-list-sys-services

@@ -99,7 +99,7 @@ get_srv_state() {
 
         # Calculating memory usage
         mem=$(echo "$pids" |awk '{sum += $3} END {print sum/1024 }')
-        mem=$(printf "%.0f\n" $mem)
+        mem=$(echo "${mem%%.*}")
 
         # Searching pid file
         pid_file=''

+ 130 - 0
bin/v-list-sys-vesta-ssl

@@ -0,0 +1,130 @@
+#!/bin/bash
+# info: list vesta ssl certificate
+# options: [FORMAT]
+#
+# The function of obtaining vesta ssl files.
+
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+# Argument definition
+format=${1-shell}
+
+# Includes
+source $VESTA/func/main.sh
+
+# JSON list function
+json_list() {
+    echo '{'
+    echo -e "\t\"VESTA\": {"
+    echo "        \"CRT\": \"$crt\","
+    echo "        \"KEY\": \"$key\","
+    echo "        \"CA\": \"$ca\","
+    echo "        \"SUBJECT\": \"$subj\","
+    echo "        \"ALIASES\": \"$alt_dns\","
+    echo "        \"NOT_BEFORE\": \"$before\","
+    echo "        \"NOT_AFTER\": \"$after\","
+    echo "        \"SIGNATURE\": \"$signature\","
+    echo "        \"PUB_KEY\": \"$pub_key\","
+    echo "        \"ISSUER\": \"$issuer\""
+    echo -e "\t}\n}"
+}
+
+# SHELL list function
+shell_list() {
+    if [ ! -z "$crt" ]; then
+        echo -e "$crt"
+    fi
+    if [ ! -z "$key" ]; then
+        echo -e "\n$key"
+    fi
+    if [ ! -z "$crt" ]; then
+        echo
+        echo
+        echo "SUBJECT:        $subj"
+        if [ ! -z "$alt_dns" ]; then
+            echo "ALIASES:        ${alt_dns//,/ }"
+        fi
+        echo "VALID FROM:     $before"
+        echo "VALID TIL:      $after"
+        echo "SIGNATURE:      $signature"
+        echo "PUB_KEY:        $pub_key"
+        echo "ISSUER:         $issuer"
+    fi
+}
+
+# PLAIN list function
+plain_list() {
+    if [ ! -z "$crt" ]; then
+        echo -e "$crt"
+    fi
+    if [ ! -z "$key" ]; then
+        echo -e "\n$key"
+    fi
+    if [ ! -z "$ca" ]; then
+        echo -e "\n$ca"
+    fi
+    if [ ! -z "$crt" ]; then
+        echo "$subj"
+        echo "${alt_dns//,/ }"
+        echo "$before"
+        echo "$after"
+        echo "$signature"
+        echo "$pub_key"
+        echo "$issuer"
+    fi
+
+}
+
+# CSV list function
+csv_list() {
+    echo -n "CRT,KEY,CA,SUBJECT,ALIASES,NOT_BEFORE,NOT_AFTER,SIGNATURE,"
+    echo "PUB_KEY,ISSUER"
+    echo -n "\"$crt\",\"$key\",\"$ca\",\"$subj\",\"${alt_dns//,/ }\","
+    echo "\"$before\",\"$after\",\"$signature\",\"$pub_key\",\"$issuer\""
+}
+
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+# Parsing SSL certificate
+crt=$(cat $VESTA/ssl/certificate.crt |sed ':a;N;$!ba;s/\n/\\n/g')
+key=$(cat $VESTA/ssl/certificate.crt |sed ':a;N;$!ba;s/\n/\\n/g')
+
+# Parsing SSL certificate details without CA
+info=$(openssl x509 -text -in $VESTA/ssl/certificate.crt)
+subj=$(echo "$info" |grep Subject: |cut -f 2 -d =)
+before=$(echo "$info" |grep Before: |sed -e "s/.*Before: //")
+after=$(echo "$info" |grep "After :" |sed -e "s/.*After : //")
+signature=$(echo "$info" |grep "Algorithm:" |head -n1 )
+signature=$(echo "$signature"| sed -e "s/.*Algorithm: //")
+pub_key=$(echo "$info" |grep Public-Key: |cut -f2 -d \( | tr -d \))
+issuer=$(echo "$info" |grep Issuer: |sed -e "s/.*Issuer: //")
+alt_dns=$(echo "$info" |grep DNS |sed -e 's/DNS:/\n/g' |tr -d ',')
+alt_dns=$(echo "$alt_dns" |tr -d ' ' |sed -e "/^$/d")
+alt_dns=$(echo "$alt_dns" |sed -e ':a;N;$!ba;s/\n/,/g')
+
+# Listing data
+case $format in
+    json)   json_list ;;
+    plain)  plain_list ;;
+    csv)    csv_list ;;
+    shell)  shell_list ;;
+esac
+
+
+#----------------------------------------------------------#
+#                       Vesta                              #
+#----------------------------------------------------------#
+
+exit

+ 1 - 1
bin/v-rebuild-web-domains

@@ -1,5 +1,5 @@
 #!/bin/bash
-# info: rebuild dns domains
+# info: rebuild web domains
 # options: USER [RESTART]
 #
 # The function rebuilds web configuration files.

+ 122 - 8
bin/v-restore-user

@@ -36,13 +36,6 @@ source $VESTA/func/db.sh
 source $VESTA/func/rebuild.sh
 source $VESTA/conf/vesta.conf
 
-# Check backup function
-is_backup_valid() {
-    if [ ! -e "$1" ]; then
-        check_result $E_NOTEXIST "backup $1 doesn't exist"
-    fi
-}
-
 # Check backup ownership function
 is_backup_available() {
     if ! [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
@@ -50,6 +43,109 @@ is_backup_available() {
     fi
 }
 
+# Defining ftp command function
+ftpc() {
+    /usr/bin/ftp -n $HOST $PORT <<EOF
+    quote USER $USERNAME
+    quote PASS $PASSWORD
+    binary
+    $1
+    $2
+    $3
+    quit
+EOF
+}
+
+# FTP backup download function
+ftp_download() {
+    source $VESTA/conf/ftp.backup.conf
+    if [ -z "$PORT" ]; then
+        PORT='21'
+    fi
+    ftpc "cd $BPATH" "get $1"
+}
+
+# sftp command function
+sftpc() {
+    expect -f "-" <<EOF "$@"
+        set timeout 60
+        set count 0
+        spawn /usr/bin/sftp -o StrictHostKeyChecking=no \
+            -o Port=$PORT $USERNAME@$HOST
+        expect {
+            "password:" {
+                send "$PASSWORD\r"
+                exp_continue
+            }
+
+            -re "Couldn't|(.*)disconnect|(.*)stalled|(.*)not found" {
+                set count \$argc
+                set output "Disconnected."
+                set rc $E_FTP
+                exp_continue
+            }
+
+            -re ".*denied.*(publickey|password)." {
+                set output "Permission denied, wrong publickey or password."
+                set rc $E_CONNECT
+            }
+
+            -re "\[0-9]*%" {
+                exp_continue
+            }
+
+            "sftp>" {
+                if {\$count < \$argc} {
+                    set arg [lindex \$argv \$count]
+                    send "\$arg\r"
+                    incr count
+                } else {
+                    incr count
+                } else {
+                    send "exit\r"
+                    set output "Disconnected."
+                    if {[info exists rc] != 1} {
+                        set rc $OK
+                    }
+                }
+                exp_continue
+            }
+            timeout {
+                set output "Connection timeout."
+                set rc $E_CONNECT
+            }
+        }
+
+        if {[info exists output] == 1} {
+            puts "\$output"
+        }
+
+    exit \$rc
+EOF
+}
+
+# SFTP backup download function
+sftp_download() {
+    source $VESTA/conf/sftp.backup.conf
+    if [ -z "$PORT" ]; then
+        PORT='22'
+    fi
+    cd $BACKUP
+    sftpc "cd $BPATH" "get $1" > /dev/null 2>&1
+
+}
+
+# Google backup download function
+google_download() {
+    source $VESTA/conf/google.backup.conf
+    gsutil="$VESTA/3rdparty/gsutil/gsutil"
+    export BOTO_CONFIG="$VESTA/conf/.google.backup.boto"
+    ${gsutil} cp gs://$BUCKET/$BPATH/$1 $BACKUP/ > /dev/null 2>&1
+    if [ "$?" -ne 0 ]; then
+        check_result "$E_CONNECT" "gsutil failed to download $1"
+    fi
+}
+
 
 #----------------------------------------------------------#
 #                    Verifications                         #
@@ -58,7 +154,6 @@ is_backup_available() {
 args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
 check_args '2' "$#" "$args_usage"
 is_format_valid 'user' 'backup'
-is_backup_valid "$BACKUP/$backup"
 is_backup_available "$user" "$backup"
 
 
@@ -66,6 +161,25 @@ is_backup_available "$user" "$backup"
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Checking local backup
+if [ ! -e "$BACKUP/$backup" ]; then
+    if [[ "$BACKUP_SYSTEM" =~ "google" ]]; then
+        google_download $backup
+        downloaded='yes'
+    fi
+    if [[ "$BACKUP_SYSTEM" =~ "sftp" ]] && [ -z "$downloaded" ]; then
+        sftp_download $backup
+        downloaded='yes'
+    fi
+    if [[ "$BACKUP_SYSTEM" =~ "ftp" ]] && [ -z "$downloaded" ]; then
+        ftp_download $backup
+        downloaded='yes'
+    fi
+    if [ -z "$downloaded" ]; then
+        check_result $E_NOTEXIST "backup $backup doesn't exist"
+    fi
+fi
+
 # Checking user existance on the server
 check_user=$(is_object_valid 'user' 'USER' "$user")
 if [ -z "$check_user" ]; then

+ 2 - 1
bin/v-update-sys-ip

@@ -97,7 +97,8 @@ fi
 
 # Compare ips
 for ip in $ip_list; do
-    if [ ! -e "$VESTA/data/ips/$ip" ]; then
+    check_ifconfig=$(/sbin/ifconfig |grep "$ip")
+    if [ ! -e "$VESTA/data/ips/$ip" ] && [ ! -z "$check_ifconfig)" ]; then
         interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}')
         interface=$(echo $interface |cut -f 1 -d :)
         netmask=$(/sbin/ip addr |grep $ip |cut -f 2 -d / |cut -f 1 -d \ )

+ 8 - 3
func/domain.sh

@@ -271,7 +271,7 @@ del_web_config() {
     get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
     sed -i "$top_line,$bottom_line d" $conf
 
-    web_domain=$(grep $domain $USER_DATA/web.conf |wc -l)
+    web_domain=$(grep DOMAIN $USER_DATA/web.conf |wc -l)
     if [ "$web_domain" -eq '0' ]; then
         sed -i "/.*\/$user\/.*$1.conf/d" /etc/$1/conf.d/vesta.conf
         rm -f $conf
@@ -360,6 +360,11 @@ update_domain_zone() {
     if [ -z "$SERIAL" ]; then
         SERIAL=$(date +'%Y%m%d01')
     fi
+    if [[ "$domain" = *[![:ascii:]]* ]]; then
+        domain_idn=$(idn -t --quiet -a $domain)
+    else
+        domain_idn=$domain
+    fi
     zn_conf="$HOMEDIR/$user/conf/dns/$domain.db"
     echo "\$TTL $TTL
 @    IN    SOA    $SOA.    root.$domain_idn. (
@@ -506,12 +511,12 @@ is_mail_domain_new() {
 is_mail_new() {
     check_acc=$(grep "ACCOUNT='$1'" $USER_DATA/mail/$domain.conf)
     if [ ! -z "$check_acc" ]; then
-        check_result $E_EXIST "mail account $1 is already exists"
+        check_result $E_EXISTS "mail account $1 is already exists"
     fi
     check_als=$(awk -F "ALIAS='" '{print $2}' $USER_DATA/mail/$domain.conf )
     check_als=$(echo "$check_als" | cut -f 1 -d "'" | grep -w $1)
     if [ ! -z "$check_als" ]; then
-        check_result $E_EXIST "mail alias $1 is already exists"
+        check_result $E_EXISTS "mail alias $1 is already exists"
     fi
 }
 

+ 10 - 4
func/rebuild.sh

@@ -252,10 +252,16 @@ rebuild_web_domain_conf() {
 
         if [ ! -z "$STATS_USER" ]; then
             stats_dir="$HOMEDIR/$user/web/$domain/stats"
-            echo "AuthUserFile $stats_dir/.htpasswd" > $stats_dir/.htaccess
-            echo "AuthName \"Web Statistics\"" >> $stats_dir/.htaccess
-            echo "AuthType Basic" >> $stats_dir/.htaccess
-            echo "Require valid-user" >> $stats_dir/.htaccess
+            if [ "$WEB_SYSTEM" = 'nginx' ]; then
+                echo "auth_basic \"Web Statistics\";" > $stats_dir/auth.conf
+                echo "auth_basic_user_file $stats_dir/.htpasswd;" >> \
+                    $stats_dir/auth.conf
+            else
+                echo "AuthUserFile $stats_dir/.htpasswd" > $stats_dir/.htaccess
+                echo "AuthName \"Web Statistics\"" >> $stats_dir/.htaccess
+                echo "AuthType Basic" >> $stats_dir/.htaccess
+                echo "Require valid-user" >> $stats_dir/.htaccess
+            fi
             echo "$STATS_USER:$STATS_CRYPT" > $stats_dir/.htpasswd
         fi
     fi

+ 1 - 1
install/debian/7/packages/default.pkg

@@ -9,7 +9,7 @@ MAIL_DOMAINS='100'
 MAIL_ACCOUNTS='100'
 DATABASES='100'
 CRON_JOBS='100'
-DISK_QUOTA='10000'
+DISK_QUOTA='unlimited'
 BANDWIDTH='100000'
 NS='ns1.localhost.ltd,ns2.localhost.ltd'
 SHELL='nologin'

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.stpl

@@ -43,6 +43,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.tpl

@@ -39,6 +39,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.stpl

@@ -48,6 +48,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.tpl

@@ -44,6 +44,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.stpl

@@ -43,6 +43,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.tpl

@@ -39,6 +39,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.stpl

@@ -114,6 +114,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.tpl

@@ -110,6 +110,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/default.stpl

@@ -42,6 +42,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/default.tpl

@@ -38,6 +38,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl

@@ -59,6 +59,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl

@@ -54,6 +54,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl

@@ -88,6 +88,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl

@@ -85,6 +85,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl

@@ -88,6 +88,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl

@@ -85,6 +85,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl

@@ -89,6 +89,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl

@@ -86,6 +86,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/joomla.stpl

@@ -50,6 +50,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/joomla.tpl

@@ -46,6 +46,11 @@ server {
         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*;

+ 12 - 7
install/debian/7/templates/web/nginx/php5-fpm/modx.stpl

@@ -35,13 +35,13 @@ server {
         rewrite ^/(.*)$ /index.php?q=$1;
     }
 
-	location ~ \.php$ {
-        	try_files $uri =404;
-            fastcgi_pass %backend_lsnr%;
-            fastcgi_index index.php;
-		    fastcgi_param SCRIPT_FILENAME $request_filename;
-            include /etc/nginx/fastcgi_params;
-        }
+    location ~ \.php$ {
+        try_files $uri =404;
+        fastcgi_pass %backend_lsnr%;
+        fastcgi_index index.php;
+        fastcgi_param SCRIPT_FILENAME $request_filename;
+        include /etc/nginx/fastcgi_params;
+    }
 
     error_page  403 /error/404.html;
     error_page  404 /error/404.html;
@@ -56,6 +56,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/modx.tpl

@@ -52,6 +52,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/moodle.stpl

@@ -77,6 +77,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/moodle.tpl

@@ -74,6 +74,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/no-php.stpl

@@ -34,6 +34,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/no-php.tpl

@@ -30,6 +30,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl

@@ -72,6 +72,11 @@ server {
         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*;

+ 10 - 0
install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl

@@ -68,6 +68,16 @@ server {
         return  404;
     }
 
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/piwik.stpl

@@ -60,6 +60,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/piwik.tpl

@@ -56,6 +56,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl

@@ -53,6 +53,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl

@@ -49,6 +49,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/wordpress.stpl

@@ -42,6 +42,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/wordpress.tpl

@@ -38,6 +38,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/wordpress2.stpl

@@ -54,6 +54,11 @@ server {
         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*;

+ 5 - 0
install/debian/7/templates/web/nginx/php5-fpm/wordpress2.tpl

@@ -50,6 +50,11 @@ server {
         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*;

+ 0 - 10
install/debian/7/templates/web/nginx/php5-fpm/www.conf

@@ -1,10 +0,0 @@
-[www]
-listen = 127.0.0.1:9000
-listen.allowed_clients = 127.0.0.1
-user = www-data
-group = www-data
-pm = dynamic
-pm.max_children = 50
-pm.start_servers = 5
-pm.min_spare_servers = 3
-pm.max_spare_servers = 35

+ 1 - 1
install/debian/8/packages/default.pkg

@@ -9,7 +9,7 @@ MAIL_DOMAINS='100'
 MAIL_ACCOUNTS='100'
 DATABASES='100'
 CRON_JOBS='100'
-DISK_QUOTA='10000'
+DISK_QUOTA='unlimited'
 BANDWIDTH='100000'
 NS='ns1.localhost.ltd,ns2.localhost.ltd'
 SHELL='nologin'

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.stpl

@@ -43,6 +43,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.tpl

@@ -39,6 +39,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.stpl

@@ -48,6 +48,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.tpl

@@ -44,6 +44,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.stpl

@@ -43,6 +43,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.tpl

@@ -39,6 +39,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.stpl

@@ -114,6 +114,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.tpl

@@ -110,6 +110,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/default.stpl

@@ -42,6 +42,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/default.tpl

@@ -38,6 +38,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl

@@ -59,6 +59,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl

@@ -54,6 +54,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl

@@ -88,6 +88,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl

@@ -85,6 +85,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl

@@ -88,6 +88,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl

@@ -85,6 +85,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl

@@ -89,6 +89,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl

@@ -86,6 +86,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/joomla.stpl

@@ -50,6 +50,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/joomla.tpl

@@ -46,6 +46,11 @@ server {
         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*;

+ 12 - 7
install/debian/8/templates/web/nginx/php5-fpm/modx.stpl

@@ -35,13 +35,13 @@ server {
         rewrite ^/(.*)$ /index.php?q=$1;
     }
 
-	location ~ \.php$ {
-        	try_files $uri =404;
-            fastcgi_pass %backend_lsnr%;
-            fastcgi_index index.php;
-		    fastcgi_param SCRIPT_FILENAME $request_filename;
-            include /etc/nginx/fastcgi_params;
-        }
+    location ~ \.php$ {
+        try_files $uri =404;
+        fastcgi_pass %backend_lsnr%;
+        fastcgi_index index.php;
+        fastcgi_param SCRIPT_FILENAME $request_filename;
+        include /etc/nginx/fastcgi_params;
+    }
 
     error_page  403 /error/404.html;
     error_page  404 /error/404.html;
@@ -56,6 +56,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/modx.tpl

@@ -52,6 +52,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl

@@ -77,6 +77,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/moodle.tpl

@@ -74,6 +74,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/no-php.stpl

@@ -34,6 +34,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/no-php.tpl

@@ -30,6 +30,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl

@@ -72,6 +72,11 @@ server {
         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*;

+ 10 - 0
install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl

@@ -68,6 +68,16 @@ server {
         return  404;
     }
 
+    location /vstats/ {
+        alias   %home%/%user%/web/%domain%/stats/;
+        include %home%/%user%/web/%domain%/stats/auth.conf*;
+    }
+
+    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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/piwik.stpl

@@ -60,6 +60,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/piwik.tpl

@@ -56,6 +56,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl

@@ -53,6 +53,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl

@@ -49,6 +49,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/wordpress.stpl

@@ -42,6 +42,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/wordpress.tpl

@@ -38,6 +38,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/wordpress2.stpl

@@ -54,6 +54,11 @@ server {
         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*;

+ 5 - 0
install/debian/8/templates/web/nginx/php5-fpm/wordpress2.tpl

@@ -50,6 +50,11 @@ server {
         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*;

+ 1 - 1
install/rhel/5/packages/default.pkg

@@ -10,7 +10,7 @@ MAIL_DOMAINS='100'
 MAIL_ACCOUNTS='100'
 DATABASES='100'
 CRON_JOBS='100'
-DISK_QUOTA='10000'
+DISK_QUOTA='unlimited'
 BANDWIDTH='100000'
 NS='ns1.localhost.ltd,ns2.localhost.ltd'
 SHELL='nologin'

+ 6 - 0
install/rhel/5/pma/phpMyAdmin.conf

@@ -37,3 +37,9 @@ Alias /phpmyadmin /usr/share/phpMyAdmin
 #        SecRuleInheritance Off
 #    </Directory>
 #</IfModule>
+
+<Directory /usr/share/phpMyAdmin/setup>
+    Order Deny,Allow
+    Deny from All
+    Allow from None
+</Directory>

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

@@ -43,6 +43,11 @@ server {
         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*;

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

@@ -39,6 +39,11 @@ server {
         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*;

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

@@ -48,6 +48,11 @@ server {
         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*;

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

@@ -44,6 +44,11 @@ server {
         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*;

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

@@ -43,6 +43,11 @@ server {
         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*;

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

@@ -39,6 +39,11 @@ server {
         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*;

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

@@ -114,6 +114,11 @@ server {
         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*;

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

@@ -110,6 +110,11 @@ server {
         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*;

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

@@ -42,6 +42,11 @@ server {
         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*;

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

@@ -38,6 +38,11 @@ server {
         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*;

Некоторые файлы не были показаны из-за большого количества измененных файлов