Procházet zdrojové kódy

Merge pull request #2 from serghey-rodin/master

update fork
Arinerron před 8 roky
rodič
revize
2a27966a84
100 změnil soubory, kde provedl 955 přidání a 39 odebrání
  1. 2 0
      bin/v-add-dns-record
  2. 2 0
      bin/v-add-mail-account-alias
  3. 2 0
      bin/v-add-mail-account-autoreply
  4. 1 0
      bin/v-add-mail-account-forward
  5. 2 0
      bin/v-add-mail-account-fwd-only
  6. 1 0
      bin/v-add-mail-domain
  7. 2 0
      bin/v-add-mail-domain-antispam
  8. 2 0
      bin/v-add-mail-domain-antivirus
  9. 1 0
      bin/v-add-mail-domain-catchall
  10. 2 0
      bin/v-add-mail-domain-dkim
  11. 2 0
      bin/v-add-web-domain-alias
  12. 2 0
      bin/v-add-web-domain-ftp
  13. 11 1
      bin/v-add-web-domain-httpauth
  14. 1 0
      bin/v-add-web-domain-stats
  15. 2 0
      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. 2 1
      bin/v-change-sys-service-config
  27. 1 0
      bin/v-change-web-domain-backend-tpl
  28. 2 0
      bin/v-change-web-domain-ftp-password
  29. 2 0
      bin/v-change-web-domain-ftp-path
  30. 2 0
      bin/v-change-web-domain-ip
  31. 2 0
      bin/v-change-web-domain-name
  32. 2 0
      bin/v-change-web-domain-proxy-tpl
  33. 2 0
      bin/v-change-web-domain-sslcert
  34. 2 0
      bin/v-change-web-domain-sslhome
  35. 1 0
      bin/v-change-web-domain-stats
  36. 2 0
      bin/v-change-web-domain-tpl
  37. 2 0
      bin/v-delete-dns-on-web-alias
  38. 2 0
      bin/v-delete-dns-record
  39. 1 0
      bin/v-delete-mail-account
  40. 1 0
      bin/v-delete-mail-account-alias
  41. 2 0
      bin/v-delete-mail-account-autoreply
  42. 1 0
      bin/v-delete-mail-account-forward
  43. 2 0
      bin/v-delete-mail-account-fwd-only
  44. 1 0
      bin/v-delete-mail-domain
  45. 2 0
      bin/v-delete-mail-domain-antispam
  46. 2 0
      bin/v-delete-mail-domain-antivirus
  47. 1 0
      bin/v-delete-mail-domain-catchall
  48. 2 0
      bin/v-delete-web-domain
  49. 2 0
      bin/v-delete-web-domain-backend
  50. 2 0
      bin/v-delete-web-domain-ftp
  51. 3 2
      bin/v-delete-web-domain-httpauth
  52. 2 0
      bin/v-delete-web-domain-proxy
  53. 2 0
      bin/v-delete-web-domain-ssl
  54. 1 0
      bin/v-delete-web-domain-stats
  55. 2 0
      bin/v-get-dns-domain-value
  56. 2 0
      bin/v-get-mail-account-value
  57. 2 0
      bin/v-get-mail-domain-value
  58. 3 0
      bin/v-restore-user
  59. 2 0
      bin/v-suspend-dns-domain
  60. 2 0
      bin/v-suspend-dns-record
  61. 2 0
      bin/v-suspend-mail-account
  62. 3 0
      bin/v-suspend-mail-accounts
  63. 2 0
      bin/v-suspend-mail-domain
  64. 2 0
      bin/v-suspend-web-domain
  65. 2 0
      bin/v-unsuspend-dns-domain
  66. 2 0
      bin/v-unsuspend-dns-record
  67. 2 0
      bin/v-unsuspend-mail-account
  68. 2 0
      bin/v-unsuspend-mail-accounts
  69. 2 0
      bin/v-unsuspend-mail-domain
  70. 2 0
      bin/v-unsuspend-web-domain
  71. 2 0
      bin/v-update-mail-domain-disk
  72. 2 0
      bin/v-update-web-domain-disk
  73. 2 0
      bin/v-update-web-domain-ssl
  74. 1 0
      bin/v-update-web-domain-stat
  75. 2 0
      bin/v-update-web-domain-traff
  76. 5 0
      func/domain.sh
  77. 3 0
      func/main.sh
  78. 2 0
      func/rebuild.sh
  79. 56 0
      install/debian/7/templates/web/nginx/php5-fpm/laravel.stpl
  80. 50 0
      install/debian/7/templates/web/nginx/php5-fpm/laravel.tpl
  81. 0 5
      install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl
  82. 56 0
      install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl
  83. 50 0
      install/debian/8/templates/web/nginx/php5-fpm/laravel.tpl
  84. 0 5
      install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl
  85. 56 0
      install/rhel/5/templates/web/nginx/php-fpm/laravel.stpl
  86. 50 0
      install/rhel/5/templates/web/nginx/php-fpm/laravel.tpl
  87. 0 5
      install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl
  88. 56 0
      install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl
  89. 50 0
      install/rhel/6/templates/web/nginx/php-fpm/laravel.tpl
  90. 0 5
      install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl
  91. 56 0
      install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl
  92. 50 0
      install/rhel/7/templates/web/nginx/php-fpm/laravel.tpl
  93. 0 5
      install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl
  94. 56 0
      install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.stpl
  95. 50 0
      install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.tpl
  96. 0 5
      install/ubuntu/12.04/templates/web/nginx/php-fpm/owncloud.tpl
  97. 56 0
      install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.stpl
  98. 50 0
      install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.tpl
  99. 0 5
      install/ubuntu/12.10/templates/web/nginx/php-fpm/owncloud.tpl
  100. 56 0
      install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.stpl

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

@@ -15,6 +15,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 record=$(idn -t --quiet -u "$3" )
 record=$(idn -t --quiet -u "$3" )
 record=$(echo "$record" | tr '[:upper:]' '[:lower:]')
 record=$(echo "$record" | tr '[:upper:]' '[:lower:]')
 rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]')
 rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]')
@@ -53,6 +54,7 @@ fi
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 malias=$4
 malias=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 autoreply=$4
 autoreply=$4
 
 
@@ -30,6 +31,7 @@ fi
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 forward=$4
 forward=$4
 
 

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 
 
 # Includes
 # Includes
@@ -29,6 +30,7 @@ fi
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 antispam=${3-yes}
 antispam=${3-yes}
 antivirus=${4-yes}
 antivirus=${4-yes}
 dkim=${5-yes}
 dkim=${5-yes}

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 email="$3"
 email="$3"
 
 
 # Includes
 # Includes

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 dkim_size=${3-1024}
 dkim_size=${3-1024}
 
 
 # Includes
 # Includes
@@ -29,6 +30,7 @@ fi
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 aliases=$3
 aliases=$3
 restart="$4"
 restart="$4"
 
 
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 format_aliases
 format_aliases
 
 
 
 

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

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

+ 11 - 1
bin/v-add-web-domain-httpauth

@@ -24,6 +24,8 @@ source $VESTA/conf/vesta.conf
 # Defining htpasswd file
 # Defining htpasswd file
 htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
 htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
 htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
 htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
+shtaccess="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess"
+shtpasswd="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd"
 docroot="$HOMEDIR/$user/web/$domain/public_html"
 docroot="$HOMEDIR/$user/web/$domain/public_html"
 
 
 
 
@@ -71,15 +73,23 @@ fi
 auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password)
 auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password)
 touch $htpasswd
 touch $htpasswd
 chmod 640 $htpasswd $htaccess
 chmod 640 $htpasswd $htaccess
+chgrp $user $htpasswd $htaccess
 sed -i "/^$auth_user:/d" $htpasswd
 sed -i "/^$auth_user:/d" $htpasswd
 echo "$auth_user:$auth_hash" >> $htpasswd
 echo "$auth_user:$auth_hash" >> $htpasswd
 
 
+# Symbolic link for secure web templates
+if [ ! -L $shtpasswd ]; then
+    ln -s $htpasswd $shtpasswd 
+fi
+if [ ! -L $shtaccess ]; then
+    ln -s $htaccess $shtaccess
+fi
+
 # Restarting web server
 # Restarting web server
 if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
 if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
     $BIN/v-restart-web
     $BIN/v-restart-web
 fi
 fi
 
 
-
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Vesta                              #
 #                       Vesta                              #
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

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

+ 2 - 0
bin/v-backup-user

@@ -137,6 +137,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
         mkdir -p $tmpdir/web/$domain/vesta
         mkdir -p $tmpdir/web/$domain/vesta
 
 
         # Get domain variables
         # Get domain variables
+        domain_idn=$domain
         format_domain_idn
         format_domain_idn
         get_domain_values 'web'
         get_domain_values 'web'
 
 
@@ -286,6 +287,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then
         echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log
         echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log
         mkdir -p $tmpdir/mail/$domain/conf
         mkdir -p $tmpdir/mail/$domain/conf
         mkdir -p $tmpdir/mail/$domain/vesta
         mkdir -p $tmpdir/mail/$domain/vesta
+        domain_idn=$domain
         format_domain_idn
         format_domain_idn
 
 
         # Backup exim config
         # Backup exim config

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

@@ -13,6 +13,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 exp=$3
 exp=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ip=$3
 ip=$3
 restart=$4
 restart=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
 soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
 restart=$4
 restart=$4
 
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 template=$3
 template=$3
 restart=$4
 restart=$4
 
 

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ttl=$3
 ttl=$3
 restart=$4
 restart=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 id=$3
 id=$3
 dvalue=$(idn -t --quiet -u "$4" )
 dvalue=$(idn -t --quiet -u "$4" )
 priority=$5
 priority=$5
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 id=$3
 id=$3
 newid=$4
 newid=$4
 restart=$5
 restart=$5
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 password=$4; HIDE=4
 password=$4; HIDE=4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 quota=$4
 quota=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 email=$3
 email=$3
 
 
 # Includes
 # Includes

+ 2 - 1
bin/v-change-sys-service-config

@@ -104,7 +104,8 @@ if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
     service $service restart >/dev/null 2>&1
     service $service restart >/dev/null 2>&1
     if [ $? -ne 0 ]; then
     if [ $? -ne 0 ]; then
         for config in $dst; do
         for config in $dst; do
-            mv -f $config.vst.back $config
+            cat $config.vst.back > $config
+            rm -f $config.vst.back
         done
         done
         check_result $E_RESTART "$service failed to start with new config"
         check_result $E_RESTART "$service failed to start with new config"
     fi
     fi

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

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

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ftp_user=$3
 ftp_user=$3
 password=$4; HIDE=4
 password=$4; HIDE=4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ftp_user=$3
 ftp_user=$3
 ftp_path=$4
 ftp_path=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ip=$3
 ip=$3
 restart=$4
 restart=$4
 
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument defenition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 new_domain=$3
 new_domain=$3
 restart=$4
 restart=$4
 
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 template=$3
 template=$3
 default_extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,\
 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"
 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
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ssl_dir=$3
 ssl_dir=$3
 restart=$4
 restart=$4
 
 
@@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ssl_home=$3
 ssl_home=$3
 restart=$4
 restart=$4
 
 
@@ -19,6 +20,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 type=$3
 type=$3
 
 
 # Includes
 # Includes

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

@@ -13,6 +13,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 template=$3
 template=$3
 restart=$4
 restart=$4
 
 
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 dom_alias=$(idn -t --quiet -u "$3" )
 dom_alias=$(idn -t --quiet -u "$3" )
 dom_alias=$(echo $dom_alias |sed -e 's/\.*$//g' -e 's/^\.*//g')
 dom_alias=$(echo $dom_alias |sed -e 's/\.*$//g' -e 's/^\.*//g')
 dom_alias=$(echo $dom_alias |tr '[:upper:]' '[:lower:]')
 dom_alias=$(echo $dom_alias |tr '[:upper:]' '[:lower:]')
@@ -26,6 +27,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 id=$3
 id=$3
 restart=$4
 restart=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 
 
 # Includes
 # Includes

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

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

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 malias=$4
 malias=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 forward=$4
 forward=$4
 
 

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh

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

@@ -15,6 +15,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 restart=$3
 restart=$3
 
 
 # Includes
 # Includes
@@ -26,6 +27,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ftp_user=$3
 ftp_user=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 format_domain_idn
+# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 3 - 2
bin/v-delete-web-domain-httpauth

@@ -23,7 +23,8 @@ source $VESTA/conf/vesta.conf
 # Defining htpasswd file
 # Defining htpasswd file
 htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
 htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
 htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
 htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
-
+shtaccess="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess"
+shtpasswd="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd"
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                    Verifications                         #
 #                    Verifications                         #
@@ -54,7 +55,7 @@ sed -i "/^$auth_user:/d" $htpasswd
 
 
 # Deleting password protection
 # Deleting password protection
 if [ "$(echo "$AUTH_USER" |tr : '\n' |wc -l)" -le 1 ]; then
 if [ "$(echo "$AUTH_USER" |tr : '\n' |wc -l)" -le 1 ]; then
-    rm -f $htaccess $htpasswd
+    rm -f $htaccess $htpasswd $shtaccess $shtpasswd
     restart_required='yes'
     restart_required='yes'
 fi
 fi
 
 

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 restart=$3
 restart=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 restart=$3
 restart=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh

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

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

+ 3 - 0
bin/v-restore-user

@@ -567,6 +567,9 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
 
 
         # Rebuilding mail config
         # Rebuilding mail config
         rebuild_mail_domain_conf
         rebuild_mail_domain_conf
+        
+        domain_idn=$domain
+        format_domain_idn
 
 
         # Restoring emails
         # Restoring emails
         if [ -e "$tmpdir/mail/$domain/accounts.tar.gz" ]; then
         if [ -e "$tmpdir/mail/$domain/accounts.tar.gz" ]; then

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 restart="$3"
 restart="$3"
 
 
 # Includes
 # Includes
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 id=$3
 id=$3
 restart=$4
 restart=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -19,6 +20,8 @@ source $VESTA/conf/vesta.conf
 
 
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 restart=$3
 restart=$3
 
 
 # Includes
 # Includes
@@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 id=$3
 id=$3
 restart=$4
 restart=$4
 
 
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 account=$3
 account=$3
 
 
 # Includes
 # Includes
@@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 restart=$3
 restart=$3
 
 
 # Includes
 # Includes
@@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 ssl_dir=$3
 ssl_dir=$3
 restart=$4
 restart=$4
 
 
@@ -27,6 +28,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh

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

@@ -12,6 +12,7 @@
 # Argument definition
 # Argument definition
 user=$1
 user=$1
 domain=$2
 domain=$2
+domain_idn=$2
 
 
 # Includes
 # Includes
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
@@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf
 # Additional argument formatting
 # Additional argument formatting
 format_domain
 format_domain
 format_domain_idn
 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"
         conf="$HOMEDIR/$user/conf/web/s$1.conf"
     fi
     fi
 
 
+    domain_idn=$domain
+    format_domain_idn
+
     cat $WEBTPL/$1/$WEB_BACKEND/$2 | \
     cat $WEBTPL/$1/$WEB_BACKEND/$2 | \
         sed -e "s|%ip%|$local_ip|g" \
         sed -e "s|%ip%|$local_ip|g" \
             -e "s|%domain%|$domain|g" \
             -e "s|%domain%|$domain|g" \
@@ -228,6 +231,8 @@ get_web_config_lines() {
         check_result $E_PARSING "can't parse template $1"
         check_result $E_PARSING "can't parse template $1"
     fi
     fi
 
 
+    domain_idn=$domain
+    format_domain_idn
     vhost_lines=$(grep -niF "name $domain_idn" $2)
     vhost_lines=$(grep -niF "name $domain_idn" $2)
     vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #"
     vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #"
     vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :)
     vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :)

+ 3 - 0
func/main.sh

@@ -864,6 +864,9 @@ format_domain() {
 }
 }
 
 
 format_domain_idn() {
 format_domain_idn() {
+    if [ -z "$domain_idn" ]; then
+        domain_idn=$domain
+    fi
     if [[ "$domain_idn" = *[![:ascii:]]* ]]; then
     if [[ "$domain_idn" = *[![:ascii:]]* ]]; then
         domain_idn=$(idn -t --quiet -a $domain_idn)
         domain_idn=$(idn -t --quiet -a $domain_idn)
     fi
     fi

+ 2 - 0
func/rebuild.sh

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

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

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

@@ -73,11 +73,6 @@ server {
         include %home%/%user%/web/%domain%/stats/auth.conf*;
         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/phpmyadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/phppgadmin.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;
     include     /etc/nginx/conf.d/webmail.inc*;

+ 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*;
+}

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů