diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..d6ed513fa
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar
+*.zip
+*.gzip
+*.gz
diff --git a/LICENSE.txt b/LICENSE
similarity index 100%
rename from LICENSE.txt
rename to LICENSE
diff --git a/README.md b/README.md
index d0fdbe4c9..456e89ae9 100644
--- a/README.md
+++ b/README.md
@@ -13,17 +13,23 @@ Connect to your server as root via SSH
ssh root@your.server
```
-Download the installation script
+Download the installation script, and run it:
+```bash
+curl http://vestacp.com/pub/vst-install.sh | bash
+```
+
+If the above example does not work, try this 2 step method:
+
+Download the installation script:
```bash
curl -O http://vestacp.com/pub/vst-install.sh
```
-
-Run it
+Then run it:
```bash
bash vst-install.sh
```
License
----------------------------
-Vesta is licensed under [GPL v3 ](https://github.com/serghey-rodin/vesta/blob/master/LICENSE.txt) license
+Vesta is licensed under [GPL v3 ](https://github.com/serghey-rodin/vesta/blob/master/LICENSE) license
diff --git a/bin/v-acknowledge-user-notification b/bin/v-acknowledge-user-notification
new file mode 100755
index 000000000..84823d277
--- /dev/null
+++ b/bin/v-acknowledge-user-notification
@@ -0,0 +1,66 @@
+#!/bin/bash
+# info: update user notification
+# options: USER NOTIFICATION
+#
+# The function updates user notification.
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+nid=$2
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER NOTIFICATION'
+validate_format 'user' 'nid'
+is_object_valid 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Updating notification
+update_object_value 'notifications' 'NID' "$nid" '$ACK' 'yes' 2>/dev/null
+
+# Checking last notification
+if [ -e "$USER_DATA/notifications.conf" ]; then
+ if [ -z "$(grep NID= $USER_DATA/notifications.conf)" ]; then
+ notice='no'
+ fi
+ if [ -z "$(grep "ACK='no'" $USER_DATA/notifications.conf)" ]; then
+ notice='no'
+ fi
+else
+ notice='no'
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating notification counter
+if [ "$notice" = 'no' ]; then
+ if [ -z "$(grep NOTIFICATIONS $USER_DATA/user.conf)" ]; then
+ sed -i "s/^TIME/NOTIFICATIONS='no'\nTIME/g" $USER_DATA/user.conf
+ else
+ update_user_value "$user" '$NOTIFICATIONS' "no"
+ fi
+fi
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-activate-vesta-license b/bin/v-activate-vesta-license
new file mode 100755
index 000000000..f6cc05e02
--- /dev/null
+++ b/bin/v-activate-vesta-license
@@ -0,0 +1,67 @@
+#!/bin/bash
+# info: activate vesta license
+# options: MODULE LICENSE
+#
+# The function activates and registers the vesta license
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+module=$(echo $1 | tr '[:lower:]' '[:upper:]')
+license=$2
+
+# Importing system environment
+source /etc/profile
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+# Checking arg number
+check_args '2' "$#" 'MODULE LICENSE'
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Activating license
+v_host='https://vestacp.com/checkout'
+answer=$(curl -s $v_host/activate.php?licence_key=$license&module=$module)
+check_result $? "cant' connect to vestacp.com " $E_CONNECT
+
+# Checking server answer
+if [[ "$answer" != '0' ]]; then
+ echo "Error: $module license $license is invalid"
+ exit $E_INVALID
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating vesta.conf
+if [ -z "$(grep "${module}_KEY" $VESTA/conf/vesta.conf)" ]; then
+ echo "${module}_KEY='$license'" >> $VESTA/conf/vesta.conf
+else
+ sed -i "s/${module}_KEY=.*/${module}_KEY='$license'/g" $VESTA/conf/vesta.conf
+fi
+
+# Activating sftpjail
+if [ "$module" = 'SFTPJAIL' ]; then
+ setsid $BIN/v-add-sys-sftp-jail 2>/dev/null
+fi
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-add-backup-host b/bin/v-add-backup-host
index e46c1d216..5595c0439 100755
--- a/bin/v-add-backup-host
+++ b/bin/v-add-backup-host
@@ -2,18 +2,18 @@
# info: add backup host
# options: TYPE HOST USERNAME PASSWORD [PATH] [PORT]
#
-# The function adds backup host
+# This function adds a backup host
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
user=$3
-password=$4
+password=$4; HIDE=4
path=${5-/backup}
port=$6
@@ -21,10 +21,6 @@ port=$6
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
# Defining ftp command function
ftpc() {
ftp -p -n $host $port </dev/null 2>&1
- if [ $? -ne 0 ];then
- echo "Error: expect utility not found"
- log_event "$E_NOTEXIST" "$EVENT"
- exit $E_NOTEXIST
- fi
+ check_result $? "expect command not found" $E_NOTEXIST
fi
fi
diff --git a/bin/v-add-cron-job b/bin/v-add-cron-job
index 75a396a09..b6c41480a 100755
--- a/bin/v-add-cron-job
+++ b/bin/v-add-cron-job
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
min=$2
hour=$3
@@ -25,7 +25,7 @@ restart=$9
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
-# Assing new value
+# Assigning new value
A7="$command"
@@ -72,11 +72,9 @@ sync_cron_jobs
# Increasing cron value
increase_user_value $user '$U_CRON_JOBS'
-# Restart crond
+# Restarting crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Cron restart failed" >/dev/null
# Logging
log_history "added cron job $job"
diff --git a/bin/v-add-cron-reports b/bin/v-add-cron-reports
index d38eaf4f8..e0d6b21a9 100755
--- a/bin/v-add-cron-reports
+++ b/bin/v-add-cron-reports
@@ -1,6 +1,6 @@
#!/bin/bash
# info: add cron reports
-# opions: user
+# options: user
#
# The script for enabling reports on cron tasks and administrative
# notifications.
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
@@ -46,9 +46,7 @@ sync_cron_jobs
# Restart crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Cron restart failed" >/dev/null
# Logging
log_history "enabled cron reporting"
diff --git a/bin/v-add-cron-restart-job b/bin/v-add-cron-restart-job
index b751c9adb..474ef1196 100755
--- a/bin/v-add-cron-restart-job
+++ b/bin/v-add-cron-restart-job
@@ -1,6 +1,6 @@
#!/bin/bash
# info: add cron reports
-# opions: NONE
+# options: NONE
#
# The script for enabling restart cron tasks
diff --git a/bin/v-add-cron-vesta-autoupdate b/bin/v-add-cron-vesta-autoupdate
index 84c041c40..2d0268371 100755
--- a/bin/v-add-cron-vesta-autoupdate
+++ b/bin/v-add-cron-vesta-autoupdate
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=admin
# Includes
@@ -34,7 +34,7 @@ fi
# Action #
#----------------------------------------------------------#
-# Define time somewhere at nigth
+# Define time somewhere at night
min=$(gen_password '012345' '2')
hour=$(gen_password '1234567' '1')
day='*'
@@ -66,11 +66,9 @@ sync_cron_jobs
# Increasing cron value
increase_user_value $user '$U_CRON_JOBS'
-# Restart crond
+# Restarting crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Cron restart failed" >/dev/null
# Logging
log_history "added cron job $job"
diff --git a/bin/v-add-database b/bin/v-add-database
index d4d791784..68e676479 100755
--- a/bin/v-add-database
+++ b/bin/v-add-database
@@ -15,11 +15,11 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database="$user"_"$2"
dbuser="$user"_"$3"
-password=$4
+password=$4; HIDE=4
type=${5-mysql}
host=$6
charset=${7-UTF8}
@@ -30,10 +30,6 @@ source $VESTA/func/main.sh
source $VESTA/func/db.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-add-database-host b/bin/v-add-database-host
index ead97aec3..550d0a707 100755
--- a/bin/v-add-database-host
+++ b/bin/v-add-database-host
@@ -13,11 +13,11 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
dbuser=$3
-password=$4
+password=$4; HIDE=4
max_db=${6-500}
charsets=${7-UTF8,LATIN1,WIN1250,WIN1251,WIN1252,WIN1256,WIN1258,KOI8}
template=${8-template1}
@@ -27,10 +27,6 @@ source $VESTA/func/main.sh
source $VESTA/func/db.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
is_mysql_host_alive() {
mycnf=$(mktemp)
echo "[client]">$mycnf
@@ -80,7 +76,7 @@ esac
# Action #
#----------------------------------------------------------#
-# Concatentating db host string
+# Concatenating db host string
case $type in
mysql) str="HOST='$host' USER='$dbuser' PASSWORD='$dbpass'";
str="$str CHARSETS='$charsets' MAX_DB='$max_db' U_SYS_USERS=''";
diff --git a/bin/v-add-dns-domain b/bin/v-add-dns-domain
index 41038d616..852050ceb 100755
--- a/bin/v-add-dns-domain
+++ b/bin/v-add-dns-domain
@@ -1,6 +1,6 @@
#!/bin/bash
# info: add dns domain
-# options: USER DOMAIN IP [NS1] [NS2] [NS3] [NS4] [RESTART]
+# options: USER DOMAIN IP [NS1] [NS2] [NS3] [..] [NS8] [RESTART]
#
# The function adds DNS zone with records defined in the template. If the exp
# argument isn't stated, the expiration date value will be set to next year.
@@ -13,7 +13,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
@@ -24,7 +24,11 @@ ns1=$4
ns2=$5
ns3=$6
ns4=$7
-restart=$8
+ns5=$8
+ns6=$9
+ns7=${10}
+ns8=${11}
+restart=${12}
# Includes
source $VESTA/func/main.sh
@@ -36,14 +40,13 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '3' "$#" 'USER DOMAIN IP [NS1] [NS2] [NS3] [NS4]'
+check_args '3' "$#" 'USER DOMAIN IP [NS1] [NS2] [NS3] [..] [NS8] [RESTART]'
validate_format 'user' 'domain' 'ip'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user"
is_object_unsuspended 'user' 'USER' "$user"
is_domain_new 'dns'
is_package_full 'DNS_DOMAINS'
-
template=$(get_user_value '$DNS_TEMPLATE')
is_dns_template_valid
@@ -64,6 +67,23 @@ if [ ! -z "$ns4" ]; then
ns4=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
validate_format 'ns4'
fi
+if [ ! -z "$ns5" ]; then
+ ns5=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns5'
+fi
+if [ ! -z "$ns6" ]; then
+ ns6=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns6'
+fi
+if [ ! -z "$ns7" ]; then
+ ns7=$(echo ${10} | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns7'
+fi
+
+if [ ! -z "$ns8" ]; then
+ ns8=$(echo ${11} | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns8'
+fi
#----------------------------------------------------------#
@@ -81,6 +101,7 @@ if [ -z $ns2 ]; then
fi
soa="$ns1"
exp=$(date +%F -d "+ 1 year")
+serial=$(date +'%Y%m%d01')
ttl=14400
# Reading template
@@ -88,13 +109,25 @@ template_data=$(cat $DNSTPL/$template.tpl)
# Deleting unused nameservers
if [ -z "$ns3" ]; then
- template_data=$(echo "$template_data" | grep -v %ns3%)
+ template_data=$(echo "$template_data" |grep -v %ns3%)
fi
if [ -z "$ns4" ]; then
- template_data=$(echo "$template_data" | grep -v %ns4%)
+ template_data=$(echo "$template_data" |grep -v %ns4%)
+fi
+if [ -z "$ns5" ]; then
+ template_data=$(echo "$template_data" |grep -v %ns5%)
+fi
+if [ -z "$ns6" ]; then
+ template_data=$(echo "$template_data" |grep -v %ns6%)
+fi
+if [ -z "$ns7" ]; then
+ template_data=$(echo "$template_data" |grep -v %ns7%)
+fi
+if [ -z "$ns8" ]; then
+ template_data=$(echo "$template_data" |grep -v %ns8%)
fi
-# Add dns zone to the user config
+# Adding dns zone to the user config
echo "$template_data" |\
sed -e "s/%ip%/$ip/g" \
-e "s/%domain_idn%/$domain_idn/g" \
@@ -103,6 +136,10 @@ echo "$template_data" |\
-e "s/%ns2%/$ns2/g" \
-e "s/%ns3%/$ns3/g" \
-e "s/%ns4%/$ns4/g" \
+ -e "s/%ns5%/$ns5/g" \
+ -e "s/%ns6%/$ns6/g" \
+ -e "s/%ns7%/$ns7/g" \
+ -e "s/%ns8%/$ns8/g" \
-e "s/%time%/$TIME/g" \
-e "s/%date%/$DATE/g" > $USER_DATA/dns/$domain.conf
@@ -111,13 +148,13 @@ records="$(wc -l $USER_DATA/dns/$domain.conf |cut -f 1 -d ' ')"
# Adding dns.conf record
dns_rec="DOMAIN='$domain' IP='$ip' TPL='$template' TTL='$ttl' EXP='$exp'"
-dns_rec="$dns_rec SOA='$soa' RECORDS='$records' SUSPENDED='no' TIME='$TIME'"
-dns_rec="$dns_rec DATE='$DATE'"
+dns_rec="$dns_rec SOA='$soa' SERIAL='$serial' SRC='' RECORDS='$records'"
+dns_rec="$dns_rec SUSPENDED='no' TIME='$TIME' DATE='$DATE'"
echo "$dns_rec" >> $USER_DATA/dns.conf
chmod 660 $USER_DATA/dns.conf
-# Create system configs
+# Creating system configs
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
if [ -e '/etc/named.conf' ]; then
dns_conf='/etc/named.conf'
@@ -135,14 +172,14 @@ if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
# Updating domain dns zone
update_domain_zone
- # Set permissions
- chmod 640 $conf
- chown root:$dns_group $conf
+ # Changing permissions
+ chmod 640 $HOMEDIR/$user/conf/dns/$domain.db
+ chown root:$dns_group $HOMEDIR/$user/conf/dns/$domain.db
fi
# Updating dns-cluster queue
if [ ! -z "$DNS_CLUSTER" ]; then
- cmd="$BIN/v-add-remote-dns-domain $user $domain no"
+ cmd="$BIN/v-add-remote-dns-domain $user $domain yes"
echo "$cmd" >> $VESTA/data/queue/dns-cluster.pipe
fi
@@ -158,9 +195,7 @@ increase_user_value "$user" '$U_DNS_RECORDS' "$records"
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed"
fi
# Logging
diff --git a/bin/v-add-dns-on-web-alias b/bin/v-add-dns-on-web-alias
index 762692130..e0eded79a 100755
--- a/bin/v-add-dns-on-web-alias
+++ b/bin/v-add-dns-on-web-alias
@@ -1,6 +1,6 @@
#!/bin/bash
-# info: add dns domain or dns record based on web domain alias restart
-# options: USER DOMAIN
+# info: add dns domain or dns record after web domain alias
+# options: USER ALIAS IP [RESTART]
#
# The function adds dns domain or dns record based on web domain alias.
@@ -9,15 +9,11 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
-domain=$(echo $2 | sed -e 's/\.*$//g' -e 's/^\.*//g')
-domain_idn=$(idn -t --quiet -a "$domain")
-dom_alias=$(idn -t --quiet -u "$3" )
-dom_alias=$(echo $dom_alias | sed -e 's/\.*$//g' -e 's/^\.*//g')
-dom_alias=$(echo $dom_alias | tr '[:upper:]' '[:lower:]')
-dom_alias_idn=$(idn -t --quiet -a "$dom_alias" )
-restart="$4"
+alias=$2
+ip=$3
+restart=$4
# Includes
source $VESTA/func/main.sh
@@ -29,58 +25,54 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '3' "$#" 'USER DOMAIN ALIAS'
-validate_format 'user' 'domain'
-is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
+check_args '3' "$#" 'USER ALIAS IP [RESTART]'
+validate_format 'user' 'alias' 'ip'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user"
is_object_unsuspended 'user' 'USER' "$user"
-is_object_valid 'web' 'DOMAIN' "$domain"
-is_object_unsuspended 'web' 'DOMAIN' "$domain"
+if [ -e "$USER_DATA/dns/$alias.conf" ]; then
+ exit
+fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-# Parsing domain values
-get_domain_values 'web'
+# Logging
+log_event "$OK" "$EVENT"
-# Check if it a simple domain
-if [ $(echo -e "${dom_alias//\./\n}" | wc -l) -le 2 ]; then
- if [ ! -e "$USER_DATA/dns/$dom_alias.conf" ]; then
- $BIN/v-add-dns-domain \
- $user $dom_alias $IP '' '' '' '' '' $restart > /dev/null
- fi
+# Define additional vars
+sub_domain=$(echo "$alias" |awk -F '.' '{print $1}')
+top_domain=$(echo "$alias" |sed -e "s/^$sub_domain.//")
+domain_lvl=$(echo "$alias" |grep -o "\." |wc -l)
+
+# Adding second level domain
+if [ "$domain_lvl" -eq 1 ] || [ "${#top_domain}" -le '6' ]; then
+ $BIN/v-add-dns-domain \
+ $user $alias $ip '' '' '' '' '' $restart >> /dev/null
+ exit
+fi
+
+# Adding top-level domain and then its sub
+$BIN/v-add-dns-domain $user $top_domain $ip '' '' '' '' $restart >> /dev/null
+
+# Checking top-level domain
+if [ ! -e "$USER_DATA/dns/$top_domain.conf" ]; then
+ exit
+fi
+
+# Checking subdomain record
+if [ "$sub_domain" == '*' ]; then
+ check_record=$(grep -w "RECORD='\*'" $USER_DATA/dns/$top_domain.conf)
else
- # Check subdomain
- sub=$(echo "$dom_alias" | cut -f1 -d . -s)
- dom=$(echo "$dom_alias" | sed -e "s/^$sub.//" )
+ check_record=$(grep -w "RECORD='$sub_domain'" $USER_DATA/dns/$top_domain.conf)
+fi
- # Ignore short domains like co.uk, com.au and so on
- if [ "${#dom}" -le '6' ]; then
- exit
- fi
-
- if [ ! -e "$USER_DATA/dns/$dom.conf" ]; then
- $BIN/v-add-dns-domain \
- $user $dom $IP '' '' '' '' $restart > /dev/null
-
- if [ $? -eq 0 ]; then
- $BIN/v-add-dns-record \
- $user $dom "$sub" A $IP '' '' $restart
- fi
- else
- if [ "$sub" == '*' ]; then
- rec=$(grep -w "RECORD='\*'" $USER_DATA/dns/$dom.conf)
- else
- rec=$(grep -w "RECORD='$sub'" $USER_DATA/dns/$dom.conf)
- fi
- if [ -z "$rec" ]; then
- $BIN/v-add-dns-record \
- $user $dom "$sub" A $IP '' '' $restart > /dev/null
- fi
- fi
+# Adding subdomain record
+if [ -z "$check_record" ]; then
+ $BIN/v-add-dns-record \
+ $user $top_domain "$sub_domain" A $ip '' '' $restart >> /dev/null
fi
@@ -88,6 +80,6 @@ fi
# Vesta #
#----------------------------------------------------------#
-# No Logging
+# No logging
exit
diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record
index f145007da..988c0fbe8 100755
--- a/bin/v-add-dns-record
+++ b/bin/v-add-dns-record
@@ -12,7 +12,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
@@ -82,6 +82,7 @@ sort_dns_records
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -100,7 +101,7 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Upddate counters
+# Update counters
records="$(wc -l $USER_DATA/dns/$domain.conf | cut -f1 -d ' ')"
update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
increase_user_value "$user" '$U_DNS_RECORDS'
@@ -108,9 +109,7 @@ increase_user_value "$user" '$U_DNS_RECORDS'
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? $E_RESTART 'dns failed to restart'
fi
# Logging
diff --git a/bin/v-add-domain b/bin/v-add-domain
index cf0e22abe..0af33c0d3 100755
--- a/bin/v-add-domain
+++ b/bin/v-add-domain
@@ -47,37 +47,34 @@ if [ -z "$ip" ]; then
fi
fi
-# Web domain
+# Working on web domain
if [ ! -z "$WEB_SYSTEM" ]; then
$BIN/v-add-web-domain $user $domain $ip 'no'
- return_code=$?
+ check_result $? "can't add web domain" >/dev/null
fi
-# Proxy support
-if [ ! -z "$PROXY_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
- extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls"
- extentions="$extentions,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav"
- extentions="$extentions,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm"
- $BIN/v-add-web-domain-proxy $user $domain 'default' "$extentions" 'no'
+# Working on DNS domain
+if [ ! -z "$DNS_SYSTEM" ]; then
+ $BIN/v-add-dns-domain $user $domain $ip "" "" "" "" "" 'no'
+ check_result $? "can't add dns domain" >/dev/null
fi
-# DNS domain
-if [ ! -z "$DNS_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
- $BIN/v-add-dns-domain $user $domain $ip 'no'
- return_code=$?
-fi
-
-# Mail domain
-if [ ! -z "$MAIL_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
+# Working on mail domain
+if [ ! -z "$MAIL_SYSTEM" ]; then
$BIN/v-add-mail-domain $user $domain
- return_code=$?
+ check_result $? "can't add mail domain" >/dev/null
fi
-# Restart services
-if [ "$restart" != 'no' ] && [ "$return_code" -eq 0 ]; then
+# Restarting services
+if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- $BIN/v-restart-proxy
+ check_result $? "can't restart web" > /dev/null
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "can't restart proxy" > /dev/null
+ fi
$BIN/v-restart-dns
+ check_result $? "can't restart dns" > /dev/null
fi
@@ -85,4 +82,4 @@ fi
# Vesta #
#----------------------------------------------------------#
-exit $return_code
+exit
diff --git a/bin/v-add-firewall-ban b/bin/v-add-firewall-ban
index 26dc6cbc3..6fb61c8d0 100755
--- a/bin/v-add-firewall-ban
+++ b/bin/v-add-firewall-ban
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
ip=$1
chain=$(echo $2|tr '[:lower:]' '[:upper:]')
diff --git a/bin/v-add-firewall-chain b/bin/v-add-firewall-chain
index 194602caa..735cd11d1 100755
--- a/bin/v-add-firewall-chain
+++ b/bin/v-add-firewall-chain
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
chain=$(echo $1 | tr '[:lower:]' '[:upper:]')
port=$2
protocol=${4-TCP}
diff --git a/bin/v-add-firewall-rule b/bin/v-add-firewall-rule
index 126f62b49..37abe98b7 100755
--- a/bin/v-add-firewall-rule
+++ b/bin/v-add-firewall-rule
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
action=$(echo $1|tr '[:lower:]' '[:upper:]')
ip=$2
port_ext=$3
@@ -52,7 +52,7 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
get_next_fw_rule
validate_format 'rule'
is_object_new '../../data/firewall/rules' 'RULE' "$rule"
-if [ ! -z "$comment"]; then
+if [ ! -z "$comment" ]; then
validate_format 'comment'
fi
diff --git a/bin/v-add-fs-archive b/bin/v-add-fs-archive
new file mode 100755
index 000000000..fa4b7aa3d
--- /dev/null
+++ b/bin/v-add-fs-archive
@@ -0,0 +1,56 @@
+#!/bin/bash
+# info: archive directory
+# options: USER ARCHIVE SOURCE
+#
+# The function creates tar archive
+
+user=$1
+archive=$2
+src=$3
+
+# Checking arguments
+if [ -z "$src" ]; then
+ echo "Usage: USER ARCHIVE SOURCE"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking archive
+if [ -e "$archive.tar.gz" ]; then
+ echo "Error: archive already exist $archive.tar.gz"
+ exit 1
+fi
+
+# Checking source path
+rpath=$(readlink -f "$src")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src"
+ exit 1
+fi
+
+# Parsing current directory
+d=$(dirname "$src")
+
+# Removing leading file path
+f=$(echo "$src" |sed -e "s|$d/||")
+
+# Creating tar.gz archive
+sudo -u $user tar -czf "$archive.tar.gz" -C $d $f >/dev/null 2>&1
+if [ "$?" -ne 0 ]; then
+ echo "Error: archive $archive.tar.gz was not created"
+ exit 3
+fi
+
+exit
diff --git a/bin/v-add-fs-directory b/bin/v-add-fs-directory
new file mode 100755
index 000000000..e507edf5a
--- /dev/null
+++ b/bin/v-add-fs-directory
@@ -0,0 +1,44 @@
+#!/bin/bash
+# info: add directory
+# options: USER DIRECTORY
+#
+# The function creates new directory on the file system
+
+user=$1
+dst_dir=$2
+
+# Checking arguments
+if [ -z "$dst_dir" ]; then
+ echo "Usage: USER DIRECTORY"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_dir"
+ exit 2
+fi
+
+# Adding directory
+sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: directory $dst_dir was not created"
+ exit 3
+fi
+
+# Extiging
+exit
diff --git a/bin/v-add-fs-file b/bin/v-add-fs-file
new file mode 100755
index 000000000..cc1621ccc
--- /dev/null
+++ b/bin/v-add-fs-file
@@ -0,0 +1,44 @@
+#!/bin/bash
+# info: add file
+# options: USER FILE
+#
+# The function creates new files on file system
+
+user=$1
+dst_file=$2
+
+# Checking arguments
+if [ -z "$dst_file" ]; then
+ echo "Usage: USER FILE"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_dir"
+ exit 2
+fi
+
+# Creating file
+sudo -u $user touch "$dst_file" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: file $dst_file was not created"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-add-mail-account b/bin/v-add-mail-account
index 814b55857..5bc5cf02e 100755
--- a/bin/v-add-mail-account
+++ b/bin/v-add-mail-account
@@ -9,13 +9,13 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
account=$(echo $3 | tr '[:upper:]' '[:lower:]')
-password=$4
+password=$4; HIDE=4
quota=${5-unlimited}
# Includes
@@ -23,10 +23,6 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-add-mail-account-alias b/bin/v-add-mail-account-alias
index d1d12a4cf..9cd2b06b9 100755
--- a/bin/v-add-mail-account-alias
+++ b/bin/v-add-mail-account-alias
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply
index f04e9ed93..a1cd09f9c 100755
--- a/bin/v-add-mail-account-autoreply
+++ b/bin/v-add-mail-account-autoreply
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-account-forward b/bin/v-add-mail-account-forward
index 5b2720a13..5f4eaeed9 100755
--- a/bin/v-add-mail-account-forward
+++ b/bin/v-add-mail-account-forward
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-account-fwd-only b/bin/v-add-mail-account-fwd-only
index 5be21965c..72e7c8ec0 100755
--- a/bin/v-add-mail-account-fwd-only
+++ b/bin/v-add-mail-account-fwd-only
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain
index 8c6ce2804..9fbd18525 100755
--- a/bin/v-add-mail-domain
+++ b/bin/v-add-mail-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
diff --git a/bin/v-add-mail-domain-antispam b/bin/v-add-mail-domain-antispam
index 6af5f79f0..20e0c2010 100755
--- a/bin/v-add-mail-domain-antispam
+++ b/bin/v-add-mail-domain-antispam
@@ -2,14 +2,14 @@
# info: add mail domain antispam support
# options: USER DOMAIN
#
-# The function enables spamassasin for incomming emails.
+# The function enables spamassasin for incoming emails.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-domain-antivirus b/bin/v-add-mail-domain-antivirus
index 714f89d71..fe7151d24 100755
--- a/bin/v-add-mail-domain-antivirus
+++ b/bin/v-add-mail-domain-antivirus
@@ -2,14 +2,14 @@
# info: add mail domain antivirus support
# options: USER DOMAIN
#
-# The function enables clamav scan for incomming emails.
+# The function enables clamav scan for incoming emails.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-domain-catchall b/bin/v-add-mail-domain-catchall
index c49bacc91..8ce5eddf0 100755
--- a/bin/v-add-mail-domain-catchall
+++ b/bin/v-add-mail-domain-catchall
@@ -2,14 +2,14 @@
# info: add mail domain catchall account
# options: USER DOMAIN EMAIL
#
-# The function enables catchall account for incomming emails.
+# The function enables catchall account for incoming emails.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-mail-domain-dkim b/bin/v-add-mail-domain-dkim
index 7d391816f..f2accc035 100755
--- a/bin/v-add-mail-domain-dkim
+++ b/bin/v-add-mail-domain-dkim
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-add-remote-dns-domain b/bin/v-add-remote-dns-domain
index 1b5609b40..a2f5b34a0 100755
--- a/bin/v-add-remote-dns-domain
+++ b/bin/v-add-remote-dns-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
flush=$3
@@ -27,101 +27,64 @@ source $VESTA/conf/vesta.conf
check_args '2' "$#" 'USER DOMAIN [FLUSH]'
validate_format 'user' 'domain'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-# Check domain existance
-check_local_domain=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf 2>/dev/null)
-if [ -z "$check_local_domain" ]; then
+# Parsing domain record
+str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf 2>/dev/null)
+if [ -z "$str" ]; then
pipe="$VESTA/data/queue/dns-cluster.pipe"
- str=$(grep -n "$SCRIPT $1 $2$" $pipe | cut -f1 -d: | head -n1)
- if [ ! -z "$str" ]; then
- sed -i "$str d" $pipe
+ queue_str=$(grep -n "$SCRIPT $1 $2 " $pipe |cut -f1 -d: |head -n1)
+ if [ ! -z "$queue_str" ]; then
+ sed -i "$queue_str d" $pipe
fi
exit
fi
-old_ifs="$IFS"
IFS=$'\n'
+for cluster in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-# Check remote dns nodes
-remote_dns_health_check
+ # Parsing remote dns host parameters
+ eval $cluster
-search_str=$(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf)
-for cluster_str in $search_str; do
-
- # Get host values
- eval $cluster_str
-
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Check flush parameters
-
- # Sync domain
- str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
+ # Parsing domain parameters
eval $str
- $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME "$flush" 'no'
- if [ $? -eq 0 ]; then
- # Sync records
- if [ "$TYPE" = 'ssh' ]; then
- tmp=$(mktemp -u)
- scp_cmd $USER_DATA/dns/$DOMAIN.conf $tmp
- $send_cmd v-insert-dns-records $DNS_USER $DOMAIN $tmp 'no'
- else
- for str in $(cat $USER_DATA/dns/$DOMAIN.conf); do
- str=$(echo "$str" | sed 's/"/\\"/g')
- $send_cmd v-insert-dns-record $DNS_USER $DOMAIN "$str"
- done
- fi
+ # Syncing domain data
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME $flush 'no'
+ check_result $? "$HOST connection failed" $E_CONNECT
- # Rebuild dns zone
- $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
- fi
+ # Syncing domain records
+ tmp_file="/tmp/vst-sync.$DOMAIN"
+ cluster_file $USER_DATA/dns/$DOMAIN.conf $tmp_file
+ check_result $? "$HOST connection failed" $E_CONNECT
+ # Inserting synced records
+ cluster_cmd v-insert-dns-records $DNS_USER $DOMAIN $tmp_file 'no'
+ check_result $? "$HOST connection failed" $E_CONNECT
+
+ # Rebuilding dns zone
+ cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no'
+ check_result $? "$HOST connection failed" $E_CONNECT
done
-# Update pipe
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating pipe
rm -f $tmpfile
pipe="$VESTA/data/queue/dns-cluster.pipe"
str=$(grep -n "$SCRIPT $1 $2 " $pipe | cut -f1 -d: | head -n1)
@@ -129,8 +92,4 @@ if [ ! -z "$str" ]; then
sed -i "$str d" $pipe
fi
-#----------------------------------------------------------#
-# Vesta #
-#----------------------------------------------------------#
-
exit
diff --git a/bin/v-add-remote-dns-host b/bin/v-add-remote-dns-host
index 1ca8b0034..32614ce0f 100755
--- a/bin/v-add-remote-dns-host
+++ b/bin/v-add-remote-dns-host
@@ -9,12 +9,17 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
host=$1
+HOST=$host
port=$2
+PORT=$port
user=$3
-password=$4
+USER=$user
+password=$4; HIDE=4
+PASSWORD=$password
type=${5-api}
+TYPE="$type"
dns_user=${6-dns-cluster}
DNS_USER=$dns_user
@@ -23,10 +28,6 @@ source $VESTA/func/main.sh
source $VESTA/func/remote.sh
source $VESTA/conf/vesta.conf
-# Hiding passwords
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
@@ -61,36 +62,26 @@ else
sed -i "s/DNS_CLUSTER=.*/DNS_CLUSTER='yes'/g" $VESTA/conf/vesta.conf
fi
-# Enabling restart queue
-HOST=$host
-PORT=$port
-USER=$user
-PASSWORD=$password
-case $type in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
-esac
-$send_cmd v-add-cron-restart-job
+# Enabling remote dns-cluster queue
+cluster_cmd v-add-cron-restart-job
+check_result $? "$HOST connection failed" $E_CONNECT
-# Sync current zones
+# Syncing all domains
$BIN/v-sync-dns-cluster $host
-return_code=$?
-if [ "$return_code" -ne 0 ]; then
- exit $return_code
-fi
-
-# Add dns-cluster cron job
-cmd="sudo /usr/local/vesta/bin/v-update-sys-queue dns-cluster"
-check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
-if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
- $BIN/v-add-cron-job admin '*/5' '*' '*' '*' '*' "$cmd"
-fi
+check_result $? "$HOST sync failed" $E_CONNECT
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
+# Adding local dns-cluster cron job
+cmd="sudo /usr/local/vesta/bin/v-update-sys-queue dns-cluster"
+check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
+if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
+ $BIN/v-add-cron-job admin '*/5' '*' '*' '*' '*' "$cmd"
+fi
+
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-add-remote-dns-record b/bin/v-add-remote-dns-record
index ca9aaa0e9..9848ef234 100755
--- a/bin/v-add-remote-dns-record
+++ b/bin/v-add-remote-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
id=$3
@@ -29,83 +29,62 @@ validate_format 'user' 'domain' 'id'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'dns' 'DOMAIN' "$domain"
-is_object_valid "dns/$domain" 'ID' "$id"
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
+# Parsing record
+str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf)
+if [ -z "$str" ]; then
+ pipe="$VESTA/data/queue/dns-cluster.pipe"
+ queue_str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
+ if [ ! -z "$queue_str" ]; then
+ sed -i "$queue_str d" $pipe
+ fi
+ exit
+fi
+
IFS=$'\n'
+for cluster in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-# Check remote dns nodes
-remote_dns_health_check
+ # Parsing remote host parameters
+ eval $cluster
-for cluster_str in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
- # Get host values
- eval $cluster_str
+ # Syncing serial
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'domain' 'no'
+ check_result $? "$HOST connection failed (soa sync)" $E_CONNECT
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
+ # Syncing record
+ str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf | sed 's/"/\\"/g')
+ cluster_cmd v-insert-dns-record $DNS_USER $domain "$str" 'no'
+ check_result $? "$HOST connection failed (record sync)" $E_CONNECT
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Sync record
- str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf)
- str=$(echo "$str" | sed 's/"/\\"/g')
- $send_cmd v-insert-dns-record $DNS_USER $domain "$str" 'no'
- if [ $? -eq 0 ]; then
- # Rebuild dns zone
- $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (rebuild)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
- fi
+ # Rebuilding dns zone
+ cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no'
+ check_result $? "$HOST connection failed (rebuild)" $E_CONNECT
done
-# Update pipe
-pipe="$VESTA/data/queue/dns-cluster.pipe"
-str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
-if [ ! -z "$str" ]; then
- sed -i "$str d" $pipe
-fi
-
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
+# Updating pipe
+pipe="$VESTA/data/queue/dns-cluster.pipe"
+str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
+if [ ! -z "$str" ]; then
+ sed -i "$str d" $pipe
+fi
+
exit
diff --git a/bin/v-add-sys-firewall b/bin/v-add-sys-firewall
new file mode 100755
index 000000000..ab40345bd
--- /dev/null
+++ b/bin/v-add-sys-firewall
@@ -0,0 +1,57 @@
+#!/bin/bash
+# info: add system firewall
+# options: NONE
+#
+# The script enables firewall
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+if [ "$FIREWALL_SYSTEM" = 'iptables' ]; then
+ exit
+fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Adding firewall directory
+mkdir -p $VESTA/data/firewall/
+
+# Adding default ruleset
+if [ ! -e "$VESTA/data/firewall/rules.conf" ]; then
+ cp $VESTA/install/rhel/7/* $VESTA/data/firewall/
+fi
+
+# Updating FIREWAL_SYSTEM value
+if [ -z "$(grep FIREWALL_SYSTEM $VESTA/conf/vesta.conf)" ]; then
+ echo "FIREWALL_SYSTEM='iptables'" >> $VESTA/conf/vesta.conf
+else
+ sed -i "s/FIREWALL_SYSTEM.*/FIREWALL_SYSTEM='iptables'/g" \
+ $VESTA/conf/vesta.conf
+fi
+
+# Updating firewall rules
+$BIN/v-update-firewall
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-add-sys-ip b/bin/v-add-sys-ip
index 07fe7568d..3b1a835eb 100755
--- a/bin/v-add-sys-ip
+++ b/bin/v-add-sys-ip
@@ -5,7 +5,7 @@
# The function adds ip address into a system. It also creates rc scripts. You
# can specify ip name which will be used as root domain for temporary aliases.
# For example, if you set a1.myhosting.com as name, each new domain created on
-# this ip will automaticaly receive alias $domain.a1.myhosting.com. Of course
+# this ip will automatically receive alias $domain.a1.myhosting.com. Of course
# you must have wildcard record *.a1.myhosting.com pointed to ip. This feature
# is very handy when customer wants to test domain before dns migration.
@@ -14,7 +14,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=${1// /}
netmask=$2
interface="${3-eth0}"
@@ -161,16 +161,12 @@ fi
# Restarting web server
$BIN/v-restart-web
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Web restart failed" >/dev/null
# Restarting proxy server
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
# Restarting firewall
diff --git a/bin/v-add-sys-quota b/bin/v-add-sys-quota
index 9b35c59d9..f0acde21e 100755
--- a/bin/v-add-sys-quota
+++ b/bin/v-add-sys-quota
@@ -1,12 +1,12 @@
#!/bin/bash
# info: add system quota
-# opions: NONE
+# options: NONE
#
-# The script enables filesystem quota on /home patition
+# The script enables filesystem quota on /home partition
#----------------------------------------------------------#
-# Variable&Function #
+# Variable & Function #
#----------------------------------------------------------#
# Includes
@@ -19,21 +19,15 @@ source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Checking quota package
-if [ ! -e "/usr/sbin/setquota" ]; then
+quota=$(which --skip-alias --skip-functions quota 2>/dev/null)
+if [ $? -ne 0 ]; then
if [ -e "/etc/redhat-release" ]; then
yum -y install quota >/dev/null 2>&1
- result=$?
+ check_result $? "quota package installation failed" $E_UPDATE
else
export DEBIAN_FRONTEND=noninteractive
apt-get -y install quota >/dev/null 2>&1
- result=$?
- fi
-
- # Checking installation status
- if [ "$result" -ne 0 ]; then
- echo "Error: quota package wasn't successfully installed"
- log_event "$E_UPDATE" "$EVENT"
- exit $E_UPDATE
+ check_result $? "quota package installation failed" $E_UPDATE
fi
fi
@@ -42,38 +36,40 @@ fi
# Action #
#----------------------------------------------------------#
-# Adding usrquota option on /home partition
-mnt=$(df -P /home |awk '{print $6}' |tail -n1)
-lnr=$(cat -n /etc/fstab |awk '{print $1,$3}' |grep "$mnt$" |cut -f 1 -d ' ')
-options=$(sed -n ${lnr}p /etc/fstab |awk '{print $4}')
-if [ -z "$(echo $options |grep usrquota)" ]; then
- sed -i "$lnr s/$options/$options,usrquota/" /etc/fstab
+# Adding group and user quota on /home partition
+mnt=$(df -P /home | awk '{print $6}' | tail -n1)
+lnr=$(cat -n /etc/fstab | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')
+opt=$(sed -n ${lnr}p /etc/fstab | awk '{print $4}')
+fnd='usrquota\|grpquota\|usrjquota=aquota.user\|grpjquota=aquota.group\|jqfmt=vfsv0'
+if [ $(echo $opt | tr ',' '\n' | grep -x $fnd | wc -l) -ne 5 ]; then
+ old=$(echo $(echo $opt | tr ',' '\n' | grep -v 'usrquota\|grpquota\|usrjquota=\|grpjquota=\|jqfmt=') | tr ' ' ',')
+ new='usrquota,grpquota,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0'
+ sed -i "$lnr s/$opt/$old,$new/" /etc/fstab
mount -o remount $mnt
fi
-# Adding aquota.user file
-if [ ! -e "$mnt/aquota.user" ]; then
- quotacheck -cu $mnt >/dev/null 2>&1
+# Adding v2 group and user quota index
+if [ ! -e "$mnt/aquota.user" ] || [ ! -e "$mnt/aquota.group" ]; then
+ quotaoff $mnt
+ quotacheck -cug $mnt >/dev/null 2>&1
+ quotacheck -aug >/dev/null 2>&1
fi
-# Building fs quota index
-quotacheck -um $mnt
+# Adding quotacheck on reboot
+touch /forcequotacheck
-# Adding weekly cron job
-echo "quotacheck -um $mnt" > /etc/cron.daily/quotacheck
+# Adding cron job
+echo '#!/bin/bash' > /etc/cron.daily/quotacheck
+echo 'touch /forcequotacheck' >> /etc/cron.daily/quotacheck
chmod a+x /etc/cron.daily/quotacheck
-# Enabling fs quota
-if [ ! -z "$(quotaon -pa|grep " $mnt "|grep user|grep 'off')" ]; then
+# Enabling group and user quota
+if [ ! -z "$(quotaon -pa | grep " $mnt " | grep 'user\|group' | grep 'is off')" ]; then
quotaon $mnt
- if [ $? -ne 0 ]; then
- echo "Error: quota can't be enabled on $mnt partition"
- log_event "$E_DISK" "$EVENT"
- exit $E_DISK
- fi
+ check_result $? "quota can't be enabled in $mnt" $E_DISK
fi
-# Updating DISK_QUOTA value
+# Updating vesta.conf value
if [ -z "$(grep DISK_QUOTA $VESTA/conf/vesta.conf)" ]; then
echo "DISK_QUOTA='yes'" >> $VESTA/conf/vesta.conf
else
diff --git a/bin/v-add-sys-sftp-jail b/bin/v-add-sys-sftp-jail
new file mode 100755
index 000000000..c31fb4390
--- /dev/null
+++ b/bin/v-add-sys-sftp-jail
@@ -0,0 +1,106 @@
+#!/bin/bash
+# info: add system sftp jail
+# options: NONE
+#
+# The script enables sftp jailed environment
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Importing system environment as we run this script
+# mostly by cron which do not read it by itself
+source /etc/profile
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+if [ -z "$SFTPJAIL_KEY" ]; then
+ exit
+fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking sshd directives
+config='/etc/ssh/sshd_config'
+sftp_n=$(grep -n "Subsystem.*sftp" $config |grep -v internal |grep -v ":#")
+sftp_i=$(grep -n "Subsystem.*sftp" $config |grep internal |grep -v ":#")
+
+# Disabling normal sftp
+if [ ! -z "$sftp_n" ]; then
+ fline=$(echo $sftp_n |cut -f 1 -d :)
+ sed -i "${fline}s/Subsystem.*sftp/#Subsystem sftp/" $config
+ restart='yes'
+fi
+
+# Enabling jailed sftp
+if [ -z "$sftp_i" ]; then
+ echo "Subsystem sftp internal-sftp" >> $config
+ echo "Match Group sftp-only" >> $config
+ echo "ChrootDirectory /chroot/%u" >> $config
+ echo " AllowTCPForwarding no" >> $config
+ echo " X11Forwarding no" >> $config
+ echo " ForceCommand internal-sftp" >> $config
+ restart='yes'
+fi
+
+# Validating opensshd config
+if [ "$restart" = 'yes' ]; then
+ subj="OpenSSH restart failed"
+ email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \')
+ send_mail="$VESTA/web/inc/mail-wrapper.php"
+ /usr/sbin/sshd -t >/dev/null 2>&1
+ if [ "$?" -ne 0 ]; then
+ mail_text="OpenSSH can not be restarted. Please check config:
+ \n\n$(/usr/sbin/sshd -t)"
+ echo -e "$mail_text" | $send_mail -s "$subj" $email
+ else
+ service ssh restart >/dev/null 2>&1
+ service sshd restart >/dev/null 2>&1
+ fi
+fi
+
+# Adding sftp group
+groupadd sftp-only 2>/dev/null
+
+# Checking users
+shells="rssh|nologin"
+for user in $(grep "$HOMEDIR" /etc/passwd |egrep "$shells" |cut -f 1 -d:); do
+ $BIN/v-add-user-sftp-jail $user
+done
+
+# Adding v-add-sys-sftp-jail to startup
+if [ -e "/etc/rc.local" ]; then
+ check_sftp=$(grep $0 /etc/rc.local)
+ check_exit=$(grep ^exit /etc/rc.local)
+ if [ -z "$check_sftp" ]; then
+ if [ -z "$check_exit" ]; then
+ echo "$BIN/v-add-sys-sftp-jail" >> /etc/rc.local
+ else
+ sed -i "s|^exit|$BIN/v-add-sys-sftp-jail\nexit|" /etc/rc.local
+ fi
+ fi
+ chmod +x /etc/rc.local
+else
+ echo "$BIN/v-add-sys-sftp-jail" > /etc/rc.local
+ chmod +x /etc/rc.local
+fi
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-add-user b/bin/v-add-user
index ec1596f77..35424381b 100755
--- a/bin/v-add-user
+++ b/bin/v-add-user
@@ -9,9 +9,9 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
-password=$2
+password=$2; HIDE=2
email=$3
package=${4-default}
fname=$5
@@ -21,10 +21,6 @@ lname=$6
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A2='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
is_user_free() {
check_sysuser=$(cut -f 1 -d : /etc/passwd | grep -w "$user" )
if [ ! -z "$check_sysuser" ] || [ -e "$USER_DATA" ]; then
@@ -62,11 +58,7 @@ shell=$(grep -w "$shell_conf" /etc/shells |head -n1)
# Adding user
/usr/sbin/useradd "$user" -s "$shell" -c "$email" -m -d "$HOMEDIR/$user"
-if [ $? -ne 0 ]; then
- echo "Error: user creation failed"
- log_event "$E_INVALID" "$EVENT"
- exit $E_INVALID
-fi
+check_result $? "user creation failed" $E_INVALID
# Adding password
echo "$user:$password" | /usr/sbin/chpasswd
@@ -75,21 +67,15 @@ echo "$user:$password" | /usr/sbin/chpasswd
mkdir $HOMEDIR/$user/conf
if [ ! -z "$WEB_SYSTEM" ]; then
- mkdir $HOMEDIR/$user/conf/web
- mkdir $HOMEDIR/$user/web
- mkdir $HOMEDIR/$user/tmp
- chmod 751 $HOMEDIR/$user/conf/web
- chmod 751 $HOMEDIR/$user/web
+ mkdir $HOMEDIR/$user/conf/web $HOMEDIR/$user/web $HOMEDIR/$user/tmp
+ chmod 751 $HOMEDIR/$user/conf/web $HOMEDIR/$user/web
chmod 771 $HOMEDIR/$user/tmp
- chown $user:$user $HOMEDIR/$user/web
- chown $user:$user $HOMEDIR/$user/tmp
+ chown $user:$user $HOMEDIR/$user/web $HOMEDIR/$user/tmp
fi
if [ ! -z "$MAIL_SYSTEM" ]; then
- mkdir $HOMEDIR/$user/conf/mail
- mkdir $HOMEDIR/$user/mail
- chmod 751 $HOMEDIR/$user/mail
- chmod 751 $HOMEDIR/$user/conf/mail
+ mkdir $HOMEDIR/$user/conf/mail $HOMEDIR/$user/mail
+ chmod 751 $HOMEDIR/$user/mail $HOMEDIR/$user/conf/mail
fi
if [ ! -z "$DNS_SYSTEM" ]; then
@@ -107,54 +93,47 @@ chattr +i $HOMEDIR/$user/conf
#----------------------------------------------------------#
# Adding user dir
-mkdir $USER_DATA
-chmod 770 $USER_DATA
+mkdir -p $USER_DATA/ssl $USER_DATA/dns $USER_DATA/mail
# Creating configuration files and pipes
-touch $USER_DATA/backup.conf
-chmod 660 $USER_DATA/backup.conf
-touch $USER_DATA/history.log
-chmod 660 $USER_DATA/history.log
-touch $USER_DATA/stats.log
-chmod 660 $USER_DATA/stats.log
+touch $USER_DATA/backup.conf \
+ $USER_DATA/history.log \
+ $USER_DATA/stats.log \
+ $USER_DATA/web.conf \
+ $USER_DATA/dns.conf \
+ $USER_DATA/mail.conf \
+ $USER_DATA/db.conf \
+ $USER_DATA/cron.conf
+chmod 770 $USER_DATA \
+ $USER_DATA/ssl \
+ $USER_DATA/dns \
+ $USER_DATA/mail
+
+chmod 660 $USER_DATA/backup.conf \
+ $USER_DATA/history.log \
+ $USER_DATA/stats.log \
+ $USER_DATA/web.conf \
+ $USER_DATA/dns.conf \
+ $USER_DATA/mail.conf \
+ $USER_DATA/db.conf \
+ $USER_DATA/cron.conf
+
+# Updating queue pipes
echo "$BIN/v-update-user-disk $user" >> $VESTA/data/queue/disk.pipe
-
if [ ! -z "$WEB_SYSTEM" ]; then
- mkdir $USER_DATA/ssl
- chmod 770 $USER_DATA/ssl
- touch $USER_DATA/web.conf
- chmod 660 $USER_DATA/web.conf
echo "$BIN/v-update-web-domains-traff $user" \
>> $VESTA/data/queue/traffic.pipe
echo "$BIN/v-update-web-domains-disk $user" >> $VESTA/data/queue/disk.pipe
fi
-
-if [ ! -z "$DNS_SYSTEM" ]; then
- mkdir $USER_DATA/dns
- chmod 770 $USER_DATA/dns
- touch $USER_DATA/dns.conf
- chmod 660 $USER_DATA/dns.conf
-fi
-
if [ ! -z "$MAIL_SYSTEM" ]; then
- mkdir $USER_DATA/mail
- chmod 770 $USER_DATA/mail
- touch $USER_DATA/mail.conf
- chmod 660 $USER_DATA/mail.conf
echo "$BIN/v-update-mail-domains-disk $user" >> $VESTA/data/queue/disk.pipe
fi
if [ ! -z "$DB_SYSTEM" ]; then
- touch $USER_DATA/db.conf
- chmod 660 $USER_DATA/db.conf
echo "$BIN/v-update-databases-disk $user" >> $VESTA/data/queue/disk.pipe
fi
-if [ ! -z "$CRON_SYSTEM" ]; then
- touch $USER_DATA/cron.conf
- chmod 660 $USER_DATA/cron.conf
-fi
# Filling user config
if [ "$user" != 'admin' ]; then
@@ -201,6 +180,7 @@ U_DATABASES='0'
U_CRON_JOBS='0'
U_BACKUPS='0'
LANGUAGE=''
+NOTIFICATIONS='no'
TIME='$TIME'
DATE='$DATE'" > $USER_DATA/user.conf
chmod 660 $USER_DATA/user.conf
@@ -220,6 +200,11 @@ if [ -x "$VESTA/data/packages/$package.sh" ]; then
$VESTA/data/packages/$package.sh "$user" "$email" "$fname" "$lname"
fi
+# Adding jailed sftp env
+if [ ! -z "$SFTPJAIL_KEY" ]; then
+ $BIN/v-add-user-sftp-jail $user
+fi
+
# Logging
log_history "added system user $user" '' 'admin'
log_event "$OK" "$EVENT"
diff --git a/bin/v-add-user-favourites b/bin/v-add-user-favourites
new file mode 100755
index 000000000..84764e4ad
--- /dev/null
+++ b/bin/v-add-user-favourites
@@ -0,0 +1,125 @@
+#!/bin/bash
+# info: adding user favourites
+# options: USER SYSTEM OBJECT
+#
+# The function adds object to users favourites
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+system=$(echo "$2" |tr '[:lower:]' '[:upper:]')
+object=$3
+email=$3
+id=$3
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '3' "$#" 'USER SYSTEM OBJECT'
+validate_format 'user' 'system'
+case $system in
+ MAIL_ACC) validate_format 'email' ;;
+ CRON) validate_format 'id' ;;
+ DNS_REC) validate_format 'id' ;;
+ *) validate_format 'object'
+esac
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+
+# Checking system
+case $system in
+ USER) check='ok' ;;
+ WEB) check='ok' ;;
+ DNS) check='ok' ;;
+ DNS_REC) check='ok' ;;
+ MAIL) check='ok' ;;
+ MAIL_ACC) check='ok' ;;
+ DB) check='ok' ;;
+ CRON) check='ok' ;;
+ BACKUP) check='ok' ;;
+ IP) check='ok' ;;
+ PACKAGE) check='ok' ;;
+ FIREWALL) check='ok' ;;
+ *) check_args '2' '0' 'USER SYSTEM OBJECT'
+esac
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Flushing vars
+USER=''
+WEB=''
+DNS=''
+DNS_REC=''
+MAIL=''
+MAIL_ACC=''
+DB=''
+CRON=''
+BACKUP=''
+IP=''
+PACKAGE=''
+FIREWALL=''
+
+# Creating config just in case
+touch $USER_DATA/favourites.conf
+
+# Reading current values
+source $USER_DATA/favourites.conf
+
+# Assigning current system value
+eval value=\$$system
+
+# Checking if object is new
+check_fav=$(echo "$value" |tr ',' '\n'| grep "^$object$")
+if [ ! -z "$check_fav" ]; then
+ exit 0
+fi
+
+# Adding object to favorites
+if [ -z "$value" ]; then
+ value="$object"
+else
+ value="$value,$object"
+fi
+
+# Updating sytem
+eval $system=$value
+
+# Updating user favorites
+echo "USER='$USER'
+WEB='$WEB'
+DNS='$DNS'
+DNS_REC='$DNS_REC'
+MAIL='$MAIL'
+MAIL_ACC='$MAIL_ACC'
+DB='$DB'
+CRON='$CRON'
+BACKUP='$BACKUP'
+IP='$IP'
+PACKAGE='$PACKAGE'
+FIREWALL='$FIREWALL'" > $USER_DATA/favourites.conf
+
+# Changing file permission
+chmod 640 $USER_DATA/favourites.conf
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+log_history "added starred $object in $system listing"
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-add-user-notification b/bin/v-add-user-notification
new file mode 100755
index 000000000..dcc61f8a1
--- /dev/null
+++ b/bin/v-add-user-notification
@@ -0,0 +1,71 @@
+#!/bin/bash
+# info: add user notification
+# options: USER TOPIC NOTICE [TYPE]
+#
+# The function adds user notification.
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+topic=$(echo $2 |sed "s/'/%quote%/g")
+notice=$(echo $3 |sed "s/'/%quote%/g")
+type=$4
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER TOPIC NOTICE [TYPE]'
+validate_format 'user' 'topic' 'notice'
+is_object_valid 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Defining notification id
+if [ -e "$USER_DATA/notifications.conf" ]; then
+ nid=$(grep "NID=" $USER_DATA/notifications.conf |cut -f 2 -d \')
+ nid=$(echo "$nid" |sort -n |tail -n1)
+ if [ ! -z "$nid" ]; then
+ nid="$((nid +1))"
+ else
+ nid=1
+ fi
+else
+ nid=1
+fi
+
+# Concatenating string
+str="NID='$nid' TOPIC='$topic' NOTICE='$notice' TYPE='$type'"
+str="$str ACK='no' TIME='$TIME' DATE='$DATE'"
+
+# Adding to config
+echo "$str" >> $USER_DATA/notifications.conf
+
+# Changing permissions
+chmod 660 $USER_DATA/notifications.conf
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating notification counter
+if [ -z "$(grep NOTIFICATIONS $USER_DATA/user.conf)" ]; then
+ sed -i "s/^TIME/NOTIFICATIONS='yes'\nTIME/g" $USER_DATA/user.conf
+else
+ update_user_value "$user" '$NOTIFICATIONS' "yes"
+fi
+
+exit
diff --git a/bin/v-add-user-package b/bin/v-add-user-package
index ea82411c8..49332154d 100755
--- a/bin/v-add-user-package
+++ b/bin/v-add-user-package
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
pkg_dir=$1
package=$2
rewrite=$3
diff --git a/bin/v-add-user-sftp-jail b/bin/v-add-user-sftp-jail
new file mode 100755
index 000000000..de2990386
--- /dev/null
+++ b/bin/v-add-user-sftp-jail
@@ -0,0 +1,66 @@
+#!/bin/bash
+# info: add user sftp jail
+# options: USER
+#
+# The script enables sftp jailed environment
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '1' "$#" 'USER'
+validate_format 'user'
+if [ -z "$SFTPJAIL_KEY" ]; then
+ exit
+fi
+user_str=$(grep "^$user:" /etc/passwd |egrep "rssh|nologin")
+if [ -z "$user_str" ]; then
+ exit
+fi
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Defining user homedir
+home="$(echo $user_str |cut -f 6 -d :)"
+
+# Adding chroot directory
+if [ ! -d "/chroot/$user/$home" ]; then
+ mkdir -p /chroot/$user/$home
+ chmod 750 /chroot/$user
+ chmod 775 /chroot/$user/$home
+ chown root:sftp-only /chroot/$user
+ chown $user:sftp-only /chroot/$user/$home
+fi
+
+# Adding user to sftp group
+usermod -a -G sftp-only $user
+
+# Mouting home directory
+if [ -z "$(mount |grep $home)" ]; then
+ mount -o bind $home /chroot/$user/$home/
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+#log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain
index 8ad6f9e29..ebe5f0b58 100755
--- a/bin/v-add-web-domain
+++ b/bin/v-add-web-domain
@@ -1,11 +1,11 @@
#!/bin/bash
# info: add web domain
-# options: USER DOMAIN IP [RESTART]
+# options: USER DOMAIN IP [RESTART] [ALIASES] [PROXY_EXTENTIONS]
#
# The function adds virtual host to a server. In cases when a template is
# undefined in the script, the template "default" will be used. The alias of
# www.domain.tld type will be automatically assigned to the domain. If ip have
-# assocated dns name, this domain will also get the alias domain-tpl.$ipname.
+# associated dns name, this domain will also get the alias domain-tpl.$ipname.
# An alias with the ip name is useful during the site testing while dns isn't
# moved to a server yet.
@@ -14,14 +14,18 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
-ip=$3
+ip=$3; IP=$3
restart=$4
+aliases=$5
+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"
+extentions=${6-$default_extentions}
# Includes
source $VESTA/func/main.sh
@@ -34,7 +38,7 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '3' "$#" 'USER DOMAIN IP [RESTART]'
+check_args '3' "$#" 'USER DOMAIN IP [RESTART] [ALIASES] [PROXY_EXTENTIONS]'
validate_format 'user' 'domain' 'ip'
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
is_object_valid 'user' 'USER' "$user"
@@ -45,41 +49,23 @@ is_ip_avalable
is_package_full 'WEB_DOMAINS'
template=$(get_user_value '$WEB_TEMPLATE')
is_web_template_valid
+if [ ! -z "$aliases" ]; then
+ for domain_alias in $(echo "${aliases//,/ }"); do
+ is_domain_new 'web' "$domain_alias" 'alias'
+ done
+fi
+if [ ! -z "$PROXY_SYSTEM" ]; then
+ validate_format 'extentions'
+ proxy=$(get_user_value '$PROXY_TEMPLATE')
+ is_proxy_template_valid $proxy
+fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-# Define real ip in case of NAT
-IP=$ip
-ip=$(get_real_ip $ip)
-
-# Defining domain aliases
-ip_name=$(get_ip_name)
-ip_name_idn=$(idn -t --quiet -a "$ip_name")
-domain_alias="www.$domain"
-domain_alias_idn="www.$domain_idn"
-if [ ! -z "$ip_name" ]; then
- domain_alias_dash="${domain//./-}.$ip_name"
- domain_alias_dash_idn="${domain_idn//./-}.$ip_name_idn"
- aliases="$domain_alias,$domain_alias_dash"
- aliases_idn="$domain_alias_idn,$domain_alias_dash_idn"
- alias_string="ServerAlias $domain_alias_idn $domain_alias_dash_idn"
-else
- aliases="$domain_alias"
- aliases_idn="$domain_alias_idn"
- alias_string="ServerAlias $domain_alias_idn"
-fi
-
-# Defining vars for add_config function
-group="$user"
-email="info@$domain"
-docroot="$HOMEDIR/$user/web/$domain/public_html"
-tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl"
-conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
-
-# Checking backend
+# Checking domain backend in case PHP-FPM is configured
if [ ! -z "$WEB_BACKEND" ]; then
is_web_backend_pool_valid
$BIN/v-add-web-domain-backend $user $domain
@@ -88,8 +74,36 @@ if [ ! -z "$WEB_BACKEND" ]; then
exit $rc
fi
get_domain_backend_values
+ backend=$(get_user_value '$BACKEND_TEMPLATE')
+ if [ -z "$backend" ]; then
+ backend='default'
+ fi
fi
+# Defining variables for add_config function
+ip=$(get_real_ip $ip)
+group="$user"
+email="info@$domain"
+docroot="$HOMEDIR/$user/web/$domain/public_html"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
+
+# Defining domain aliases
+ip_name=$(get_ip_name)
+if [ -z "$aliases" ]; then
+ if [ -z "$ip_name" ]; then
+ aliases="www.$domain"
+ else
+ aliases="www.$domain,${domain//./-}.$ip_name"
+ fi
+else
+ if [ ! -z "$ip_name" ]; then
+ aliases="$aliases,${domain//./-}.$ip_name"
+ fi
+fi
+aliases_idn=$(idn -t --quiet -a $aliases)
+alias_string="ServerAlias ${aliases_idn//,/ }"
+
# Adding web config
add_web_config
@@ -133,23 +147,21 @@ done
# Changing file owner
chown -R $user:$user $HOMEDIR/$user/web/$domain
-chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.*
-chown root:$user $conf
+chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.* $conf
# Changing file permissions
-chmod 640 $conf
+chmod 640 $conf /var/log/$WEB_SYSTEM/domains/$domain.*
chmod 551 $HOMEDIR/$user/web/$domain
-chmod 751 $HOMEDIR/$user/web/$domain/private
-chmod 751 $HOMEDIR/$user/web/$domain/cgi-bin
-chmod 751 $HOMEDIR/$user/web/$domain/public_html
-chmod 751 $HOMEDIR/$user/web/$domain/public_shtml
-chmod 751 $HOMEDIR/$user/web/$domain/document_errors
-chmod -f -R 665 $HOMEDIR/$user/web/$domain/cgi-bin/*
-chmod -f -R 665 $HOMEDIR/$user/web/$domain/public_html/*
-chmod -f -R 665 $HOMEDIR/$user/web/$domain/document_errors/*
-chmod 551 $HOMEDIR/$user/web/$domain/stats
-chmod 551 $HOMEDIR/$user/web/$domain/logs
-chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
+chmod 751 $HOMEDIR/$user/web/$domain/private \
+ $HOMEDIR/$user/web/$domain/cgi-bin \
+ $HOMEDIR/$user/web/$domain/public_html \
+ $HOMEDIR/$user/web/$domain/public_shtml \
+ $HOMEDIR/$user/web/$domain/document_errors
+chmod -f -R 665 $HOMEDIR/$user/web/$domain/cgi-bin/* \
+ $HOMEDIR/$user/web/$domain/public_html/* \
+ $HOMEDIR/$user/web/$domain/document_errors/* \
+chmod 551 $HOMEDIR/$user/web/$domain/stats \
+ $HOMEDIR/$user/web/$domain/logs
# Running template trigger
if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then
@@ -167,6 +179,23 @@ if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then
echo "include $conf;" >> $web_conf
fi
+# Checking proxy system
+if [ ! -z "$PROXY_SYSTEM" ]; then
+ PROXY_EXT="$extentions"
+ tpl_file="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl"
+ conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
+ add_web_config
+ chown root:$user $conf
+ chmod 640 $conf
+ proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+ if [ -z "$(grep "$conf" $proxy_conf)" ]; then
+ echo "include $conf;" >> $proxy_conf
+ fi
+ if [ -x $WEBTPL/$PROXY_SYSTEM/$proxy.sh ]; then
+ $WEBTPL/$PROXY_SYSTEM/$proxy.sh $user $domain $ip $HOMEDIR $docroot
+ fi
+fi
+
#----------------------------------------------------------#
# Vesta #
@@ -178,22 +207,23 @@ increase_user_value "$user" '$U_WEB_DOMAINS'
increase_user_value "$user" '$U_WEB_ALIASES'
# Defining domain variables
-BACKEND_TPL=$(grep BACKEND_TEMPLATE $USER_DATA/user.conf |cut -f 2 -d \')
str="DOMAIN='$domain' IP='$IP' IP6='' ALIAS='$aliases' TPL='$template'"
-str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5=''"
-str="$str BACKEND='$BACKEND_TPL' PROXY='' PROXY_EXT='' STATS='' STATS_USER=''"
+str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5='' BACKEND='$backend'"
+str="$str PROXY='$proxy' PROXY_EXT='$extentions' STATS='' STATS_USER=''"
str="$str STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no'"
str="$str TIME='$TIME' DATE='$DATE'"
# Registering domain
echo "$str" >> $USER_DATA/web.conf
-chmod 660 $USER_DATA/web.conf
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ check_result $? "Web restart failed" >/dev/null
+
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias
index a56964b58..5e1a5e781 100755
--- a/bin/v-add-web-domain-alias
+++ b/bin/v-add-web-domain-alias
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
@@ -39,7 +39,7 @@ is_object_valid 'user' 'USER' "$user"
is_object_unsuspended 'user' 'USER' "$user"
is_object_valid 'web' 'DOMAIN' "$domain"
is_object_unsuspended 'web' 'DOMAIN' "$domain"
-is_domain_new 'web' "$dom_alias"
+is_domain_new 'web' "$dom_alias" 'alias'
is_package_full 'WEB_ALIASES'
@@ -75,7 +75,7 @@ if [ "$SSL" = 'yes' ]; then
fi
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
del_web_config
@@ -100,16 +100,14 @@ update_object_value 'web' 'DOMAIN' "$domain" '$ALIAS' "$ALIAS"
# Update counters
increase_user_value "$user" '$U_WEB_ALIASES'
-# Adding task to the vesta pipe
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-add-web-domain-backend b/bin/v-add-web-domain-backend
index c9f327a28..cc595ce50 100755
--- a/bin/v-add-web-domain-backend
+++ b/bin/v-add-web-domain-backend
@@ -9,11 +9,11 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
domain_idn=$(idn -t --quiet -a "$domain")
-template=$3
+template=${3-default}
# Includes
source $VESTA/func/main.sh
@@ -67,9 +67,7 @@ cat $WEBTPL/$WEB_BACKEND/$template.tpl |\
# Restart backend server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web-backend
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web backend restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp
index 5626e7ac3..6a55155c5 100755
--- a/bin/v-add-web-domain-ftp
+++ b/bin/v-add-web-domain-ftp
@@ -9,12 +9,12 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
ftp_user=${1}_${3}
-password=$4
+password=$4; HIDE=4
ftp_path=$5
# Includes
@@ -22,10 +22,6 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
@@ -94,6 +90,11 @@ fi
echo "$ftp_user:$password" | /usr/sbin/chpasswd
ftp_md5=$(awk -v user=$ftp_user -F : 'user == $1 {print $2}' /etc/shadow)
+# Adding jailed sftp env
+if [ ! -z "$SFTPJAIL_KEY" ]; then
+ $BIN/v-add-user-sftp-jail $ftp_user
+fi
+
#----------------------------------------------------------#
# Vesta #
diff --git a/bin/v-add-web-domain-httpauth b/bin/v-add-web-domain-httpauth
new file mode 100755
index 000000000..5f27399af
--- /dev/null
+++ b/bin/v-add-web-domain-httpauth
@@ -0,0 +1,105 @@
+#!/bin/bash
+# info: add password protection for web domain
+# options: USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]
+#
+# The call is used for securing web domain with http auth
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+auth_user=$3
+password=$4; HIDE=4
+restart=${5-yes}
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/func/domain.sh
+source $VESTA/conf/vesta.conf
+
+# Defining htpasswd file
+htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
+htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
+docroot="$HOMEDIR/$user/web/$domain/public_html"
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '4' "$#" 'USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]'
+validate_format 'user' 'domain'
+is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+is_object_valid 'web' 'DOMAIN' "$domain"
+is_object_unsuspended 'web' 'DOMAIN' "$domain"
+is_password_valid
+get_domain_values 'web'
+if [ ! -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then
+ echo "Error: auth user $auth_user already exists"
+ log_event "$E_EXISTS" "$EVENT"
+ exit $E_EXISTS
+fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Adding htaccess password protection
+if [ ! -e "$htaccess" ]; then
+ if [ "$WEB_SYSTEM" != 'nginx' ]; then
+ echo "" > $htaccess
+ echo " AuthUserFile $htpasswd" >> $htaccess
+ echo " AuthName \"$domain access\"" >> $htaccess
+ echo " AuthType Basic" >> $htaccess
+ echo " Require valid-user" >> $htaccess
+ echo " " >> $htaccess
+ else
+ echo "auth_basic \"$domain password access\";" > $htaccess
+ echo "auth_basic_user_file $htpasswd;" >> $htaccess
+ fi
+ restart_required='yes'
+fi
+
+# Adding httpasswd user
+auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password)
+touch $htpasswd
+chmod 640 $htpasswd $htaccess
+sed -i "/^$auth_user:/d" $htpasswd
+echo "$auth_user:$auth_hash" >> $htpasswd
+
+# Restarting web server
+if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
+ $BIN/v-restart-web
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Preparing web.conf keys
+if [ ! -z "$AUTH_USER" ]; then
+ auth_user="$AUTH_USER:$auth_user"
+ auth_hash="$AUTH_HASH:$auth_hash"
+else
+ # Adding new key into web.conf
+ add_object_key "web" 'DOMAIN' "$domain" 'AUTH_USER' 'U_DISK'
+ add_object_key "web" 'DOMAIN' "$domain" 'AUTH_HASH' 'U_DISK'
+fi
+
+# Updating config
+update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_USER' "$auth_user"
+update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash"
+
+# Logging
+log_history "added http auth user $httpauth_user on $domain"
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-add-web-domain-proxy b/bin/v-add-web-domain-proxy
index df6d79ebc..476f0cd40 100755
--- a/bin/v-add-web-domain-proxy
+++ b/bin/v-add-web-domain-proxy
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -42,7 +42,7 @@ is_object_value_empty 'web' 'DOMAIN' "$domain" '$PROXY'
if [ -z $template ]; then
template=$(get_user_value '$PROXY_TEMPLATE')
fi
-is_proxy_template_valid
+is_proxy_template_valid $template
#----------------------------------------------------------#
@@ -100,12 +100,10 @@ fi
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
log_history "enabled proxy support for $domain"
diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl
index 946e454a5..72767e772 100755
--- a/bin/v-add-web-domain-ssl
+++ b/bin/v-add-web-domain-ssl
@@ -14,7 +14,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -97,7 +97,7 @@ if [ -z "$(grep "$conf" $web_conf)" ]; then
fi
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
add_web_config
@@ -124,16 +124,14 @@ increase_user_value "$user" '$U_WEB_SSL'
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-add-web-domain-stats b/bin/v-add-web-domain-stats
index 8ee057618..929e27d0a 100755
--- a/bin/v-add-web-domain-stats
+++ b/bin/v-add-web-domain-stats
@@ -13,7 +13,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-add-web-domain-stats-user b/bin/v-add-web-domain-stats-user
index 9d4b766b0..007c013da 100755
--- a/bin/v-add-web-domain-stats-user
+++ b/bin/v-add-web-domain-stats-user
@@ -9,21 +9,17 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
stats_user=$3
-password=$4
+password=$4; HIDE=4
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
@@ -43,7 +39,7 @@ is_password_valid
# Action #
#----------------------------------------------------------#
-# Definining statistic dir
+# Defining statistic dir
stats_dir="$HOMEDIR/$user/web/$domain/stats"
# Adding htaccess file
diff --git a/bin/v-backup-user b/bin/v-backup-user
index 859ff67d1..0a335da47 100755
--- a/bin/v-backup-user
+++ b/bin/v-backup-user
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
user=$1
notify=${2-no}
@@ -54,12 +54,11 @@ if [ "$notify" != 'no' ]; then
email=$(get_user_value '$CONTACT')
else
subj="$user → backup failed"
- email=$(grep CONTACT $VESTA/data/users/admin/user.conf | cut -f 2 -d \')
+ email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \')
fi
-send_mail="$VESTA/web/inc/mail-wrapper.php"
# Check load average
-la=$(cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d '.')
+la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
i=0
while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
echo "$(date "+%F %T") LoadAverage $la is above threshold. Sleeping..."
@@ -67,20 +66,20 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
if [ "$i" -ge "5" ]; then
mail_top=$(top -b| head -n 30)
mail_text="LoadAverage $i is above threshold\n\n$mail_top\n"
- echo -e "$mail_text" | $send_mail -s "$subj" $email
+ echo -e "$mail_text" |$send_mail -s "$subj" $email
echo "Error: LA is too high"
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
log_event "$E_LA" "$EVENT"
exit $E_LA
fi
- la=$(cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d '.')
+ la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
(( ++i))
done
# Creating temporary directory
tmpdir=$(mktemp -p $BACKUP -d)
if [ "$?" -ne 0 ]; then
- echo "Can't create tmp dir $tmpdir" | $send_mail -s "$subj" $email
+ echo "Can't create tmp dir $tmpdir" |$send_mail -s "$subj" $email
echo "Error: can't create tmp dir"
log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST
@@ -137,15 +136,15 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
# Parsing domain exclusions
conf="$USER_DATA/web.conf"
for domain in $(search_objects 'web' 'SUSPENDED' "*" 'DOMAIN'); do
- check_exl=$(echo -e "${WEB//,/\n}" |grep "^$domain$")
- if [ -z "$check_exl" ]; then
+ exclusion=$(echo -e "$WEB" |tr ',' '\n' |grep "^$domain$")
+ if [ -z "$exclusion" ]; then
web_list="$web_list $domain"
else
echo "$(date "+%F %T") excluding $domain"
msg="$msg\n$(date "+%F %T") excluding $domain"
fi
done
- web_list=$(echo "$web_list" | sed -e "s/ */\ /g" -e "s/^ //")
+ web_list=$(echo "$web_list" |sed -e "s/ */\ /g" -e "s/^ //")
i=0
@@ -207,36 +206,26 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
fi
# Define exclude arguments
+ exlusion=$(echo -e "$WEB" |tr ',' '\n' |grep "^$domain:")
set -f
fargs=()
- fargs+=(-not)
- fargs+=(-path)
- fargs+=("./logs*")
- check_exlusion=$(echo -e "${WEB//,/\n}" | grep "^$domain:")
- if [ ! -z "$check_exlusion" ]; then
- xdirs="$(echo -e "${check_exlusion//:/\n}" |grep -v $domain)"
+ fargs+=(--exclude='logs/*')
+ if [ ! -z "$exlusion" ]; then
+ xdirs="$(echo -e "$exlusion" |tr ':' '\n' |grep -v $domain)"
for xpath in $xdirs; do
- xpath="$(echo $xpath | sed -e 's/\/*$//' -e 's/^\/*//')"
- fargs+=(-not)
- fargs+=(-path)
- fargs+=("./$xpath/*")
+ fargs+=(--exclude=$xpath/*)
echo "$(date "+%F %T") excluding directory $xpath"
msg="$msg\n$(date "+%F %T") excluding directory $xpath"
done
fi
+ set +f
# Backup files
cd $HOMEDIR/$user/web/$domain
- find . ${fargs[@]} -type f -print0 |\
- tar -cpf $tmpdir/web/$domain/domain_data.tar --null -T -
-
- # Backup empty folders
- find . ${fargs[@]} -type d -empty -print0 |\
- tar -rpf $tmpdir/web/$domain/domain_data.tar --null -T -
+ tar -cpf $tmpdir/web/$domain/domain_data.tar * ${fargs[@]}
# Compress archive
gzip -$BACKUP_GZIP $tmpdir/web/$domain/domain_data.tar
- set +f
done
# Print total
@@ -259,15 +248,15 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS" != '*' ]; then
# Parsing domain exclusions
for domain in $(search_objects 'dns' 'SUSPENDED' "*" 'DOMAIN'); do
- check_exl=$(echo -e "${DNS//,/\n}" |grep "^$domain$")
- if [ -z "$check_exl" ]; then
+ exclusion=$(echo "$DNS" |tr ',' '\n' |grep "^$domain$")
+ if [ -z "$exclusion" ]; then
dns_list="$dns_list $domain"
else
echo "$(date "+%F %T") excluding $domain"
msg="$msg\n$(date "+%F %T") excluding $domain"
fi
done
- dns_list=$(echo "$dns_list" | sed -e "s/ */\ /g" -e "s/^ //")
+ dns_list=$(echo "$dns_list" |sed -e "s/ */\ /g" -e "s/^ //")
i=0
for domain in $dns_list; do
@@ -312,7 +301,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then
# Parsing domain exclusions
conf="$USER_DATA/mail.conf"
for domain in $(search_objects 'mail' 'SUSPENDED' "*" 'DOMAIN'); do
- check_exl=$(echo -e "${MAIL//,/\n}" |grep "^$domain$")
+ check_exl=$(echo "$MAIL" |tr ',' '\n' |grep "^$domain$")
if [ -z "$check_exl" ]; then
mail_list="$mail_list $domain"
else
@@ -320,7 +309,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then
msg="$msg\n$(date "+%F %T") excluding $domain"
fi
done
- mail_list=$(echo "$mail_list" | sed -e "s/ */\ /g" -e "s/^ //")
+ mail_list=$(echo "$mail_list" |sed -e "s/ */\ /g" -e "s/^ //")
i=0
for domain in $mail_list; do
@@ -348,8 +337,8 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then
# Backup emails
cd $HOMEDIR/$user/mail/$domain_idn
for account in $(ls); do
- exclusion=$(echo -e "${MAIL//,/\n}" |grep "$domain:")
- exclusion=$(echo -e "${exclusion//:/\n}" |grep "^$account$")
+ exclusion=$(echo "$MAIL" |tr ',' '\n' |grep "$domain:")
+ exclusion=$(echo "$exclusion" |tr ':' '\n' |grep "^$account$")
# Checking exlusions
if [ -z "$exclusion" ] && [[ "$MAIL_SYSTEM" =~ exim ]]; then
@@ -390,8 +379,8 @@ if [ ! -z "$DB_SYSTEM" ] && [ "$DB" != '*' ]; then
# Parsing database exclusions
for database in $(search_objects 'db' 'SUSPENDED' "*" 'DB'); do
- check_exl=$(echo -e "${DB//,/\n}" |grep "^$database$")
- if [ -z "$check_exl" ]; then
+ exclusion=$(echo "$DB" |tr ',' '\n' |grep "^$database$")
+ if [ -z "$exclusion" ]; then
db_list="$db_list $database"
else
echo "$(date "+%F %T") excluding $database"
@@ -401,7 +390,7 @@ if [ ! -z "$DB_SYSTEM" ] && [ "$DB" != '*' ]; then
i=0
conf="$USER_DATA/db.conf"
- db_list=$(echo "$db_list" | sed -e "s/ */\ /g" -e "s/^ //")
+ db_list=$(echo "$db_list" |sed -e "s/ */\ /g" -e "s/^ //")
for database in $db_list; do
((i ++))
get_database_values
@@ -477,9 +466,8 @@ if [ "$USER" != '*' ]; then
if [ -e "$USER_DATA/backup-excludes.conf" ]; then
source $USER_DATA/backup-excludes.conf
fi
- exlusion_list=$(echo -e "${USER//,/\n}")
fargs=()
- for xpath in $exlusion_list; do
+ for xpath in $(echo "$USER" |tr ',' '\n'); do
fargs+=(-not)
fargs+=(-path)
fargs+=("./$xpath*")
@@ -490,28 +478,24 @@ if [ "$USER" != '*' ]; then
IFS=$'\n'
set -f
i=0
- for udir in $(ls |egrep -v "conf|web|dns|mail"); do
- check_exl=$(echo -e "${USER//,/\n}" |grep "^$udir$")
- if [ -z "$check_exl" ]; then
+
+ for udir in $(ls -a |egrep -v "conf|web|dns|mail|^\.\.$|^\.$"); do
+ exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$")
+ if [ -z "$exclusion" ]; then
((i ++))
udir_list="$udir_list $udir"
- echo -e "$(date "+%F %T") adding directory $udir"
- msg="$msg\n$(date "+%F %T") adding directory $udir"
+ echo -e "$(date "+%F %T") adding $udir"
+ msg="$msg\n$(date "+%F %T") adding $udir"
- # Backup files
- find ./$udir ${fargs[@]} -type f -print0 |\
- tar -cpf $tmpdir/user_dir/$udir.tar --null -T -
-
- # Backup empty folders
- find ./$udir ${fargs[@]} -type d -empty -print0 |\
- tar -rpf $tmpdir/user_dir/$udir.tar --null -T -
+ # Backup files and dirs
+ tar -cpf $tmpdir/user_dir/$udir.tar $udir
# Compress arhive
gzip -$BACKUP_GZIP $tmpdir/user_dir/$udir.tar
fi
done
set +f
- udir_list=$(echo "$udir_list" | sed -e "s/ */\ /g" -e "s/^ //")
+ udir_list=$(echo "$udir_list" |sed -e "s/ */\ /g" -e "s/^ //")
# Print total
if [ "$i" -eq 1 ]; then
@@ -526,7 +510,7 @@ if [ "$USER" != '*' ]; then
fi
# Get backup size
-size="$(du -shm $tmpdir | cut -f 1)"
+size="$(du -shm $tmpdir |cut -f 1)"
# Get current time
end_time=$(date '+%s')
@@ -540,15 +524,15 @@ local_backup(){
rm -f $BACKUP/$user.$DATE.tar
# Checking retention
- backup_list=$(ls -lrt $BACKUP/ | awk '{print $9}' |grep "^$user\.")
- backups_count=$(echo "$backup_list" | wc -l)
+ backup_list=$(ls -lrt $BACKUP/ |awk '{print $9}' |grep "^$user\.")
+ backups_count=$(echo "$backup_list" |wc -l)
if [ "$BACKUPS" -le "$backups_count" ]; then
backups_rm_number=$((backups_count - BACKUPS))
(( ++backups_rm_number))
# Removing old backup
- for backup in $(echo "$backup_list" | head -n $backups_rm_number); do
- backup_date=$(echo $backup | sed -e "s/$user.//" -e "s/.tar$//")
+ for backup in $(echo "$backup_list" |head -n $backups_rm_number); do
+ backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar$//")
echo -e "$(date "+%F %T") Roated: $backup_date"
msg="$msg\n$(date "+%F %T") Rotated: $backup_date"
rm -f $BACKUP/$backup
@@ -576,7 +560,7 @@ local_backup(){
localbackup='yes'
echo -e "$(date "+%F %T") Local: $BACKUP/$user.$DATE.tar"
msg="$msg\n$(date "+%F %T") Local: $BACKUP/$user.$DATE.tar"
- U_BACKUPS=$(ls $BACKUP/ | grep "^$user." | wc -l)
+ U_BACKUPS=$(ls $BACKUP/ |grep "^$user." |wc -l)
update_user_value "$user" '$U_BACKUPS' "$U_BACKUPS"
}
@@ -599,7 +583,7 @@ ftp_backup() {
# Checking config
if [ ! -e "$VESTA/conf/ftp.backup.conf" ]; then
ftp_conf_error="Can't open $VESTA/conf/ftp.backup.conf"
- echo "$ftp_conf_error" | $send_mail -s "$subj" $email
+ echo "$ftp_conf_error" |$send_mail -s "$subj" $email
echo "Error: $VESTA/conf/ftp.backup.conf doesn't exist"
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
log_event "$E_NOTEXIST" "$EVENT"
@@ -663,11 +647,11 @@ ftp_backup() {
# Checking retention
backup_list=$(ftpc "cd $BPATH" "ls" |awk '{print $9}' |grep "^$user\.")
- backups_count=$(echo "$backup_list" | wc -l)
+ 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
- backup_date=$(echo $backup | sed -e "s/$user.//" -e "s/.tar$//")
+ for backup in $(echo "$backup_list" |head -n $backups_rm_number); do
+ backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar$//")
echo -e "$(date "+%F %T") Roated ftp backup: $backup_date"
msg="$msg\n$(date "+%F %T") Roated ftp backup: $backup_date"
ftpc "cd $BPATH" "delete $backup"
@@ -750,7 +734,7 @@ sftp_backup() {
# Checking config
if [ ! -e "$VESTA/conf/sftp.backup.conf" ]; then
sftp_conf_error="Can't open $VESTA/conf/sftp.backup.conf"
- echo "$sftp_conf_error" | $send_mail -s "$subj" $email
+ echo "$sftp_conf_error" |$send_mail -s "$subj" $email
echo "Error: $VESTA/conf/sftp.backup.conf doesn't exist"
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
log_event "$E_NOTEXIST" "$EVENT"
@@ -803,11 +787,11 @@ sftp_backup() {
# Checking retention
backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}' |grep "^$user\.")
- backups_count=$(echo "$backup_list" | wc -l)
+ 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
- backup_date=$(echo $backup | sed -e "s/$user.//" -e "s/.tar.*$//")
+ for backup in $(echo "$backup_list" |head -n $backups_rm_number); do
+ backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar.*$//")
echo -e "$(date "+%F %T") Roated sftp backup: $backup_date"
msg="$msg\n$(date "+%F %T") Roated sftp backup: $backup_date"
sftpc "cd $BPATH" "rm $backup" > /dev/null 2>&1
@@ -869,7 +853,7 @@ msg="$msg\n$(date "+%F %T") Runtime: $run_time $min"
touch $USER_DATA/backup.conf
sed -i "/$user.$DATE.tar/d" $USER_DATA/backup.conf
-# Regestering new backup
+# Registering new backup
backup_str="BACKUP='$user.$DATE.tar'"
backup_str="$backup_str TYPE='$BACKUP_SYSTEM' SIZE='$size'"
backup_str="$backup_str WEB='${web_list// /,}'"
@@ -893,7 +877,7 @@ sed -i "/v-backup-user $user /d" $VESTA/data/queue/backup.pipe
if [ "$notify" != 'no' ]; then
subj="$user → backup has been completed"
email=$(get_user_value '$CONTACT')
- echo -e "$msg" | $send_mail -s "$subj" $email
+ echo -e "$msg" |$send_mail -s "$subj" $email
fi
# Logging
diff --git a/bin/v-backup-users b/bin/v-backup-users
index efac63787..3473ad70c 100755
--- a/bin/v-backup-users
+++ b/bin/v-backup-users
@@ -9,8 +9,8 @@
# Variable&Function #
#----------------------------------------------------------#
-# Importing system enviroment as we run this script
-# mostly by cron wich not read it by itself
+# Importing system environment as we run this script
+# mostly by cron which not read it by itself
source /etc/profile
# Includes
@@ -22,6 +22,8 @@ source $VESTA/conf/vesta.conf
# Action #
#----------------------------------------------------------#
+$BIN/v-check-vesta-license >/dev/null
+
if [ -z "$BACKUP_SYSTEM" ]; then
exit
fi
diff --git a/bin/v-change-cron-job b/bin/v-change-cron-job
index 31fb7ad2f..c38ad7e9e 100755
--- a/bin/v-change-cron-job
+++ b/bin/v-change-cron-job
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
job=$2
min=$3
@@ -64,11 +64,9 @@ sync_cron_jobs
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Cron restart failed" >/dev/null
# Logging
log_history "changed cron job $job"
diff --git a/bin/v-change-database-host-password b/bin/v-change-database-host-password
index 9c0c037ad..abe8e06b9 100755
--- a/bin/v-change-database-host-password
+++ b/bin/v-change-database-host-password
@@ -9,21 +9,17 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
dbuser=$3
-password=$4
+password=$4; HIDE=4
# Includes
source $VESTA/func/main.sh
source $VESTA/func/db.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-change-database-owner b/bin/v-change-database-owner
index 3eb207c0a..166528f81 100755
--- a/bin/v-change-database-owner
+++ b/bin/v-change-database-owner
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
database=$1
user=$2
diff --git a/bin/v-change-database-password b/bin/v-change-database-password
index 152791902..1272f00ad 100755
--- a/bin/v-change-database-password
+++ b/bin/v-change-database-password
@@ -10,20 +10,16 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
-password=$3
+password=$3; HIDE=3
# Includes
source $VESTA/func/main.sh
source $VESTA/func/db.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A3='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-change-database-user b/bin/v-change-database-user
index 90262d454..332dfc103 100755
--- a/bin/v-change-database-user
+++ b/bin/v-change-database-user
@@ -9,11 +9,11 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
dbuser="$user"_"$3"
-password=$4
+password=$4; HIDE=4
# Includes
source $VESTA/func/main.sh
@@ -21,10 +21,6 @@ source $VESTA/func/db.sh
source $VESTA/func/rebuild.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-change-dns-domain-exp b/bin/v-change-dns-domain-exp
index 4d5bc5824..da75bca81 100755
--- a/bin/v-change-dns-domain-exp
+++ b/bin/v-change-dns-domain-exp
@@ -1,5 +1,5 @@
#!/bin/bash
-# info: change dns domain expiriation date
+# info: change dns domain expiration date
# options: USER DOMAIN EXP
#
# The function of changing the term of expiration domain's registration. The
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -57,7 +57,7 @@ fi
#----------------------------------------------------------#
# Logging
-log_history "changed whois expiriation date for $domain"
+log_history "changed whois expiration date for $domain"
log_event "$OK" "$EVENT"
exit
diff --git a/bin/v-change-dns-domain-ip b/bin/v-change-dns-domain-ip
index f587a4746..a066c6be7 100755
--- a/bin/v-change-dns-domain-ip
+++ b/bin/v-change-dns-domain-ip
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -51,6 +51,7 @@ sed -i "s/$old/$ip/g" $USER_DATA/dns/$domain.conf
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -59,7 +60,7 @@ if [ ! -z "$DNS_CLUSTER" ]; then
# Check for first sync
dlock=$(grep "domain $user $domain" $VESTA/data/queue/dns-cluster.pipe)
if [ -z "$dlock" ]; then
- cmd="$BIN/v-add-remote-dns-domain $user $domain domain"
+ cmd="$BIN/v-add-remote-dns-domain $user $domain domain yes"
echo "$cmd" >> $VESTA/data/queue/dns-cluster.pipe
fi
fi
@@ -69,12 +70,10 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-dns-domain-soa b/bin/v-change-dns-domain-soa
index 0e454e681..3a8670f76 100755
--- a/bin/v-change-dns-domain-soa
+++ b/bin/v-change-dns-domain-soa
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -45,6 +45,7 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$SOA' "$soa"
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -63,12 +64,10 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-dns-domain-tpl b/bin/v-change-dns-domain-tpl
index 255c0a365..e8ee90c6c 100755
--- a/bin/v-change-dns-domain-tpl
+++ b/bin/v-change-dns-domain-tpl
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -67,6 +67,7 @@ records="$(wc -l $USER_DATA/dns/$domain.conf |cut -f 1 -d ' ')"
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -89,12 +90,10 @@ fi
update_object_value 'dns' 'DOMAIN' "$domain" '$TPL' "$template"
update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-dns-domain-ttl b/bin/v-change-dns-domain-ttl
index 3f1bf5ff2..120d7e0db 100755
--- a/bin/v-change-dns-domain-ttl
+++ b/bin/v-change-dns-domain-ttl
@@ -2,14 +2,14 @@
# info: change dns domain ttl
# options: USER DOMAIN TTL
#
-# The function for chaning the time to live TTL parameter for all records.
+# The function for changing the time to live TTL parameter for all records.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -44,6 +44,7 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$TTL' "$ttl"
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -62,12 +63,10 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-dns-record b/bin/v-change-dns-record
index 5fe16a07b..1569ae9c5 100755
--- a/bin/v-change-dns-record
+++ b/bin/v-change-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
@@ -77,6 +77,7 @@ sort_dns_records
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -95,12 +96,10 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-dns-record-id b/bin/v-change-dns-record-id
index c9e128bd8..42ab1d74e 100755
--- a/bin/v-change-dns-record-id
+++ b/bin/v-change-dns-record-id
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
@@ -51,6 +51,7 @@ sort_dns_records
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -69,12 +70,10 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-domain-owner b/bin/v-change-domain-owner
index ef0464861..1943473e4 100755
--- a/bin/v-change-domain-owner
+++ b/bin/v-change-domain-owner
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
domain=$1
user=$2
ip=$3
diff --git a/bin/v-change-firewall-rule b/bin/v-change-firewall-rule
index e7fa16380..806f093bb 100755
--- a/bin/v-change-firewall-rule
+++ b/bin/v-change-firewall-rule
@@ -13,7 +13,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
rule=$1
action=$(echo $2|tr '[:lower:]' '[:upper:]')
ip=$3
diff --git a/bin/v-change-fs-file-permission b/bin/v-change-fs-file-permission
new file mode 100755
index 000000000..29e47babb
--- /dev/null
+++ b/bin/v-change-fs-file-permission
@@ -0,0 +1,51 @@
+#!/bin/bash
+# info: change file permission
+# options: USER FILE PERMISSIONS
+#
+# The function changes file access permissions on the file system
+
+user=$1
+src_file=$2
+permissions=$3
+
+# Checking arguments
+if [ -z "$permissions" ]; then
+ echo "Usage: USER FILE PERMISSIONS"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking source file
+if [ ! -f "$src_file" ]; then
+ echo "Error: source file doesn't exist $src_file"
+ exit 3
+fi
+
+# Checking source path
+rpath=$(readlink -f "$src_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_file"
+ exit 2
+fi
+
+# Changing file permissions
+sudo -u $user chmod $permissions "$src_file" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: access permission on $src_file was not changed"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-change-mail-account-password b/bin/v-change-mail-account-password
index 143468971..3109ea212 100755
--- a/bin/v-change-mail-account-password
+++ b/bin/v-change-mail-account-password
@@ -9,23 +9,19 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
account=$3
-password=$4
+password=$4; HIDE=4
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4='******'
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-change-mail-account-quota b/bin/v-change-mail-account-quota
index 2c9d39242..3055da72e 100755
--- a/bin/v-change-mail-account-quota
+++ b/bin/v-change-mail-account-quota
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-change-mail-domain-catchall b/bin/v-change-mail-domain-catchall
index 7428d5526..97909fd66 100755
--- a/bin/v-change-mail-domain-catchall
+++ b/bin/v-change-mail-domain-catchall
@@ -2,14 +2,14 @@
# info: change mail domain catchall email
# options: USER DOMAIN EMAIL
#
-# The function changes mail domain cathcall.
+# The function changes mail domain catchall.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-change-remote-dns-domain-exp b/bin/v-change-remote-dns-domain-exp
index 9cd4a37bd..a335d63bc 100755
--- a/bin/v-change-remote-dns-domain-exp
+++ b/bin/v-change-remote-dns-domain-exp
@@ -1,5 +1,5 @@
#!/bin/bash
-# info: change remote dns domain expiriation date
+# info: change remote dns domain expiration date
# options: USER DOMAIN
#
# The function synchronize dns domain with the remote server.
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
@@ -28,79 +28,42 @@ validate_format 'user' 'domain'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'dns' 'DOMAIN' "$domain"
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
IFS=$'\n'
+for cluster in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-# Check remote dns nodes
-remote_dns_health_check
+ # Parsing remote host parameters
+ eval $cluster
-for cluster_str in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-
- # Get host values
- eval $cluster_str
-
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Sync domain
+ # Syncing domain
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
- eval $str
- $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'scheduled'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no'
+ check_result $? "$HOST connection failed (exp insert)" $E_CONNECT
done
-# Update pipe
-pipe="$VESTA/data/queue/dns-cluster.pipe"
-str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
-if [ ! -z "$str" ]; then
- sed -i "$str d" $pipe
-fi
-
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
+# Updating pipe
+pipe="$VESTA/data/queue/dns-cluster.pipe"
+str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
+if [ ! -z "$str" ]; then
+ sed -i "$str d" $pipe
+fi
+
exit
diff --git a/bin/v-change-remote-dns-domain-soa b/bin/v-change-remote-dns-domain-soa
index 596954a77..65a0c8dfd 100755
--- a/bin/v-change-remote-dns-domain-soa
+++ b/bin/v-change-remote-dns-domain-soa
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
@@ -28,82 +28,46 @@ validate_format 'user' 'domain'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'dns' 'DOMAIN' "$domain"
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result 1 $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $VESTA/bin/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result 1 $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
IFS=$'\n'
+for cluster in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-# Check remote dns nodes
-remote_dns_health_check
+ # Parsing remote host parameters
+ eval $cluster
-for cluster_str in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-
- # Get host values
- eval $cluster_str
-
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Sync domain
+ # Syncing SOA
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
- eval $str
- $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no'
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'domain' 'no'
+ check_result $? "$HOST connection failed (sync)" $E_CONNECT
- # Rebuild dns zone
- $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (rebuild)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
+ # Rebuilding dns zone
+ cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no'
+ check_result $? "$HOST connection failed (rebuild)" $E_CONNECT
done
-# Update pipe
-pipe="$VESTA/data/queue/dns-cluster.pipe"
-str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
-if [ ! -z "$str" ]; then
- sed -i "$str d" $pipe
-fi
-
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
+# Updating pipe
+pipe="$VESTA/data/queue/dns-cluster.pipe"
+str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
+if [ ! -z "$str" ]; then
+ sed -i "$str d" $pipe
+fi
+
exit
diff --git a/bin/v-change-remote-dns-domain-ttl b/bin/v-change-remote-dns-domain-ttl
index 390ac9baa..b0e45b774 100755
--- a/bin/v-change-remote-dns-domain-ttl
+++ b/bin/v-change-remote-dns-domain-ttl
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
@@ -28,96 +28,46 @@ validate_format 'user' 'domain'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'dns' 'DOMAIN' "$domain"
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
IFS=$'\n'
+for cluster in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-# Check remote dns nodes
-remote_dns_health_check
+ # Parsing remote host parameters
+ eval $cluster
-# Starting cluster loop
-for cluster_str in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-
- # Get host values
- eval $cluster_str
-
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
- $send_cmd v-list-user $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: dns user $DNS_USER doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
- fi
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Sync domain
+ # Syncing TTL
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
- eval $str
- $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no'
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'domain' 'no'
+ check_result $? "$HOST connection failed (sync)" $E_CONNECT
- # Rebuild dns zone
- $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (rebuild)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
+ # Rebuilding dns zone
+ cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no'
+ check_result $? "$HOST connection failed (rebuild)" $E_CONNECT
done
-# Update pipe
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating pipe
pipe="$VESTA/data/queue/dns-cluster.pipe"
str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
if [ ! -z "$str" ]; then
sed -i "$str d" $pipe
fi
-#----------------------------------------------------------#
-# Vesta #
-#----------------------------------------------------------#
-
exit
diff --git a/bin/v-change-sys-config-value b/bin/v-change-sys-config-value
index 7837d8bbb..0af44ee3c 100755
--- a/bin/v-change-sys-config-value
+++ b/bin/v-change-sys-config-value
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
key=$(echo "$1" | tr '[:lower:]' '[:upper:]' )
value=$2
diff --git a/bin/v-change-sys-hostname b/bin/v-change-sys-hostname
index eab206a51..d977f39ff 100755
--- a/bin/v-change-sys-hostname
+++ b/bin/v-change-sys-hostname
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
domain=$1
# Includes
diff --git a/bin/v-change-sys-ip-name b/bin/v-change-sys-ip-name
index 8b3a5ef7d..425efb6ec 100755
--- a/bin/v-change-sys-ip-name
+++ b/bin/v-change-sys-ip-name
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
ip_name=$2
diff --git a/bin/v-change-sys-ip-nat b/bin/v-change-sys-ip-nat
index 8d34b8642..a76e8878c 100755
--- a/bin/v-change-sys-ip-nat
+++ b/bin/v-change-sys-ip-nat
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
nat_ip=$2
restart=$3
@@ -77,9 +77,7 @@ fi
# Restart ftp server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-ftp
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "FTP restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-sys-ip-owner b/bin/v-change-sys-ip-owner
index 0fe37ddc4..3fbfc43ee 100755
--- a/bin/v-change-sys-ip-owner
+++ b/bin/v-change-sys-ip-owner
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
user=$2
diff --git a/bin/v-change-sys-ip-status b/bin/v-change-sys-ip-status
index 30f00254e..907c9e964 100755
--- a/bin/v-change-sys-ip-status
+++ b/bin/v-change-sys-ip-status
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
ip_status=$2
diff --git a/bin/v-change-sys-language b/bin/v-change-sys-language
index 358a143e6..5b79b0f4a 100755
--- a/bin/v-change-sys-language
+++ b/bin/v-change-sys-language
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
language=$1
# Includes
diff --git a/bin/v-change-sys-timezone b/bin/v-change-sys-timezone
index b66a65afc..d168d13a2 100755
--- a/bin/v-change-sys-timezone
+++ b/bin/v-change-sys-timezone
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
timezone=$1
# Includes
diff --git a/bin/v-change-user-contact b/bin/v-change-user-contact
index a9bc75eeb..4228e5aab 100755
--- a/bin/v-change-user-contact
+++ b/bin/v-change-user-contact
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
email=$2
diff --git a/bin/v-change-user-language b/bin/v-change-user-language
index c6e7b0cbf..dceda7d2f 100755
--- a/bin/v-change-user-language
+++ b/bin/v-change-user-language
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
language=$2
@@ -19,9 +19,14 @@ source $VESTA/conf/vesta.conf
is_language_valid() {
- if [ ! -e "$VESTA/web/inc/i18n/$language.php" ]; then
- echo "Error: language $language not exist"
- log_event "$E_NOTEXIST $EVENT"
+ if ! [[ "$1" =~ ^[[:alnum:]_-]+$ ]]; then
+ echo "Error: language $1 is not valid"
+ log_event "$E_INVALID" "$EVENT"
+ exit $E_INVALID
+ fi
+ if [ ! -e "$VESTA/web/inc/i18n/$1.php" ]; then
+ echo "Error: language $1 doesn't exist"
+ log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST
fi
}
diff --git a/bin/v-change-user-name b/bin/v-change-user-name
index 9cbecc596..41223181d 100755
--- a/bin/v-change-user-name
+++ b/bin/v-change-user-name
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
fname=$2
lname=$3
diff --git a/bin/v-change-user-ns b/bin/v-change-user-ns
index a799257c9..02f06ff0b 100755
--- a/bin/v-change-user-ns
+++ b/bin/v-change-user-ns
@@ -1,20 +1,24 @@
#!/bin/bash
# info: change user nameservers
-# options: USER NS1 NS2 [NS3] [NS4]
+# options: USER NS1 NS2 [NS3] [NS4] [NS5] [NS6] [NS7] [NS8]
#
-# The function for changing default nameservers for speciefic user.
+# The function for changing default nameservers for specific user.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
ns1=$(echo $2 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns2=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
-ns3=$4
-ns4=$5
+ns3=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ns4=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ns5=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ns6=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ns7=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ns8=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g')
# Includes
source $VESTA/func/main.sh
@@ -26,10 +30,10 @@ source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Checking args
-check_args '3' "$#" 'USER NS1 NS2 [NS3] [NS4]'
+check_args '3' "$#" 'USER NS1 NS2 [NS3] [NS4] [NS5] [NS6] [NS7] [NS8]'
# Checking argument format
-validate_format 'user' 'ns1' 'ns2'
+validate_format 'user' 'ns1' 'ns2'
if [ ! -z "$ns3" ]; then
ns3=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g')
validate_format 'ns3'
@@ -38,7 +42,22 @@ if [ ! -z "$ns4" ]; then
ns4=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
validate_format 'ns4'
fi
-
+if [ ! -z "$ns5" ]; then
+ ns5=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns5'
+fi
+if [ ! -z "$ns6" ]; then
+ ns6=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns6'
+fi
+if [ ! -z "$ns7" ]; then
+ ns7=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns7'
+fi
+if [ ! -z "$ns8" ]; then
+ ns8=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+ validate_format 'ns8'
+fi
is_object_valid 'user' 'USER' "$user"
is_object_unsuspended 'user' 'USER' "$user"
@@ -48,7 +67,7 @@ is_object_unsuspended 'user' 'USER' "$user"
#----------------------------------------------------------#
# Merging values
-ns="$ns1,$ns2,$ns3,$ns4"
+ns="$ns1,$ns2,$ns3,$ns4,$ns5,$ns6,$ns7,$ns8"
ns=$(echo "$ns" | sed -e "s/,,//g" -e "s/,$//")
# Changing ns values
@@ -60,7 +79,7 @@ update_user_value "$user" '$NS' "$ns"
#----------------------------------------------------------#
# Logging
-log_history "changed user nameservers to $ns1, $ns2"
+log_history "updated nameservers $ns1 $ns2 $ns3 $ns4 $ns5 $ns6 $ns7 $ns8"
log_event "$OK" "$EVENT"
exit
diff --git a/bin/v-change-user-package b/bin/v-change-user-package
index d9b0b756d..80dd20464 100755
--- a/bin/v-change-user-package
+++ b/bin/v-change-user-package
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
package=$2
force=$3
@@ -148,6 +148,7 @@ U_DATABASES='$U_DATABASES'
U_CRON_JOBS='$U_CRON_JOBS'
U_BACKUPS='$U_BACKUPS'
LANGUAGE='$LANGUAGE'
+NOTIFICATIONS='$NOTIFICATIONS'
TIME='$TIME'
DATE='$DATE'" > $USER_DATA/user.conf
}
diff --git a/bin/v-change-user-password b/bin/v-change-user-password
index 903224d7b..af194361d 100755
--- a/bin/v-change-user-password
+++ b/bin/v-change-user-password
@@ -9,18 +9,14 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
-password=$2
+password=$2; HIDE=2
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A2="******"
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-change-user-shell b/bin/v-change-user-shell
index f533d43c3..721c84755 100755
--- a/bin/v-change-user-shell
+++ b/bin/v-change-user-shell
@@ -2,14 +2,14 @@
# info: change user shell
# options: USER SHELL
#
-# The function changes system shell of a user. Shell gives abilty to use ssh.
+# The function changes system shell of a user. Shell gives ability to use ssh.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
shell=$2
@@ -36,9 +36,18 @@ is_object_unsuspended 'user' 'USER' "$user"
shell_path=$(grep -w "$shell" /etc/shells | head -n1)
# Changing passwd file
-/usr/bin/chsh -s "$shell_path" "$user" &>/dev/null
+/usr/bin/chsh -s "$shell_path" "$user" >/dev/null 2>&1
shell=$(basename $shell_path)
+# Adding jailed sftp env
+if [ ! -z "$SFTPJAIL_KEY" ]; then
+ if [[ "$shell" =~ nologin ]] || [[ "$shell" =~ rssh ]]; then
+ $BIN/v-add-user-sftp-jail $user >/dev/null 2>&1
+ else
+ $BIN/v-delete-user-sftp-jail $user >/dev/null 2>&1
+ fi
+fi
+
#----------------------------------------------------------#
# Vesta #
diff --git a/bin/v-change-user-template b/bin/v-change-user-template
index 465b07097..a67bfc3d8 100755
--- a/bin/v-change-user-template
+++ b/bin/v-change-user-template
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
type=$(echo "$2" | tr '[:lower:]' '[:upper:]')
template=$3
@@ -37,7 +37,7 @@ is_object_unsuspended 'user' 'USER' "$user"
case $type in
WEB) is_web_template_valid;
update_user_value "$user" '$WEB_TEMPLATE' "$template";;
- PROXY) is_proxy_template_valid;
+ PROXY) is_proxy_template_valid $template;
update_user_value "$user" '$PROXY_TEMPLATE' "$template";;
DNS) is_dns_template_valid;
update_user_value "$user" '$DNS_TEMPLATE' "$template";;
diff --git a/bin/v-change-web-domain-backend-tpl b/bin/v-change-web-domain-backend-tpl
index bce3d5f9f..91f6f3c20 100755
--- a/bin/v-change-web-domain-backend-tpl
+++ b/bin/v-change-web-domain-backend-tpl
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -155,16 +155,13 @@ fi
#----------------------------------------------------------#
-# Restart web
+# Restarting web
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
+
$BIN/v-restart-web-backend
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web backend restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-web-domain-ftp-password b/bin/v-change-web-domain-ftp-password
index e01b250ff..900c6fa30 100755
--- a/bin/v-change-web-domain-ftp-password
+++ b/bin/v-change-web-domain-ftp-password
@@ -9,22 +9,18 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
ftp_user=$3
-password=$4
+password=$4; HIDE=4
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
-# Hiding password
-A4="******"
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
-
#----------------------------------------------------------#
# Verifications #
diff --git a/bin/v-change-web-domain-ftp-path b/bin/v-change-web-domain-ftp-path
index f4489c0a1..71da7d853 100755
--- a/bin/v-change-web-domain-ftp-path
+++ b/bin/v-change-web-domain-ftp-path
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-change-web-domain-httpauth b/bin/v-change-web-domain-httpauth
new file mode 100755
index 000000000..3483838c1
--- /dev/null
+++ b/bin/v-change-web-domain-httpauth
@@ -0,0 +1,76 @@
+#!/bin/bash
+# info: change password for http auth user
+# options: USER DOMAIN AUTH_USER AUTH_PASSWORD
+#
+# The call is used for changing http auth user password
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+auth_user=$3
+password=$4; HIDE=4
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/func/domain.sh
+source $VESTA/conf/vesta.conf
+
+# Defining htpasswd file
+htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '4' "$#" 'USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]'
+validate_format 'user' 'domain'
+is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+is_object_valid 'web' 'DOMAIN' "$domain"
+is_object_unsuspended 'web' 'DOMAIN' "$domain"
+is_password_valid
+get_domain_values 'web'
+if [ -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then
+ echo "Error: auth user $auth_user doesn't exist"
+ log_event "$E_NOTEXIST" "$EVENT"
+ exit $E_NOTEXIST
+fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Adding httpasswd user
+auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password)
+touch $htpasswd
+sed -i "/^$auth_user:/d" $htpasswd
+echo "$auth_user:$auth_hash" >> $htpasswd
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Rebuilding AUTH_HASH variable
+position=$(echo $AUTH_USER |tr ':' '\n' |grep -n '' |grep ":$auth_user$" |\
+ cut -f 1 -d:)
+auth_hash=$(echo $AUTH_HASH |tr ':' '\n' |grep -n '' |\
+ sed -e "s%^$position:.*%$position:$auth_hash%" |\
+ cut -f 2 -d :| sed -e "/^$/d"| sed -e ':a;N;$!ba;s/\n/:/g')
+
+# Updating config
+update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash"
+
+# Logging
+log_history "changed auth user $httpauth_user password on $domain"
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-change-web-domain-ip b/bin/v-change-web-domain-ip
index 4ad36a5a5..22aaca855 100755
--- a/bin/v-change-web-domain-ip
+++ b/bin/v-change-web-domain-ip
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -59,17 +59,17 @@ if [ "$SSL" = 'yes' ]; then
fi
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
replace_web_config
-fi
-# Checking SSL proxy
-if [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then
- tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
- conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
- replace_web_config
+ # Checking SSL proxy
+ if [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then
+ tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+ conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+ replace_web_config
+ fi
fi
@@ -87,13 +87,11 @@ update_object_value 'web' 'DOMAIN' "$domain" '$IP' "$3"
# Restart web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "WEB restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-change-web-domain-proxy-tpl b/bin/v-change-web-domain-proxy-tpl
index 605d40f38..be74713d2 100755
--- a/bin/v-change-web-domain-proxy-tpl
+++ b/bin/v-change-web-domain-proxy-tpl
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -39,7 +39,7 @@ is_object_unsuspended 'user' 'USER' "$user"
is_object_valid 'web' 'DOMAIN' "$domain"
is_object_unsuspended 'web' 'DOMAIN' "$domain"
is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY'
-is_proxy_template_valid
+is_proxy_template_valid $template
#----------------------------------------------------------#
@@ -87,16 +87,14 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Update config
+# Updating config
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
-# Restart web
+# Restarting proxy
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-change-web-domain-sslcert b/bin/v-change-web-domain-sslcert
index 7b6b77037..376241946 100755
--- a/bin/v-change-web-domain-sslcert
+++ b/bin/v-change-web-domain-sslcert
@@ -1,6 +1,6 @@
#!/bin/bash
# info: change domain ssl certificate
-# options: USER DOMAIN SSL_DIR
+# options: USER DOMAIN SSL_DIR [RESTART]
#
# The function changes SSL domain certificate and the key. If ca file present
# it will be replaced as well.
@@ -10,11 +10,12 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
ssl_dir=$3
+restart=$4
# Includes
source $VESTA/func/main.sh
@@ -26,7 +27,7 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '3' "$#" 'USER DOMAIN SSL_DIR'
+check_args '3' "$#" 'USER DOMAIN SSL_DIR [RESTART]'
validate_format 'user' 'domain' 'ssl_dir'
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
is_object_valid 'user' 'USER' "$user"
@@ -69,15 +70,15 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart web server
-$BIN/v-restart-web
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+# Restarting web server
+if [ "$restart" != 'no' ]; then
+ $BIN/v-restart-web
+ check_result $? "Web restart failed" >/dev/null
-$BIN/v-restart-proxy
-if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
+ fi
fi
# Logging
diff --git a/bin/v-change-web-domain-sslhome b/bin/v-change-web-domain-sslhome
index 06128dc3e..52399ef8f 100755
--- a/bin/v-change-web-domain-sslhome
+++ b/bin/v-change-web-domain-sslhome
@@ -5,11 +5,12 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
ssl_home=$3
+restart=$4
# Includes
source $VESTA/func/main.sh
@@ -21,7 +22,7 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '3' "$#" 'USER DOMAIN SSL_HOME'
+check_args '3' "$#" 'USER DOMAIN SSL_HOME [RESTART]'
validate_format 'user' 'domain'
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
is_object_valid 'user' 'USER' "$user"
@@ -55,7 +56,7 @@ esac
replace_web_config
# Checking proxy config
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
replace_web_config
@@ -69,15 +70,15 @@ fi
# Update config
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
-# Restart web server
-$BIN/v-restart-web
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+# Restarting web server
+if [ "$restart" != 'no' ]; then
+ $BIN/v-restart-web
+ check_result $? "Web restart failed" >/dev/null
-$BIN/v-restart-proxy
-if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
+ fi
fi
# Logging
diff --git a/bin/v-change-web-domain-stats b/bin/v-change-web-domain-stats
index 11f59e986..a341f6427 100755
--- a/bin/v-change-web-domain-stats
+++ b/bin/v-change-web-domain-stats
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl
index a046220c5..6d7d51b7b 100755
--- a/bin/v-change-web-domain-tpl
+++ b/bin/v-change-web-domain-tpl
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -93,12 +93,10 @@ fi
# Changing tpl in config
update_object_value 'web' 'DOMAIN' "$domain" '$TPL' "$template"
-# Restart web
+# Restarting web
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-check-fs-permission b/bin/v-check-fs-permission
new file mode 100755
index 000000000..00e5482af
--- /dev/null
+++ b/bin/v-check-fs-permission
@@ -0,0 +1,46 @@
+#!/bin/bash
+# info: open file
+# options: USER FILE
+#
+# The function opens/reads files on the file system
+
+user=$1
+src=$2
+
+# Checking arguments
+if [ -z "$src" ]; then
+ echo "Usage: USER FILE"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking path
+if [ ! -z "$src" ]; then
+ rpath=$(readlink -f "$src")
+ if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $user $src"
+ exit 2
+ fi
+fi
+
+# Checking if file has readable permission
+sudo -u $user ls "$src" > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: can't read $src"
+ exit 1
+fi
+
+# Exiting
+exit
diff --git a/bin/v-check-user-password b/bin/v-check-user-password
index 460d8b012..1eecc3dd3 100755
--- a/bin/v-check-user-password
+++ b/bin/v-check-user-password
@@ -9,9 +9,9 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
-password=$2
+password=$2; HIDE=2
ip=${3-127.0.0.1}
# Includes
@@ -29,7 +29,7 @@ validate_format 'user'
# Checking user
if [ ! -d "$VESTA/data/users/$user" ] && [ "$user" != 'root' ]; then
echo "Error: password missmatch"
- echo "$DATE $user $ip failed to login" >> $VESTA/log/auth.log
+ echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log
exit 9
fi
@@ -39,7 +39,7 @@ is_password_valid
# Checking empty password
if [[ -z "$password" ]]; then
echo "Error: password missmatch"
- echo "$DATE $user $ip failed to login" >> $VESTA/log/auth.log
+ echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log
exit 9
fi
@@ -60,7 +60,7 @@ fi
if [ -z "$salt" ]; then
echo "Error: password missmatch"
- echo "$DATE $user $ip failed to login" >> $VESTA/log/auth.log
+ echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log
exit 9
fi
@@ -68,7 +68,7 @@ fi
hash=$($BIN/v-generate-password-hash $method $salt <<< $password)
if [[ -z "$hash" ]]; then
echo "Error: password missmatch"
- echo "$DATE $user $ip failed to login" >> $VESTA/log/auth.log
+ echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log
exit 9
fi
@@ -76,7 +76,7 @@ fi
result=$(grep "^$user:$hash:" /etc/shadow 2>/dev/null)
if [[ -z "$result" ]]; then
echo "Error: password missmatch"
- echo "$DATE $user $ip failed to login" >> $VESTA/log/auth.log
+ echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log
exit 9
fi
@@ -86,6 +86,6 @@ fi
#----------------------------------------------------------#
# Logging
-echo "$DATE $user $ip successfully logged in" >> $VESTA/log/auth.log
+echo "$DATE $TIME $user $ip successfully logged in" >> $VESTA/log/auth.log
exit
diff --git a/bin/v-check-vesta-license b/bin/v-check-vesta-license
new file mode 100755
index 000000000..7fa1a12cd
--- /dev/null
+++ b/bin/v-check-vesta-license
@@ -0,0 +1,63 @@
+#!/bin/bash
+# info: check vesta license
+# options: [MODULE]
+#
+# The function activates and register vesta license
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+module=$(echo $1 | tr '[:lower:]' '[:upper:]')
+
+# Importing system environment
+source /etc/profile
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking module
+if [ -z "$module" ]; then
+ modules=$(grep _KEY= $VESTA/conf/vesta.conf)
+else
+ modules=$(grep "${module}_KEY" $VESTA/conf/vesta.conf)
+fi
+
+IFS=$'\n'
+for str in $modules; do
+ module=$(echo "$str" |cut -f 1 -d _)
+ license=$(echo "$str" |cut -f 2 -d \')
+ if [ ! -z "$license" ]; then
+ v_host='https://vestacp.com/checkout'
+ answer=$(curl -s "$v_host/check.php?licence_key=$license&module=$module")
+ check_result $? "cant' connect to vestacp.com " 0
+ echo "$module $license $answer"
+ if [[ "$answer" != '0' ]]; then
+ if [ "$module" = 'SFTPJAIL' ]; then
+ setsid $BIN/v-delete-sys-sftp-jail 2>/dev/null
+ fi
+ sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" \
+ $VESTA/conf/vesta.conf
+ fi
+ fi
+done
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-copy-fs-directory b/bin/v-copy-fs-directory
new file mode 100755
index 000000000..11c647ed7
--- /dev/null
+++ b/bin/v-copy-fs-directory
@@ -0,0 +1,58 @@
+#!/bin/bash
+# info: copy directory
+# options: USER SRC_DIRECTORY DST_DIRECTORY
+#
+# The function copies directory on the file system
+
+user=$1
+src_dir=$2
+dst_dir=$3
+
+# Checking arguments
+if [ -z "$dst_dir" ]; then
+ echo "Usage: USER SRC_DIRECTORY DST_DIRECTORY"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking source dir
+if [ ! -e "$src_dir" ]; then
+ echo "Error: source directory $src_dir doesn't exist"
+ exit 3
+fi
+
+# Checking source path
+rpath=$(readlink -f "$src_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_dir"
+ exit 2
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_dir"
+ exit 2
+fi
+
+# Copying directory
+sudo -u $user cp -r "$src_dir" "$dst_dir" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: directory $src_dir was not copied"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-copy-fs-file b/bin/v-copy-fs-file
index a3004654b..792956ecf 100755
--- a/bin/v-copy-fs-file
+++ b/bin/v-copy-fs-file
@@ -1,58 +1,58 @@
#!/bin/bash
-# File copier
+# info: copy file
+# options: USER SRC_FILE DST_FLE
+#
+# The function copies file on the file system
user=$1
-file_src=$2
-file_dst=$3
+src_file=$2
+dst_file=$3
# Checking arguments
-if [ -z "$file_dst" ]; then
+if [ -z "$dst_file" ]; then
echo "Usage: USER SRC_FILE DST_FILE"
exit 1
fi
-# Checking users
+# Checking vesta user
if [ ! -e "$VESTA/data/users/$user" ]; then
- exit 1
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
fi
-# Checking homedir
+# Checking user homedir
homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
if [ -z $homedir ]; then
- exit 1
+ echo "Error: user home directory doesn't exist"
+ exit 12
fi
# Checking source file
-if [ ! -e "$file_src" ]; then
- exit 1
+if [ ! -f "$src_file" ]; then
+ echo "Error: $src_file doesn't exist"
+ exit 3
fi
# Checking source path
-rpath=$(readlink -f "$file_src")
-if [ -z "$(echo $rpath |grep ^/tmp)" ]; then
- exit 1
+rpath=$(readlink -f "$src_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_file"
+ exit 2
fi
# Checking destination path
-rpath=$(readlink -f "$file_dst")
-if [ -z "$(echo $rpath |grep ^$homedir)" ]; then
- exit 1
-fi
-
-# Checking dst file permission
-if [ -e "$file_dst" ]; then
- perms=$(stat --format '%a' $file_dst)
+rpath=$(readlink -f "$dst_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: ivalid destination path $dst_file"
+ exit 2
fi
# Copying file
-cp $file_src $file_dst
-
-# Changing ownership
-chown $user:$user $file_dst
-
-# Changin permissions
-if [ ! -z "$perms" ]; then
- chmod $perms $file_dst
+sudo -u $user cp "$src_file" "$dst_file" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: file $src_file was not copied"
+ exit 3
fi
+# Exiting
exit
diff --git a/bin/v-deactivate-vesta-license b/bin/v-deactivate-vesta-license
new file mode 100755
index 000000000..13a400aba
--- /dev/null
+++ b/bin/v-deactivate-vesta-license
@@ -0,0 +1,65 @@
+#!/bin/bash
+# info: deactivate vesta license
+# options: MODULE LICENSE
+#
+# The function activates and register vesta license
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+module=$(echo $1 | tr '[:lower:]' '[:upper:]')
+license=$2
+
+# Importing system environment
+source /etc/profile
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+# Checking arg number
+check_args '2' "$#" 'MODULE LICENSE'
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Activating license
+v_host='https://vestacp.com/checkout'
+answer=$(curl -s $v_host/cancel.php?licence_key=$license)
+check_result $? "cant' connect to vestacp.com " $E_CONNECT
+
+# Checking server answer
+if [[ "$answer" != '0' ]]; then
+ echo "Error: $module license $license is invalid"
+ exit $E_INVALID
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating vesta.conf
+if [ ! -z "$(grep "${module}_KEY" $VESTA/conf/vesta.conf)" ]; then
+ sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" $VESTA/conf/vesta.conf
+fi
+
+# Deactivating sftpjail
+if [ "$module" = 'SFTPJAIL' ]; then
+ setsid $BIN/v-delete-sys-sftp-jail 2>/dev/null
+fi
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-backup-host b/bin/v-delete-backup-host
index ce63aa12e..21e272218 100755
--- a/bin/v-delete-backup-host
+++ b/bin/v-delete-backup-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
# Includes
diff --git a/bin/v-delete-cron-job b/bin/v-delete-cron-job
index f47bbc92c..d41e0141d 100755
--- a/bin/v-delete-cron-job
+++ b/bin/v-delete-cron-job
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
job=$2
@@ -52,11 +52,9 @@ sync_cron_jobs
# Decreasing cron value
decrease_user_value "$user" '$U_CRON_JOBS'
-# Restart crond
+# Restarting crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Restart restart failed" >/dev/null
# Logging
log_history "deleted cron job $job"
diff --git a/bin/v-delete-cron-reports b/bin/v-delete-cron-reports
index 247f17b13..65c219a73 100755
--- a/bin/v-delete-cron-reports
+++ b/bin/v-delete-cron-reports
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
@@ -44,11 +44,9 @@ sync_cron_jobs
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Cron restart failed" >/dev/null
# Logging
log_history "disabled cron reporting"
diff --git a/bin/v-delete-cron-restart-job b/bin/v-delete-cron-restart-job
index 5876ba3b9..0b27db2bb 100755
--- a/bin/v-delete-cron-restart-job
+++ b/bin/v-delete-cron-restart-job
@@ -1,6 +1,6 @@
#!/bin/bash
# info: delete restart job
-# opions: NONE
+# options: NONE
#
# The script for disabling restart cron tasks
diff --git a/bin/v-delete-cron-vesta-autoupdate b/bin/v-delete-cron-vesta-autoupdate
index ee5f74a6b..ec38facfe 100755
--- a/bin/v-delete-cron-vesta-autoupdate
+++ b/bin/v-delete-cron-vesta-autoupdate
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=admin
# Includes
@@ -51,11 +51,9 @@ sync_cron_jobs
# Decreasing cron value
decrease_user_value "$user" '$U_CRON_JOBS'
-# Restart crond
+# Restarting crond
$BIN/v-restart-cron
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Cron restart failed" >/dev/null
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-delete-database b/bin/v-delete-database
index 7257f85d7..e67eda7f1 100755
--- a/bin/v-delete-database
+++ b/bin/v-delete-database
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
diff --git a/bin/v-delete-database-host b/bin/v-delete-database-host
index fe6f3db78..a5e8a91f0 100755
--- a/bin/v-delete-database-host
+++ b/bin/v-delete-database-host
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
diff --git a/bin/v-delete-databases b/bin/v-delete-databases
index cb1421314..6edf5fb9f 100755
--- a/bin/v-delete-databases
+++ b/bin/v-delete-databases
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-delete-dns-domain b/bin/v-delete-dns-domain
index 18e41337c..b12d62961 100755
--- a/bin/v-delete-dns-domain
+++ b/bin/v-delete-dns-domain
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
restart="$3"
@@ -71,12 +71,10 @@ rm -f $USER_DATA/dns/$domain.conf
decrease_user_value "$user" '$U_DNS_DOMAINS'
decrease_user_value "$user" '$U_DNS_RECORDS' "$records"
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-delete-dns-domains b/bin/v-delete-dns-domains
index da97aa69e..785e3d5b8 100755
--- a/bin/v-delete-dns-domains
+++ b/bin/v-delete-dns-domains
@@ -9,8 +9,9 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
+restart=$2
# Includes
source $VESTA/func/main.sh
@@ -41,10 +42,10 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart named
-$BIN/v-restart-dns
-if [ $? -ne 0 ]; then
- exit $E_RESTART
+# Restarting named
+if [ "$restart" != 'no' ]; then
+ $BIN/v-restart-dns
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-delete-dns-domains-src b/bin/v-delete-dns-domains-src
index dd646b705..22f039841 100755
--- a/bin/v-delete-dns-domains-src
+++ b/bin/v-delete-dns-domains-src
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
src=$2
restart=$3
@@ -46,9 +46,7 @@ done
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-delete-dns-on-web-alias b/bin/v-delete-dns-on-web-alias
index 0a574bd5d..6cd93dff9 100755
--- a/bin/v-delete-dns-on-web-alias
+++ b/bin/v-delete-dns-on-web-alias
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(echo $2 | sed -e 's/\.*$//g' -e 's/^\.*//g')
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-delete-dns-record b/bin/v-delete-dns-record
index d5749d190..f838b9a0a 100755
--- a/bin/v-delete-dns-record
+++ b/bin/v-delete-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -45,6 +45,7 @@ sed -i "/^ID='$id'/d" $USER_DATA/dns/$domain.conf
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -68,12 +69,10 @@ records="$(wc -l $USER_DATA/dns/$domain.conf | cut -f1 -d ' ')"
update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
decrease_user_value "$user" '$U_DNS_RECORDS'
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-delete-domain b/bin/v-delete-domain
index deb4f2164..a1fff5ea8 100755
--- a/bin/v-delete-domain
+++ b/bin/v-delete-domain
@@ -9,14 +9,13 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
restart="${3-yes}"
# Includes
source $VESTA/func/main.sh
-source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
@@ -34,51 +33,53 @@ is_object_unsuspended 'user' 'USER' "$user"
# Action #
#----------------------------------------------------------#
-# Web domain
-if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
- check_web=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf)
- if [ ! -z "$check_web" ]; then
+# Working on Web domain
+if [ ! -z "$WEB_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='no")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
$BIN/v-delete-web-domain $user $domain 'no'
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "can't suspend web" > /dev/null
fi
fi
-# DNS domain
-if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS_SYSTEM" != 'no' ]; then
- check_dns=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
- if [ ! -z "$check_dns" ]; then
+# Working on DNS domain
+if [ ! -z "$DNS_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf |grep "SUSPENDED='no")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
$BIN/v-delete-dns-domain $user $domain 'no'
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "can't suspend dns" > /dev/null
fi
fi
-# Mail domain
-if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'no' ]; then
- check_mail=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf)
- if [ ! -z "$check_mail" ]; then
+# Working on Mail domain
+if [ ! -z "$MAIL_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf |grep "SUSPENDED='no")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
$BIN/v-delete-mail-domain $user $domain
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "can't suspend mail" > /dev/null
fi
fi
-# Check domain status
-if [ -z "$check_web" ] && [ -z "$check_dns" ] && [ -z "$check_mail" ]; then
+# Checking domain search result
+if [ -z "$domain_found" ]; then
echo "Error: domain $domain doesn't exist"
log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST
fi
-# Restart services
+# Restarting services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- $BIN/v-restart-proxy
+ check_result $? "can't restart web" > /dev/null
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "can't restart proxy" > /dev/null
+ fi
$BIN/v-restart-dns
+ check_result $? "can't restart dns" > /dev/null
fi
diff --git a/bin/v-delete-firewall-ban b/bin/v-delete-firewall-ban
index 97362adaa..8bae0e2ce 100755
--- a/bin/v-delete-firewall-ban
+++ b/bin/v-delete-firewall-ban
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
ip=$1
chain=$(echo $2|tr '[:lower:]' '[:upper:]')
@@ -45,9 +45,10 @@ if [ -z "$check_ip" ]; then
fi
# Deleting ip from banlist
-sed -i "/IP='$ip' CHAIN='$chain'/d" $conf
-$iptables -D fail2ban-$chain -s $ip \
- -j REJECT --reject-with icmp-port-unreachable 2>/dev/null
+sip=$(echo "$ip"| sed "s|/|\\\/|g")
+sed -i "/IP='$sip' CHAIN='$chain'/d" $conf
+b=$($iptables -L fail2ban-$chain --line-number -n|grep $ip|awk '{print $1}')
+$iptables -D fail2ban-$chain $b 2>/dev/null
# Changing permissions
chmod 660 $conf
diff --git a/bin/v-delete-firewall-chain b/bin/v-delete-firewall-chain
index cb1316bbb..917682b94 100755
--- a/bin/v-delete-firewall-chain
+++ b/bin/v-delete-firewall-chain
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
chain=$(echo $1 | tr '[:lower:]' '[:upper:]')
# Defining absolute path to iptables
diff --git a/bin/v-delete-firewall-rule b/bin/v-delete-firewall-rule
index 7f1c24d8e..d37e8a182 100755
--- a/bin/v-delete-firewall-rule
+++ b/bin/v-delete-firewall-rule
@@ -12,7 +12,7 @@
# Importing system variables
source /etc/profile
-# Argument defenition
+# Argument definition
rule=$1
# Includes
diff --git a/bin/v-delete-fs-directory b/bin/v-delete-fs-directory
new file mode 100755
index 000000000..b1cedde7e
--- /dev/null
+++ b/bin/v-delete-fs-directory
@@ -0,0 +1,45 @@
+#!/bin/bash
+# info: delete directory
+# options: USER DIRECTORY
+#
+# The function deletes directory on the file system
+
+
+user=$1
+dst_dir=$2
+
+# Checking arguments
+if [ -z "$dst_dir" ]; then
+ echo "Usage: USER DIRECTORY"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_dir"
+ exit 1
+fi
+
+# Deleting directory
+sudo -u $user rm -rf "$dst_dir" # >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: directory $dst_dir was not deleted"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-delete-fs-file b/bin/v-delete-fs-file
new file mode 100755
index 000000000..bca18ff06
--- /dev/null
+++ b/bin/v-delete-fs-file
@@ -0,0 +1,45 @@
+#!/bin/bash
+# info: delete file
+# options: USER FILE
+#
+# The function deletes file on the file system
+
+
+user=$1
+dst_file=$2
+
+# Checking arguments
+if [ -z "$dst_file" ]; then
+ echo "Usage: USER FILE"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_file"
+ exit 2
+fi
+
+# Deleting file
+sudo -u $user rm -f "$dst_file" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: file $dst_file was not deleted"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-delete-mail-account b/bin/v-delete-mail-account
index 7f11911df..6ae7bfec6 100755
--- a/bin/v-delete-mail-account
+++ b/bin/v-delete-mail-account
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-account-alias b/bin/v-delete-mail-account-alias
index c8d1da444..87a1213c3 100755
--- a/bin/v-delete-mail-account-alias
+++ b/bin/v-delete-mail-account-alias
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-account-autoreply b/bin/v-delete-mail-account-autoreply
index 9d8c4c223..2f2ef486c 100755
--- a/bin/v-delete-mail-account-autoreply
+++ b/bin/v-delete-mail-account-autoreply
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-account-forward b/bin/v-delete-mail-account-forward
index 4562789cb..a77b3d7e9 100755
--- a/bin/v-delete-mail-account-forward
+++ b/bin/v-delete-mail-account-forward
@@ -1,5 +1,5 @@
#!/bin/bash
-# info: delte mail account forward
+# info: delete mail account forward
# options: USER DOMAIN ACCOUNT EMAIL
#
# The function add delete email account forward address.
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-account-fwd-only b/bin/v-delete-mail-account-fwd-only
index 9ea83bbcd..b437b7e30 100755
--- a/bin/v-delete-mail-account-fwd-only
+++ b/bin/v-delete-mail-account-fwd-only
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-domain b/bin/v-delete-mail-domain
index cb32dfaf6..a57e459d9 100755
--- a/bin/v-delete-mail-domain
+++ b/bin/v-delete-mail-domain
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-delete-mail-domain-antispam b/bin/v-delete-mail-domain-antispam
index 3e68529e4..e33b266e1 100755
--- a/bin/v-delete-mail-domain-antispam
+++ b/bin/v-delete-mail-domain-antispam
@@ -2,14 +2,14 @@
# info: delete mail domain antispam support
# options: USER DOMAIN
#
-# The function disable spamassasin for incomming emails.
+# The function disable spamassasin for incoming emails.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-domain-antivirus b/bin/v-delete-mail-domain-antivirus
index 6a925e4c8..7473c1251 100755
--- a/bin/v-delete-mail-domain-antivirus
+++ b/bin/v-delete-mail-domain-antivirus
@@ -2,14 +2,14 @@
# info: delete mail domain antivirus support
# options: USER DOMAIN
#
-# The function disables clamav scan for incomming emails.
+# The function disables clamav scan for incoming emails.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-domain-catchall b/bin/v-delete-mail-domain-catchall
index 3fa0639fb..3791d7adc 100755
--- a/bin/v-delete-mail-domain-catchall
+++ b/bin/v-delete-mail-domain-catchall
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-domain-dkim b/bin/v-delete-mail-domain-dkim
index a79c2cfe0..88b480b0f 100755
--- a/bin/v-delete-mail-domain-dkim
+++ b/bin/v-delete-mail-domain-dkim
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-delete-mail-domains b/bin/v-delete-mail-domains
index ae4153810..116e48743 100755
--- a/bin/v-delete-mail-domains
+++ b/bin/v-delete-mail-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-delete-remote-dns-domain b/bin/v-delete-remote-dns-domain
index 1ba782dbc..b92aec229 100755
--- a/bin/v-delete-remote-dns-domain
+++ b/bin/v-delete-remote-dns-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
@@ -26,84 +26,45 @@ source $VESTA/conf/vesta.conf
check_args '2' "$#" 'USER DOMAIN'
validate_format 'user' 'domain'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
-IFS=$'\n'
-
# Starting cluster loop
-for cluster_str in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
+IFS=$'\n'
+for cluster in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
- # Get host values
- eval $cluster_str
+ # Parsing remote host parameters
+ eval $cluster
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
+ # Syncing domain
+ cluster_cmd v-delete-dns-domain $DNS_USER $domain 'yes'
+ rc=$?
+ if [ "$rc" -ne 0 ] && [ $rc -ne 3 ]; then
+ check_result $rc "$HOST connection failed (sync)" $E_CONNECT
fi
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
- $send_cmd v-list-user $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: dns user $DNS_USER doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
- fi
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Sync domain
- $send_cmd v-delete-dns-domain $DNS_USER $domain 'scheduled'
-
done
-# Update pipe
-pipe="$VESTA/data/queue/dns-cluster.pipe"
-str=$(grep -n "$SCRIPT $1 $2$" $pipe | cut -f1 -d: | head -n1)
-if [ ! -z "$str" ]; then
- sed -i "$str d" $pipe
-fi
-
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
+# Updating pipe
+pipe="$VESTA/data/queue/dns-cluster.pipe"
+str=$(grep -n "$SCRIPT $1 $2$" $pipe | cut -f1 -d: | head -n1)
+if [ ! -z "$str" ]; then
+ sed -i "$str d" $pipe
+fi
+
exit
diff --git a/bin/v-delete-remote-dns-domains b/bin/v-delete-remote-dns-domains
index c2e2300f5..1902e576e 100755
--- a/bin/v-delete-remote-dns-domains
+++ b/bin/v-delete-remote-dns-domains
@@ -8,7 +8,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
host=$1
# Includes
@@ -22,26 +22,19 @@ source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
IFS=$'\n'
if [ -z $host ]; then
@@ -51,65 +44,18 @@ else
fi
# Starting cluster loop
-for cluster_str in $hosts; do
+for cluster in $hosts; do
- # Get host values
- eval $cluster_str
+ # Parsing remote host parameters
+ eval $cluster
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
+ # Deleting source records
+ cluster_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME 'no'
+ check_result $? "$HOST connection failed (cleanup)" $E_CONNECT
- # Print hostname
- if [ ! -z "$verbose" ]; then
- echo "HOSTNAME: $HOSTNAME"
- echo "TYPE: $TYPE"
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
- if [ ! -z "$verbose" ]; then
- echo "DNS_USER: $DNS_USER"
- fi
- $send_cmd v-list-user $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: dns user $DNS_USER doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
- fi
-
- # Clean source records
- $send_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME 'no'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (cleanup)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Rebuild dns zones
- $send_cmd v-rebuild-dns-domains $DNS_USER 'scheduled'
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (rebuild)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
+ # Rebuilding dns zones
+ $send_cmd v-rebuild-dns-domains $DNS_USER 'yes'
+ check_result $? "$HOST connection failed (rebuild)" $E_CONNECT
done
@@ -118,4 +64,11 @@ done
# Vesta #
#----------------------------------------------------------#
+# Updating pipe
+pipe="$VESTA/data/queue/dns-cluster.pipe"
+str=$(grep -n "$SCRIPT $1 $2$" $pipe | cut -f1 -d: | head -n1)
+if [ ! -z "$str" ]; then
+ sed -i "$str d" $pipe
+fi
+
exit
diff --git a/bin/v-delete-remote-dns-host b/bin/v-delete-remote-dns-host
index e82cad688..9e4b73680 100755
--- a/bin/v-delete-remote-dns-host
+++ b/bin/v-delete-remote-dns-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
host=$1
# Includes
@@ -32,25 +32,13 @@ is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
# Action #
#----------------------------------------------------------#
-eval $(grep $host $VESTA/conf/dns-cluster.conf)
-case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
-esac
-
-
-# Check host connection
-$send_cmd v-list-sys-config
-if [ $? -eq 0 ]; then
- # Deleting domains
- $BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
- $send_cmd v-add-cron-restart-job
-fi
+# Deleting remote domains
+$BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
# Deleting server
sed -i "/HOST='$host' /d" $VESTA/conf/dns-cluster.conf
-# Delete DNS_CLUSTER key
+# Deleting DNS_CLUSTER key
check_cluster=$(grep HOST $VESTA/conf/dns-cluster.conf |wc -l)
if [ "$check_cluster" -eq '0' ]; then
rm -f $VESTA/conf/dns-cluster.conf
diff --git a/bin/v-delete-remote-dns-record b/bin/v-delete-remote-dns-record
index 29102f6e6..eab802ccd 100755
--- a/bin/v-delete-remote-dns-record
+++ b/bin/v-delete-remote-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
id=$3
@@ -27,79 +27,53 @@ source $VESTA/conf/vesta.conf
check_args '3' "$#" 'USER DOMAIN ID'
validate_format 'user' 'domain' 'id'
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
-IFS=$'\n'
# Starting cluster loop
-for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
+IFS=$'\n'
+for cluster in $(cat $VESTA/conf/dns-cluster.conf); do
- # Get host values
- eval $cluster_str
+ # Parsing remote host parameters
+ eval $cluster
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
- $send_cmd v-list-user $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: dns user $DNS_USER doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
- fi
+ # Syncing serial
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'domain' 'no'
+ check_result $? "$HOST connection failed (soa sync)" $E_CONNECT
# Sync domain
- $send_cmd v-delete-dns-record $DNS_USER $domain $id 'scheduled'
+ cluster_cmd v-delete-dns-record $DNS_USER $domain $id 'no'
+ #check_result $? "$HOST connection failed (delete)" $E_CONNECT
+
+ # Rebuilding dns zone
+ cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no'
+ check_result $? "$HOST connection failed (rebuild)" $E_CONNECT
done
-# Update pipe
-pipe="$VESTA/data/queue/dns-cluster.pipe"
-str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
-if [ ! -z "$str" ]; then
- sed -i "$str d" $pipe
-fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
+# Updating pipe
+pipe="$VESTA/data/queue/dns-cluster.pipe"
+str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1)
+if [ ! -z "$str" ]; then
+ sed -i "$str d" $pipe
+fi
+
exit
diff --git a/bin/v-delete-sys-firewall b/bin/v-delete-sys-firewall
new file mode 100755
index 000000000..86b0ff5de
--- /dev/null
+++ b/bin/v-delete-sys-firewall
@@ -0,0 +1,48 @@
+#!/bin/bash
+# info: delete system firewall
+# options: NONE
+#
+# The script disables firewall support
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+if [ -z "$FIREWALL_SYSTEM" ]; then
+ exit
+fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Stopping firewall
+$BIN/v-stop-firewall
+
+# Updating FIREWALL_SYSTEM value
+if [ -z "$(grep FIREWALL_SYSTEM $VESTA/conf/vesta.conf)" ]; then
+ echo "FIREWALL_SYSTEM=''" >> $VESTA/conf/vesta.conf
+else
+ sed -i "s/FIREWALL_SYSTEM=.*/FIREWALL_SYSTEM=''/g" $VESTA/conf/vesta.conf
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-sys-ip b/bin/v-delete-sys-ip
index e9186fc7d..17ea16129 100755
--- a/bin/v-delete-sys-ip
+++ b/bin/v-delete-sys-ip
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
# Includes
@@ -123,16 +123,12 @@ fi
# Restarting web server
$BIN/v-restart-web
-if [ $? -ne 0 ]; then
- exit $E_RESTART
-fi
+check_result $? "Web restart failed" >/dev/null
# Restarting proxy server
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
# Restarting firewall
diff --git a/bin/v-delete-sys-quota b/bin/v-delete-sys-quota
index 13f23e9c8..b2a5d27b2 100755
--- a/bin/v-delete-sys-quota
+++ b/bin/v-delete-sys-quota
@@ -1,12 +1,12 @@
#!/bin/bash
# info: delete system quota
-# opions: NONE
+# options: NONE
#
-# The script disables filesystem quota on /home patition
+# The script disables filesystem quota on /home partition
#----------------------------------------------------------#
-# Variable&Function #
+# Variable & Function #
#----------------------------------------------------------#
# Includes
@@ -23,29 +23,34 @@ source $VESTA/conf/vesta.conf
# Action #
#----------------------------------------------------------#
-# Deleting usrquota on /home partition
-mnt=$(df -P /home |awk '{print $6}' |tail -n1)
-lnr=$(cat -n /etc/fstab |awk '{print $1,$3}' |grep "$mnt$" |cut -f 1 -d ' ')
-options=$(sed -n ${lnr}p /etc/fstab |awk '{print $4}')
-if [ ! -z "$(echo $options |grep usrquota)" ]; then
- sed -i "$lnr s/,usrquota//" /etc/fstab
+# Deleting group and user quota on /home partition
+mnt=$(df -P /home | awk '{print $6}' | tail -n1)
+lnr=$(cat -n /etc/fstab | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')
+opt=$(sed -n ${lnr}p /etc/fstab | awk '{print $4}')
+fnd='usrquota\|grpquota\|usrjquota=\|grpjquota=\|jqfmt='
+if [ ! -z "$(echo $opt | grep $fnd)" ]; then
+ rep=$(echo $(echo $opt | tr ',' '\n' | grep -v $fnd) | tr ' ' ',')
+ sed -i "$lnr s/$opt/$rep/" /etc/fstab
mount -o remount $mnt
fi
-# Disabling fs quota
-if [ -z "$(quotaon -pa|grep " $mnt "|grep user|grep 'off')" ]; then
- quotaoff $mnt
+# Disabling group and user quota
+quotaoff=$(which --skip-alias --skip-functions quotaoff 2>/dev/null)
+if [ $? -eq 0 ]; then
+ if [ ! -z "$(quotaon -pa | grep " $mnt " | grep 'user\|group' | grep 'is on')" ]; then
+ $quotaoff $mnt
+ fi
fi
-# Deleting quota index
-if [ -e "$mnt/aquota.user" ]; then
- rm $mnt/aquota.user
-fi
+# Deleting v1 + v2 group and user quota index
+for idx in $(echo 'quota.user quota.group aquota.user aquota.group'); do
+ [ -e "$mnt/$idx" ] && rm -f $mnt/$idx
+done
-# Deleting weekly cron job
+# Deleting cron job
rm -f /etc/cron.daily/quotacheck
-# Updating DISK_QUOTA value
+# Updating vesta.conf value
if [ -z "$(grep DISK_QUOTA $VESTA/conf/vesta.conf)" ]; then
echo "DISK_QUOTA='no'" >> $VESTA/conf/vesta.conf
else
diff --git a/bin/v-delete-sys-sftp-jail b/bin/v-delete-sys-sftp-jail
new file mode 100755
index 000000000..103b41a90
--- /dev/null
+++ b/bin/v-delete-sys-sftp-jail
@@ -0,0 +1,89 @@
+#!/bin/bash
+# info: delete system sftp jail
+# options: NONE
+#
+# The script enables sftp jailed environment
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Importing system environment as we run this script
+# mostly by cron which do not read it by itself
+source /etc/profile
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+#if [ -z "$SFTPJAIL_KEY" ]; then
+# exit
+#fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking users
+for user in $(grep "$HOMEDIR" /etc/passwd |cut -f 1 -d:); do
+ $BIN/v-delete-user-sftp-jail $user
+done
+
+# Checking sshd directives
+config='/etc/ssh/sshd_config'
+sftp_n=$(grep -n "Subsystem.*sftp" $config |grep -v internal |grep ":#")
+sftp_i=$(grep -n "Subsystem.*sftp" $config |grep internal |grep -v ":#")
+
+# Backing up config
+cp $config $config.bak-$(date +%s)
+
+# Enabling normal sftp
+if [ ! -z "$sftp_n" ]; then
+ fline=$(echo $sftp_n |cut -f 1 -d :)
+ sed -i "${fline}s/#Subsystem/Subsystem sftp/" $config
+ restart='yes'
+fi
+
+# Disabling jailed sftp
+if [ ! -z "$sftp_i" ]; then
+ fline=$(echo $sftp_i |cut -f 1 -d :)
+ lline=$((fline + 5))
+ sed -i "${fline},${lline}d" $config
+ restart='yes'
+fi
+
+# Validating opensshd config
+if [ "$restart" = 'yes' ]; then
+ subj="OpenSSH restart failed"
+ email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \')
+ send_mail="$VESTA/web/inc/mail-wrapper.php"
+ /usr/sbin/sshd -t >/dev/null 2>&1
+ if [ "$?" -ne 0 ]; then
+ mail_text="OpenSSH can not be restarted. Please check config:
+ \n\n$(/usr/sbin/sshd -t)"
+ echo -e "$mail_text" | $send_mail -s "$subj" $email
+ else
+ service ssh restart >/dev/null 2>&1
+ service sshd restart >/dev/null 2>&1
+ fi
+fi
+
+# Deleting v-add-sys-sftp-jail from startup
+sed -i "/v-add-sys-sftp-jail/d" /etc/rc.local 2>/dev/null
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-user b/bin/v-delete-user
index 23f2b9ae9..d811fe0cd 100755
--- a/bin/v-delete-user
+++ b/bin/v-delete-user
@@ -2,7 +2,7 @@
# info: delete user
# options: USER
#
-# This function deletes a certain user and all his resourses such as domains,
+# This function deletes a certain user and all his resources such as domains,
# databases, cron jobs, etc.
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
diff --git a/bin/v-delete-user-backup b/bin/v-delete-user-backup
index a56ac8a78..00b7e86b5 100755
--- a/bin/v-delete-user-backup
+++ b/bin/v-delete-user-backup
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
backup=$(echo $2| cut -f 2 -d \.)
diff --git a/bin/v-delete-user-backup-exclusions b/bin/v-delete-user-backup-exclusions
index 40f0ec7ca..875eaa919 100755
--- a/bin/v-delete-user-backup-exclusions
+++ b/bin/v-delete-user-backup-exclusions
@@ -2,14 +2,14 @@
# info: delete backup exclusion
# options: USER [SYSTEM]
#
-# The function for deleteing backup exclusion
+# The function for deleting backup exclusion
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
system=$(echo $2 | tr '[:lower:]' '[:upper:]')
diff --git a/bin/v-delete-user-favourites b/bin/v-delete-user-favourites
new file mode 100755
index 000000000..8efffe083
--- /dev/null
+++ b/bin/v-delete-user-favourites
@@ -0,0 +1,124 @@
+#!/bin/bash
+# info: deleting user favourites
+# options: USER SYSTEM OBJECT
+#
+# The function deletes object from users favourites
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+system=$(echo "$2" |tr '[:lower:]' '[:upper:]')
+object=$3
+email=$3
+id=$3
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '3' "$#" 'USER SYSTEM OBJECT'
+case $system in
+ MAIL_ACC) validate_format 'email' ;;
+ CRON) validate_format 'id' ;;
+ DNS_REC) validate_format 'id' ;;
+ *) validate_format 'object'
+esac
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+
+# Checking system
+case $system in
+ USER) check='ok' ;;
+ WEB) check='ok' ;;
+ DNS) check='ok' ;;
+ DNS_REC) check='ok' ;;
+ MAIL) check='ok' ;;
+ MAIL_ACC) check='ok' ;;
+ DB) check='ok' ;;
+ CRON) check='ok' ;;
+ BACKUP) check='ok' ;;
+ IP) check='ok' ;;
+ PACKAGE) check='ok' ;;
+ FIREWALL) check='ok' ;;
+ *) check_args '2' '0' 'USER SYSTEM OBJECT'
+esac
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Flushing vars
+USER=''
+WEB=''
+DNS=''
+DNS_REC=''
+MAIL=''
+MAIL_ACC=''
+DB=''
+CRON=''
+BACKUP=''
+IP=''
+PACKAGE=''
+FIREWALL=''
+
+# Creating config just in case
+touch $USER_DATA/favourites.conf
+
+# Reading current values
+source $USER_DATA/favourites.conf
+
+# Assigning current system value
+eval value=\$$system
+
+# Checking if object is new
+check_fav=$(echo "$value" |tr ',' '\n'| grep "^$object$")
+if [ -z "$check_fav" ]; then
+ exit 0
+fi
+
+# Deleting object from favorites
+value=$(echo "$value" |\
+ sed -e "s/,/\n/g"|\
+ sed -e "s/^$object$//g"|\
+ sed -e "/^$/d"|\
+ sed -e ':a;N;$!ba;s/\n/,/g')
+
+# Updating sytem
+eval $system=$value
+
+# Updating user favorites
+echo "USER='$USER'
+WEB='$WEB'
+DNS='$DNS'
+DNS_REC='$DNS_REC'
+MAIL='$MAIL'
+MAIL_ACC='$MAIL_ACC'
+DB='$DB'
+CRON='$CRON'
+BACKUP='$BACKUP'
+IP='$IP'
+PACKAGE='$PACKAGE'
+FIREWALL='$FIREWALL'" > $USER_DATA/favourites.conf
+
+# Changing file permission
+chmod 640 $USER_DATA/favourites.conf
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+log_history "deleted starred $object from $system listing"
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-user-ips b/bin/v-delete-user-ips
index a6125333b..292ce809e 100755
--- a/bin/v-delete-user-ips
+++ b/bin/v-delete-user-ips
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-delete-user-notification b/bin/v-delete-user-notification
new file mode 100755
index 000000000..c9e32607c
--- /dev/null
+++ b/bin/v-delete-user-notification
@@ -0,0 +1,66 @@
+#!/bin/bash
+# info: delete user notification
+# options: USER NOTIFICATION
+#
+# The function deletes user notification.
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+nid=$2
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER NOTIFICATION'
+validate_format 'user' 'nid'
+is_object_valid 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Deleting notification
+sed -i "/NID='$nid' /d" $USER_DATA/notifications.conf 2>/dev/null
+
+# Checking last notification
+if [ -e "$USER_DATA/notifications.conf" ]; then
+ if [ -z "$(grep NID= $USER_DATA/notifications.conf)" ]; then
+ notice='no'
+ fi
+ if [ -z "$(grep "ACK='no'" $USER_DATA/notifications.conf)" ]; then
+ notice='no'
+ fi
+else
+ notice='no'
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Updating notification counter
+if [ "$notice" = 'no' ]; then
+ if [ -z "$(grep NOTIFICATIONS $USER_DATA/user.conf)" ]; then
+ sed -i "s/^TIME/NOTIFICATIONS='no'\nTIME/g" $USER_DATA/user.conf
+ else
+ update_user_value "$user" '$NOTIFICATIONS' "no"
+ fi
+fi
+
+# Logging
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-user-package b/bin/v-delete-user-package
index db5bdaab7..8ce2195af 100755
--- a/bin/v-delete-user-package
+++ b/bin/v-delete-user-package
@@ -2,7 +2,7 @@
# info: delete user package
# options: PACKAGE
#
-# The function for deleting user package. It does not allow to delete pacakge
+# The function for deleting user package. It does not allow to delete package
# if it is in use.
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
package=$1
# Includes
diff --git a/bin/v-delete-user-sftp-jail b/bin/v-delete-user-sftp-jail
new file mode 100755
index 000000000..e25121a95
--- /dev/null
+++ b/bin/v-delete-user-sftp-jail
@@ -0,0 +1,63 @@
+#!/bin/bash
+# info: delete user sftp jail
+# options: USER
+#
+# The script enables sftp jailed environment
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '1' "$#" 'USER'
+validate_format 'user'
+user_str=$(grep "^$user:" /etc/passwd)
+if [ -z "$user_str" ]; then
+ exit
+fi
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Defining user homedir
+home="$(echo $user_str |cut -f 6 -d :)"
+
+# Unmounting home directory
+mount_dir=$(mount |grep /chroot/$user/ |awk '{print $3}')
+if [ ! -z "$mount_dir" ]; then
+ umount -f $mount_dir 2>/dev/null
+ if [ $? -ne 0 ]; then
+ gpasswd -d $user sftp-only >/dev/null 2>&1
+ exit 1
+ fi
+fi
+
+# Deleting chroot dir
+rmdir $mount_dir 2>/dev/null
+rm -rf /chroot/$user
+
+# Deleting user from sftp group
+gpasswd -d $user sftp-only >/dev/null 2>&1
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Logging
+#log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-web-domain b/bin/v-delete-web-domain
index 9393c1cc8..4daaf5186 100755
--- a/bin/v-delete-web-domain
+++ b/bin/v-delete-web-domain
@@ -12,7 +12,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -85,6 +85,12 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
del_web_config
fi
+
+ # Deleting domain from proxy cache pool
+ pool="/etc/$PROXY_SYSTEM/conf.d/01_caching_pool.conf"
+ if [ -e "$pool" ]; then
+ sed -i "/=$domain:/d" $pool
+ fi
fi
# Checking stats
@@ -162,18 +168,14 @@ if [ "$SSL" = 'yes' ]; then
decrease_user_value "$user" '$U_WEB_SSL'
fi
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-delete-web-domain-alias b/bin/v-delete-web-domain-alias
index da6645ce5..9b0ac0d06 100755
--- a/bin/v-delete-web-domain-alias
+++ b/bin/v-delete-web-domain-alias
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain" )
@@ -73,7 +73,7 @@ if [ "$SSL" = 'yes' ]; then
fi
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
del_web_config
@@ -98,16 +98,14 @@ update_object_value 'web' 'DOMAIN' "$domain" '$ALIAS' "$ALIAS"
# Update counters
decrease_user_value "$user" '$U_WEB_ALIASES'
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-delete-web-domain-backend b/bin/v-delete-web-domain-backend
index 286c3922b..4780ae367 100755
--- a/bin/v-delete-web-domain-backend
+++ b/bin/v-delete-web-domain-backend
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -52,12 +52,10 @@ rm -f $pool/$backend.conf
# Vesta #
#----------------------------------------------------------#
-# Restart backend server
+# Restarting backend server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web-backend
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Backend restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-delete-web-domain-ftp b/bin/v-delete-web-domain-ftp
index 01b8ac479..8368b1799 100755
--- a/bin/v-delete-web-domain-ftp
+++ b/bin/v-delete-web-domain-ftp
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -51,6 +51,11 @@ if [ "$?" != 0 ]; then
sed -i "/^$ftp_user:/d" /etc/shadow
fi
+# Deleting sftp jail
+if [ ! -z "$SFTPJAIL_KEY" ]; then
+ $BINv-delete-user-sftp-jail $ftp_user
+fi
+
#----------------------------------------------------------#
# Vesta #
diff --git a/bin/v-delete-web-domain-httpauth b/bin/v-delete-web-domain-httpauth
new file mode 100755
index 000000000..96c7eed31
--- /dev/null
+++ b/bin/v-delete-web-domain-httpauth
@@ -0,0 +1,87 @@
+#!/bin/bash
+# info: delete http auth user
+# options: USER DOMAIN AUTH_USER [RESTART]
+#
+# The call is used for deleting http auth user
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+auth_user=$3
+restart=${4-yes}
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/func/domain.sh
+source $VESTA/conf/vesta.conf
+
+# Defining htpasswd file
+htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
+htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '3' "$#" 'USER DOMAIN AUTH_USER [RESTART]'
+validate_format 'user' 'domain'
+is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+is_object_valid 'web' 'DOMAIN' "$domain"
+is_object_unsuspended 'web' 'DOMAIN' "$domain"
+is_password_valid
+get_domain_values 'web'
+if [ -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then
+ echo "Error: auth user $auth_user doesn't exist"
+ log_event "$E_NOTEXIST" "$EVENT"
+ exit $E_NOTEXIST
+fi
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Deleting auth user
+sed -i "/^$auth_user:/d" $htpasswd
+
+# Deleting password protection
+if [ "$(echo "$AUTH_USER" |tr : '\n' |wc -l)" -le 1 ]; then
+ rm -f $htaccess $htpasswd
+ restart_required='yes'
+fi
+
+# Restarting web server
+if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
+ $BIN/v-restart-web
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+# Rebuilding FTP variables
+position=$(echo $AUTH_USER |tr ':' '\n' |grep -n '' |grep ":$auth_user$" |\
+ cut -f 1 -d:)
+auth_user=$(echo $AUTH_USER |tr ':' '\n' |grep -n '' |grep -v "^$position:" |\
+ cut -f 2 -d :| sed -e "/^$/d"| sed -e ':a;N;$!ba;s/\n/:/g')
+auth_hash=$(echo $AUTH_HASH |tr ':' '\n' |grep -n '' |grep -v "^$position:" |\
+ cut -f 2 -d :| sed -e ':a;N;$!ba;s/\n/:/g')
+
+# Update config
+update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_USER' "$auth_user"
+update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash"
+
+# Logging
+log_history "changed auth user $httpauth_user password on $domain"
+log_event "$OK" "$EVENT"
+
+exit
diff --git a/bin/v-delete-web-domain-proxy b/bin/v-delete-web-domain-proxy
index 0aa73e150..d86cb4022 100755
--- a/bin/v-delete-web-domain-proxy
+++ b/bin/v-delete-web-domain-proxy
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -87,9 +87,7 @@ fi
# Restart proxy server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-delete-web-domain-ssl b/bin/v-delete-web-domain-ssl
index 4d19fb37b..49943baba 100755
--- a/bin/v-delete-web-domain-ssl
+++ b/bin/v-delete-web-domain-ssl
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -48,7 +48,7 @@ tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl"
del_web_config
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
del_web_config
@@ -89,16 +89,14 @@ fi
# Decreasing domain value
decrease_user_value "$user" '$U_WEB_SSL'
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-delete-web-domain-stats b/bin/v-delete-web-domain-stats
index 3d2292a9f..bd5627a6c 100755
--- a/bin/v-delete-web-domain-stats
+++ b/bin/v-delete-web-domain-stats
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-delete-web-domain-stats-user b/bin/v-delete-web-domain-stats-user
index 877f5482a..6e1008ba0 100755
--- a/bin/v-delete-web-domain-stats-user
+++ b/bin/v-delete-web-domain-stats-user
@@ -12,7 +12,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
@@ -40,7 +40,7 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$STATS_USER'
# Action #
#----------------------------------------------------------#
-# Definining statistic dir
+# Defining statistic dir
rm -f $HOMEDIR/$user/web/$domain/stats/.htpasswd
rm -f $HOMEDIR/$user/web/$domain/stats/.htaccess
diff --git a/bin/v-delete-web-domains b/bin/v-delete-web-domains
index 824e72881..dec2156aa 100755
--- a/bin/v-delete-web-domains
+++ b/bin/v-delete-web-domains
@@ -2,14 +2,14 @@
# info: delete web domains
# options: USER [RESTART]
#
-# The function deteles all user's webdomains.
+# The function deletes all user's webdomains.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -42,18 +42,14 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-extract-fs-archive b/bin/v-extract-fs-archive
new file mode 100755
index 000000000..ec70baba4
--- /dev/null
+++ b/bin/v-extract-fs-archive
@@ -0,0 +1,119 @@
+#!/bin/bash
+# info: archive to directory
+# options: USER ARCHIVE DIRECTORY
+#
+# The function extracts archive into directory on the file system
+
+user=$1
+src_file=$2
+dst_dir=$3
+
+# Checking arguments
+if [ -z "$dst_dir" ]; then
+ echo "Usage: USER ARCHIVE DIRECTORY"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking source dir
+if [ ! -e "$src_file" ]; then
+ echo "Error: source file $src_file doesn't exist"
+ exit 3
+fi
+
+# Checking source path
+rpath=$(readlink -f "$src_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_file"
+ exit 2
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_dir"
+ exit 2
+fi
+
+# Extracting gziped archive
+if [ ! -z "$(echo $src_file |egrep -i '.tgz|.tar.gz')" ]; then
+ x='yes'
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user tar -xzf "$src_file" -C "$dst_dir" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting bziped archive
+if [ ! -z "$(echo $src_file |egrep -i '.tbz|.tar.bz')" ]; then
+ x='yes'
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user tar -xjf "$src_file" -C "$dst_dir" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting gziped file
+if [ ! -z "$(echo $src_file |grep -i '.gz')" ] && [ -z "$x" ]; then
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user mv "$src_file" "$dst_dir" >/dev/null 2>&1
+ sudo -u $user gzip -d "$dst_dir/$(basename $src_file)" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting bziped file
+if [ ! -z "$(echo $src_file |grep -i '.bz')" ] && [ -z "$x" ]; then
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user mv "$src_file" "$dst_dir"# >/dev/null 2>&1
+ sudo -u $user bzip2 -d "$dst_dir/$(basename $src_file)" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting ziped archive
+if [ ! -z "$(echo $src_file |grep -i '.zip')" ]; then
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user unzip "$src_file" -d "$dst_dir" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting ziped archive
+if [ ! -z "$(echo $src_file |grep -i '.7z')" ]; then
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user mv "$src_file" "$dst_dir" >/dev/null 2>&1
+ sudo -u $user p7zip -d "$src_file" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting tared archive
+if [ ! -z "$(echo $src_file |grep -i '.tar')" ] && [ -z "$x" ]; then
+ x='yes'
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user tar -xf "$src_file" -C "$dst_dir" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Extracting rared archive
+if [ ! -z "$(echo $src_file |grep -i '.rar')" ]; then
+ sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
+ sudo -u $user unrar "$src_file" "$dst_dir" >/dev/null 2>&1
+ rc=$?
+fi
+
+# Checking result
+if [ $rc -ne 0 ]; then
+ echo "Error: $src_file was not extracted"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-generate-password-hash b/bin/v-generate-password-hash
index 1c454cd5a..fd917ad38 100755
--- a/bin/v-generate-password-hash
+++ b/bin/v-generate-password-hash
@@ -32,5 +32,10 @@ if ($crypt == 'sha-512' ) {
$hash = str_replace('$rounds=5000','',$hash);
}
+// Generating base64 hash
+if ($crypt == 'htpasswd' ) {
+ $hash = crypt($password, base64_encode($password));
+}
+
// Printing result
echo $hash . "\n";
diff --git a/bin/v-generate-ssl-cert b/bin/v-generate-ssl-cert
index 9d9d210d8..e96edaa51 100755
--- a/bin/v-generate-ssl-cert
+++ b/bin/v-generate-ssl-cert
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
domain=$1
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-get-dns-domain-value b/bin/v-get-dns-domain-value
index 191120504..d8aa0179e 100755
--- a/bin/v-get-dns-domain-value
+++ b/bin/v-get-dns-domain-value
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-get-fs-file-type b/bin/v-get-fs-file-type
new file mode 100755
index 000000000..ba2b7a660
--- /dev/null
+++ b/bin/v-get-fs-file-type
@@ -0,0 +1,40 @@
+#!/bin/bash
+# info: get file type
+# options: USER FILE
+#
+# The function shows file type
+
+user=$1
+path=$2
+
+# Checking arguments
+if [ -z "$path" ]; then
+ echo "Usage: USER FILE"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking path
+rpath=$(readlink -f "$path")
+if [ -z "$(echo $rpath |grep $homedir)" ]; then
+ echo "Error: invalid path $path"
+ exit 2
+fi
+
+# Listing file type
+sudo -u $user file -i -b "$path" 2>/dev/null
+
+# Exiting
+exit $?
diff --git a/bin/v-get-mail-account-value b/bin/v-get-mail-account-value
index db9f298ba..282c81989 100755
--- a/bin/v-get-mail-account-value
+++ b/bin/v-get-mail-account-value
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-get-mail-domain-value b/bin/v-get-mail-domain-value
index b6f4cc458..da9abf16e 100755
--- a/bin/v-get-mail-domain-value
+++ b/bin/v-get-mail-domain-value
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-get-sys-timezone b/bin/v-get-sys-timezone
index 8a3607b49..ced92ba47 100755
--- a/bin/v-get-sys-timezone
+++ b/bin/v-get-sys-timezone
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-get-sys-timezones b/bin/v-get-sys-timezones
index ec5dcda03..2799fccb9 100755
--- a/bin/v-get-sys-timezones
+++ b/bin/v-get-sys-timezones
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-get-user-value b/bin/v-get-user-value
index 19ccf4ce7..415a764a4 100755
--- a/bin/v-get-user-value
+++ b/bin/v-get-user-value
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
key=$(echo "$2"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
diff --git a/bin/v-get-web-domain-value b/bin/v-get-web-domain-value
index 3e74e31ee..2c8569375 100755
--- a/bin/v-get-web-domain-value
+++ b/bin/v-get-web-domain-value
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-insert-dns-domain b/bin/v-insert-dns-domain
index eb246f5d4..be66b0a82 100755
--- a/bin/v-insert-dns-domain
+++ b/bin/v-insert-dns-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
data=$2
src=$3
@@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '2' "$#" 'USER DATA [SRC] [RESTART]'
+check_args '2' "$#" 'USER DATA [SRC] [FLUSH] [RESTART]'
validate_format 'user' 'data'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user"
@@ -47,17 +47,16 @@ if [ "$flush" = 'records' ]; then
rm -f $USER_DATA/dns/$DOMAIN.conf
touch $USER_DATA/dns/$DOMAIN.conf
chmod 660 $USER_DATA/dns/$DOMAIN.conf
- exit
fi
# Flush domain
-if [ "$flush" = 'domain' ]; then
+if [ "$flush" ! = 'no' ]; then
sed -i "/DOMAIN='$DOMAIN'/d" $USER_DATA/dns.conf 2> /dev/null
fi
# Prepare values for the insert
dns_rec="DOMAIN='$DOMAIN' IP='$IP' TPL='$TPL' TTL='$TTL' EXP='$EXP'"
-dns_rec="$dns_rec SOA='$SOA' SRC='$src' RECORDS='$RECORDS'"
+dns_rec="$dns_rec SOA='$SOA' SERIAL="$SERIAL" SRC='$src' RECORDS='$RECORDS'"
dns_rec="$dns_rec SUSPENDED='$SUSPENDED' TIME='$TIME' DATE='$DATE'"
echo "$dns_rec" >> $USER_DATA/dns.conf
@@ -69,12 +68,10 @@ chmod 660 $USER_DATA/dns.conf
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-insert-dns-record b/bin/v-insert-dns-record
index 25f87dbe5..12bf1fd42 100755
--- a/bin/v-insert-dns-record
+++ b/bin/v-insert-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
data=$3
@@ -44,12 +44,10 @@ echo "$data" >> $USER_DATA/dns/$domain.conf
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-insert-dns-records b/bin/v-insert-dns-records
index 8fb2f55ce..9030ba74d 100755
--- a/bin/v-insert-dns-records
+++ b/bin/v-insert-dns-records
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
data_file=$3
@@ -47,12 +47,10 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-list-backup-host b/bin/v-list-backup-host
index b08c36265..125a1dd97 100755
--- a/bin/v-list-backup-host
+++ b/bin/v-list-backup-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
TYPE=$1
format=${2-shell}
diff --git a/bin/v-list-cron-job b/bin/v-list-cron-job
index 166525eab..450153453 100755
--- a/bin/v-list-cron-job
+++ b/bin/v-list-cron-job
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
job=$2
format=${3-shell}
diff --git a/bin/v-list-cron-jobs b/bin/v-list-cron-jobs
index 1fc327fde..5580b0743 100755
--- a/bin/v-list-cron-jobs
+++ b/bin/v-list-cron-jobs
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-database b/bin/v-list-database
index d9136aeed..295d934f6 100755
--- a/bin/v-list-database
+++ b/bin/v-list-database
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
format=${3-shell}
diff --git a/bin/v-list-database-host b/bin/v-list-database-host
index a3ab0d89c..b38b64670 100755
--- a/bin/v-list-database-host
+++ b/bin/v-list-database-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
format=${3-shell}
diff --git a/bin/v-list-database-hosts b/bin/v-list-database-hosts
index d59d42d26..d7e9e0feb 100755
--- a/bin/v-list-database-hosts
+++ b/bin/v-list-database-hosts
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=${1-mysql}
format=${2-shell}
diff --git a/bin/v-list-database-types b/bin/v-list-database-types
index 8a08a25b1..20e6044f3 100755
--- a/bin/v-list-database-types
+++ b/bin/v-list-database-types
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-databases b/bin/v-list-databases
index 282fb52c2..538f96493 100755
--- a/bin/v-list-databases
+++ b/bin/v-list-databases
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-dns-domain b/bin/v-list-dns-domain
index 8f24a37c3..51e9d183c 100755
--- a/bin/v-list-dns-domain
+++ b/bin/v-list-dns-domain
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
@@ -87,7 +87,8 @@ is_object_valid 'dns' 'DOMAIN' "$domain"
# Defining config and fields to select
conf=$USER_DATA/dns.conf
-fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $RECORDS $SUSPENDED $TIME $DATE'
+fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $SERIAL $SRC $RECORDS
+ $SUSPENDED $TIME $DATE'
# Listing domains
case $format in
diff --git a/bin/v-list-dns-domains b/bin/v-list-dns-domains
index e26452892..38c5e1954 100755
--- a/bin/v-list-dns-domains
+++ b/bin/v-list-dns-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
@@ -32,7 +32,8 @@ is_object_valid 'user' 'USER' "$user"
# Defining config and fields
conf=$USER_DATA/dns.conf
-fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $SRC $RECORDS $SUSPENDED $TIME $DATE'
+fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $SERIAL $SRC $RECORDS
+ $SUSPENDED $TIME $DATE'
# Listing domains
case $format in
diff --git a/bin/v-list-dns-domains-src b/bin/v-list-dns-domains-src
index 0ac5cae3f..50fc23db4 100755
--- a/bin/v-list-dns-domains-src
+++ b/bin/v-list-dns-domains-src
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-dns-records b/bin/v-list-dns-records
index 46e4da141..1e34202ce 100755
--- a/bin/v-list-dns-records
+++ b/bin/v-list-dns-records
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
diff --git a/bin/v-list-dns-template b/bin/v-list-dns-template
index 348153e63..89c464c0a 100755
--- a/bin/v-list-dns-template
+++ b/bin/v-list-dns-template
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
template=$1
format=${2-shell}
diff --git a/bin/v-list-dns-templates b/bin/v-list-dns-templates
index 18090b52b..6cffff38d 100755
--- a/bin/v-list-dns-templates
+++ b/bin/v-list-dns-templates
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-firewall b/bin/v-list-firewall
index c841f34e7..b45010375 100755
--- a/bin/v-list-firewall
+++ b/bin/v-list-firewall
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-firewall-ban b/bin/v-list-firewall-ban
index d34570295..a73b863ad 100755
--- a/bin/v-list-firewall-ban
+++ b/bin/v-list-firewall-ban
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-firewall-rule b/bin/v-list-firewall-rule
index ab9cfa4a5..441212da4 100755
--- a/bin/v-list-firewall-rule
+++ b/bin/v-list-firewall-rule
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
rule=$1
format=${2-shell}
diff --git a/bin/v-list-fs-directory b/bin/v-list-fs-directory
index f183d6a82..57a2c7c32 100755
--- a/bin/v-list-fs-directory
+++ b/bin/v-list-fs-directory
@@ -1,5 +1,8 @@
#!/bin/bash
-# File list wrapper
+# info: list directory
+# options: USER DIRECTORY
+#
+# The function lists directory on the file system
user=$1
path=$2
@@ -10,30 +13,33 @@ if [ -z "$user" ]; then
exit 1
fi
-# Checking users
+# Checking vesta user
if [ ! -e "$VESTA/data/users/$user" ]; then
- exit 1
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
fi
-# Checking homedir
+# Checking user homedir
homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
if [ -z $homedir ]; then
- exit 1
+ echo "Error: user home directory doesn't exist"
+ exit 12
fi
# Checking path
if [ ! -z "$path" ]; then
- # Validating absolute path
rpath=$(readlink -f "$path")
if [ -z "$(echo $rpath |grep $homedir)" ]; then
- exit 1
+ echo "Error: invalid path $dst_dir"
+ exit 2
fi
else
path=$homedir
fi
-# Listing files
-find "$path" -maxdepth 1 -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n"
+# Listing directory
+sudo -u $user find "$path" -maxdepth 1 \
+ -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM|%u|%g|%s|%P\n" 2>/dev/null
-
-exit
+# Exiting
+exit $?
diff --git a/bin/v-list-mail-account b/bin/v-list-mail-account
index 94a441a3b..ff5af1314 100755
--- a/bin/v-list-mail-account
+++ b/bin/v-list-mail-account
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
account=$3
diff --git a/bin/v-list-mail-account-autoreply b/bin/v-list-mail-account-autoreply
index 367f7e602..b1f5386ba 100755
--- a/bin/v-list-mail-account-autoreply
+++ b/bin/v-list-mail-account-autoreply
@@ -2,14 +2,14 @@
# info: list mail account autoreply
# options: USER DOMAIN ACCOUNT [FORMAT]
#
-# The function of obtainin mail account autoreply message.
+# The function of obtaining mail account autoreply message.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
account=$3
diff --git a/bin/v-list-mail-accounts b/bin/v-list-mail-accounts
index 9c1f399b6..f62b5c315 100755
--- a/bin/v-list-mail-accounts
+++ b/bin/v-list-mail-accounts
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
diff --git a/bin/v-list-mail-domain b/bin/v-list-mail-domain
index fae895279..e73140fdd 100755
--- a/bin/v-list-mail-domain
+++ b/bin/v-list-mail-domain
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
diff --git a/bin/v-list-mail-domain-dkim b/bin/v-list-mail-domain-dkim
index 72ba40093..727f53233 100755
--- a/bin/v-list-mail-domain-dkim
+++ b/bin/v-list-mail-domain-dkim
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
diff --git a/bin/v-list-mail-domain-dkim-dns b/bin/v-list-mail-domain-dkim-dns
index b3c8c4887..a78e36e9b 100755
--- a/bin/v-list-mail-domain-dkim-dns
+++ b/bin/v-list-mail-domain-dkim-dns
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
diff --git a/bin/v-list-mail-domains b/bin/v-list-mail-domains
index e9daa34d6..e4a9161e9 100755
--- a/bin/v-list-mail-domains
+++ b/bin/v-list-mail-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-remote-dns-hosts b/bin/v-list-remote-dns-hosts
index 00d265fdc..2269381de 100755
--- a/bin/v-list-remote-dns-hosts
+++ b/bin/v-list-remote-dns-hosts
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-sys-config b/bin/v-list-sys-config
index 740290294..fdab5280e 100755
--- a/bin/v-list-sys-config
+++ b/bin/v-list-sys-config
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Json function
diff --git a/bin/v-list-sys-cpu-status b/bin/v-list-sys-cpu-status
new file mode 100755
index 000000000..290ad5b24
--- /dev/null
+++ b/bin/v-list-sys-cpu-status
@@ -0,0 +1,42 @@
+#!/bin/bash
+# info: list system cpu info
+# options: [FORMAT]
+#
+# The function lists cpu information
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Displaying top 30
+top -b -n1 | head -n 37
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying process tree
+pstree -s
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying CPU information
+grep 'model name' /proc/cpuinfo|cut -f 2 -d : | sed "s/ //"
+echo
+lscpu 2>/dev/null
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-db-status b/bin/v-list-sys-db-status
new file mode 100755
index 000000000..6bbfca5a7
--- /dev/null
+++ b/bin/v-list-sys-db-status
@@ -0,0 +1,83 @@
+#!/bin/bash
+# info: list db status
+# options: [FORMAT]
+#
+# The function lists db server status
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking db system
+if [ -z "$DB_SYSTEM" ]; then
+ exit
+fi
+
+# Checking supported database systems
+for db in $(echo $DB_SYSTEM| tr ',' '\n'); do
+ OLD_IFS="$IFS"
+ IFS=$'\n'
+
+ # Checking database config
+ if [ -e "$VESTA/conf/$db.conf" ]; then
+
+ # Checking server status
+ for host_str in $(cat $VESTA/conf/$db.conf); do
+ eval $host_str
+
+ # Checking MySQL
+ if [ "$db" = 'mysql' ]; then
+ mycnf="$VESTA/conf/.mysql.$HOST"
+ if [ ! -e "$mycnf" ]; then
+ echo "[client]">$mycnf
+ echo "host='$HOST'" >> $mycnf
+ echo "user='$USER'" >> $mycnf
+ echo "password='$PASSWORD'" >> $mycnf
+ chmod 600 $mycnf
+ else
+ mypw=$(grep password $mycnf|cut -f 2 -d \')
+ if [ "$mypw" != "$PASSWORD" ]; then
+ echo "[client]">$mycnf
+ echo "host='$HOST'" >> $mycnf
+ echo "user='$USER'" >> $mycnf
+ echo "password='$PASSWORD'" >> $mycnf
+ chmod 660 $mycnf
+ fi
+ fi
+ echo "MySQL $HOST status"
+ mysqladmin --defaults-file=$mycnf status |sed -e "s/ /\n/g"
+ echo
+ mysqladmin --defaults-file=$mycnf processlist
+ echo -en "\n-------------------------------------"
+ echo -en "-------------------------------------\n\n"
+ fi
+
+ # Checking PostgreSQL
+ if [ "$db" = 'pgsql' ]; then
+ echo "PostgreSQL $HOST status"
+ export PGPASSWORD="$PASSWORD"
+ psql -h $HOST -U $USER -c "SELECT * FROM pg_stat_activity"
+ fi
+ done
+ fi
+ IFS="$OLD_IFS"
+done
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-disk-status b/bin/v-list-sys-disk-status
new file mode 100755
index 000000000..5596a449c
--- /dev/null
+++ b/bin/v-list-sys-disk-status
@@ -0,0 +1,40 @@
+#!/bin/bash
+# info: list disk information
+# options: [FORMAT]
+#
+# The function lists disk information
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Displaying disk usage
+df -h
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying I/O usage
+iostat -m
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying disk information
+fdisk -l
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-dns-status b/bin/v-list-sys-dns-status
new file mode 100755
index 000000000..b657bc891
--- /dev/null
+++ b/bin/v-list-sys-dns-status
@@ -0,0 +1,75 @@
+#!/bin/bash
+# info: list dns status
+# options: [FORMAT]
+#
+# The function lists dns server status
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking dns system
+if [ -z "$DNS_SYSTEM" ]; then
+ exit
+fi
+
+# Checking statistics-file on RHEL/CentOS
+if [ -e "/etc/named/named.conf" ]; then
+ conf="/etc/named/named.conf"
+ dump_file='/var/named/data/named_stats.txt'
+ dump_option=" dump-file \"$dump_file\";"
+ opt_check=$(grep $dump_file $conf |grep -v //)
+ if [ -z "$opt_check" ]; then
+ sed -i "s|options {|options {\n$dump_option|" $conf
+ service named restart >/dev/null 2>&1
+ fi
+fi
+if [ -e "/etc/named.conf" ]; then
+ conf="/etc/named.conf"
+ dump_file='/var/named/data/named_stats.txt'
+ dump_option=" dump-file \"$dump_file\";"
+ opt_check=$(grep $dump_file $conf |grep -v //)
+ if [ -z "$opt_check" ]; then
+ sed -i "s|options {|options {\n$dump_option|" $conf
+ service named restart >/dev/null 2>&1
+ fi
+fi
+
+# Checking statistics-file on Debian/Ubuntu
+if [ -e "/etc/bind/named.conf" ]; then
+ conf="/etc/bind/named.conf.options"
+ dump_file='/var/cache/bind/named.stats'
+ #dump_option=" dump-file \"$dump_file\";"
+ #opt_check=$(grep $dump_file $conf |grep -v //)
+ #if [ -z "$opt_check" ]; then
+ # sed -i "s|options {|options {\n$dump_option|" $conf
+ # service named restart >/dev/null 2>&1
+ #fi
+fi
+
+# Generating dns stats
+rm -f $dump_file 2>/dev/null
+/usr/sbin/rndc stats 2>/dev/null
+
+# Displaying dns status
+if [ -e "$dump_file" ]; then
+ cat $dump_file
+fi
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-info b/bin/v-list-sys-info
index c9f9ec0d2..975f7249f 100755
--- a/bin/v-list-sys-info
+++ b/bin/v-list-sys-info
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-sys-interfaces b/bin/v-list-sys-interfaces
index 3bc8be1ef..bb4dea253 100755
--- a/bin/v-list-sys-interfaces
+++ b/bin/v-list-sys-interfaces
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-sys-ip b/bin/v-list-sys-ip
index fac7d358d..d93957bfb 100755
--- a/bin/v-list-sys-ip
+++ b/bin/v-list-sys-ip
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
IP=$ip
format=${2-shell}
diff --git a/bin/v-list-sys-ips b/bin/v-list-sys-ips
index 85b5635e0..4ab16179b 100755
--- a/bin/v-list-sys-ips
+++ b/bin/v-list-sys-ips
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
@@ -18,7 +18,7 @@ source $VESTA/func/main.sh
# Json function
json_list_ips() {
echo '{'
- ip_list=$(ls $VESTA/data/ips/)
+ ip_list=$(ls --sort=time $VESTA/data/ips/)
fileds_count=$(echo "$fields" | wc -w)
for IP in $ip_list; do
ip_data=$(cat $VESTA/data/ips/$IP)
diff --git a/bin/v-list-sys-languages b/bin/v-list-sys-languages
index 685bafc3f..e3459fc7e 100755
--- a/bin/v-list-sys-languages
+++ b/bin/v-list-sys-languages
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-sys-mail-status b/bin/v-list-sys-mail-status
new file mode 100755
index 000000000..fcf5fbc4b
--- /dev/null
+++ b/bin/v-list-sys-mail-status
@@ -0,0 +1,46 @@
+#!/bin/bash
+# info: list mail status
+# options: [FORMAT]
+#
+# The function lists mail server status
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking mail system
+if [ -z "$MAIL_SYSTEM" ]; then
+ exit
+fi
+
+# Displaying exim queue status
+echo "Exim queue status"
+exim -bp
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying exim stats
+if [ -e "/var/log/exim4/mainlog" ]; then
+ eximstats /var/log/exim4/mainlog 2>/dev/null
+else
+ eximstats /var/log/exim/main.log 2>/dev/null
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-memory-status b/bin/v-list-sys-memory-status
new file mode 100755
index 000000000..25b7ebff6
--- /dev/null
+++ b/bin/v-list-sys-memory-status
@@ -0,0 +1,40 @@
+#!/bin/bash
+# info: list virtual memory info
+# options: [FORMAT]
+#
+# The function lists virtual memory information
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Displaying memory and swap usage
+free -t -m
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying memory stats
+vmstat -S m -s
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying ram information
+dmidecode -t 17 2>/dev/null
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-network-status b/bin/v-list-sys-network-status
new file mode 100755
index 000000000..8414f8009
--- /dev/null
+++ b/bin/v-list-sys-network-status
@@ -0,0 +1,40 @@
+#!/bin/bash
+# info: list system network status
+# options: [FORMAT]
+#
+# The function lists network status
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Displaying network stats
+ss -s
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying network usage
+lsof -itcp -n -P
+echo -en "\n-------------------------------------"
+echo -en "-------------------------------------\n\n"
+
+# Displaying network interfaces
+ifconfig
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services
index 4bea1b38f..8e08d1755 100755
--- a/bin/v-list-sys-services
+++ b/bin/v-list-sys-services
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
@@ -117,9 +117,9 @@ fi
service=$DNS_SYSTEM
if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then
if [ "$service" == 'bind' ] || [ "$service" == 'bind9' ]; then
- service='named'
+ proc_name='named'
fi
- get_srv_state $service
+ get_srv_state $service $proc_name
str="$str\nNAME='$service' SYSTEM='dns server' STATE='$state' CPU='$cpu'"
str="$str MEM='$mem' RTIME='$rtime'"
fi
@@ -170,9 +170,16 @@ fi
service=$DB_SYSTEM
if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then
for db in ${DB_SYSTEM//,/ }; do
+ db_proc_name=''
service="$db"
- if [ "$service" == 'mysql' ]; then
- db_proc_name='mysqld'
+ if [ "$service" = 'mysql' ]; then
+ if [ -e "/etc/redhat-release" ]; then
+ service='mysqld'
+ db_proc_name='mysqld'
+ if [ -e "/usr/lib/systemd/system/mariadb.service" ]; then
+ service='mariadb'
+ fi
+ fi
fi
if [ "$service" == 'pgsql' ]; then
service='postgresql'
@@ -180,6 +187,9 @@ if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then
if [ ! -e "/etc/redhat-release" ]; then
db_proc_name='postgres'
fi
+ if [ ! -e '/etc/init.d/postgresql' ]; then
+ db_proc_name='postgres'
+ fi
fi
get_srv_state $service $db_proc_name
str="$str\nNAME='$service' SYSTEM='database server' STATE='$state'"
diff --git a/bin/v-list-sys-shells b/bin/v-list-sys-shells
index 091e7d8e8..be43a16e3 100755
--- a/bin/v-list-sys-shells
+++ b/bin/v-list-sys-shells
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-sys-users b/bin/v-list-sys-users
index 3bae74183..16be8d658 100755
--- a/bin/v-list-sys-users
+++ b/bin/v-list-sys-users
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-sys-vesta-autoupdate b/bin/v-list-sys-vesta-autoupdate
index ca64646c2..ba89029f2 100755
--- a/bin/v-list-sys-vesta-autoupdate
+++ b/bin/v-list-sys-vesta-autoupdate
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user='admin'
format=${1-shell}
diff --git a/bin/v-list-sys-vesta-updates b/bin/v-list-sys-vesta-updates
index 12db31ac0..0fefa5840 100755
--- a/bin/v-list-sys-vesta-updates
+++ b/bin/v-list-sys-vesta-updates
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
@@ -42,8 +42,8 @@ else
dpkg_data=$(dpkg-query -s vesta)
pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta.list)
ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
- VERSION=$(echo "$dpkg_data"|grep Version |cut -f 2 -d ' '|cut -f 1 -d \-)
- RELEASE=$(echo "$dpkg_data"|grep Version |cut -f 2 -d ' '|cut -f 2 -d \-)
+ VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
+ RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
DATE=$(date -d @$pkg_date +"%F")
TIME=$(date -d @$pkg_date +"%T")
fi
@@ -65,8 +65,8 @@ else
dpkg_data=$(dpkg-query -s vesta-php)
pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta-php.list)
ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
- VERSION=$(echo "$dpkg_data"|grep Version |cut -f 2 -d ' '|cut -f 1 -d \-)
- RELEASE=$(echo "$dpkg_data"|grep Version |cut -f 2 -d ' '|cut -f 2 -d \-)
+ VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
+ RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
DATE=$(date -d @$pkg_date +"%F")
TIME=$(date -d @$pkg_date +"%T")
fi
@@ -89,8 +89,8 @@ else
dpkg_data=$(dpkg-query -s vesta-nginx)
pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta-nginx.list)
ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
- VERSION=$(echo "$dpkg_data"|grep Version |cut -f 2 -d ' '|cut -f 1 -d \-)
- RELEASE=$(echo "$dpkg_data"|grep Version |cut -f 2 -d ' '|cut -f 2 -d \-)
+ VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
+ RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
DATE=$(date -d @$pkg_date +"%F")
TIME=$(date -d @$pkg_date +"%T")
fi
diff --git a/bin/v-list-sys-web-status b/bin/v-list-sys-web-status
new file mode 100755
index 000000000..eb58c81ce
--- /dev/null
+++ b/bin/v-list-sys-web-status
@@ -0,0 +1,49 @@
+#!/bin/bash
+# info: list web status
+# options: [FORMAT]
+#
+# The function lists web server status
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+#format=${1-shell}
+
+# Includes
+#source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Checking web system
+if [ -z "$WEB_SYSTEM" ]; then
+ exit
+fi
+
+# Displaying proxy status
+if [ "$PROXY_SYSTEM" = 'nginx' ]; then
+ echo "$PROXY_SYSTEM STATUS "| tr '[:lower:]' '[:upper:]'
+ wget -qO- http://localhost:8084/
+ echo " "
+fi
+
+# Displaying web server status
+echo "$WEB_SYSTEM STATUS "| tr '[:lower:]' '[:upper:]'
+if [ "$WEB_SYSTEM" != 'nginx' ]; then
+ wget -qO- http://localhost:8081/server-status/ |\
+ egrep -v "html|DOCTYPE|h1>|title|head"
+else
+ wget -qO- http://localhost:8084/
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-user b/bin/v-list-user
index b1cb64e57..eef71883e 100755
--- a/bin/v-list-user
+++ b/bin/v-list-user
@@ -2,7 +2,7 @@
# info: list system user
# options: USER [FORMAT]
#
-# The function for obtainig the list of all user's parameters.
+# The function for obtaining the list of all user's parameters.
#----------------------------------------------------------#
@@ -12,7 +12,7 @@
# Includes
source $VESTA/func/main.sh
-# Argument defenition
+# Argument definition
user=$1
USER="$user"
format=${2-shell}
@@ -82,7 +82,7 @@ fields='$USER $FNAME $LNAME $PACKAGE $WEB_TEMPLATE $BACKEND_TEMPLATE
$U_USERS $U_DISK $U_DISK_DIRS $U_DISK_WEB $U_DISK_MAIL $U_DISK_DB
$U_BANDWIDTH $U_WEB_DOMAINS $U_WEB_SSL $U_WEB_ALIASES $U_DNS_DOMAINS
$U_DNS_RECORDS $U_MAIL_DOMAINS $U_MAIL_DKIM $U_MAIL_ACCOUNTS $U_DATABASES
- $U_CRON_JOBS $U_BACKUPS $LANGUAGE $HOME $TIME $DATE'
+ $U_CRON_JOBS $U_BACKUPS $LANGUAGE $HOME $NOTIFICATIONS $TIME $DATE'
# Listing user
case $format in
diff --git a/bin/v-list-user-backup b/bin/v-list-user-backup
index 6fa99af65..e20069172 100755
--- a/bin/v-list-user-backup
+++ b/bin/v-list-user-backup
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
backup=$2
format=${3-shell}
diff --git a/bin/v-list-user-backup-exclusions b/bin/v-list-user-backup-exclusions
index cef78a033..a06d101e7 100755
--- a/bin/v-list-user-backup-exclusions
+++ b/bin/v-list-user-backup-exclusions
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
USER=''
@@ -74,6 +74,14 @@ is_object_valid 'user' 'USER' "$user"
# Action #
#----------------------------------------------------------#
+# Flush variables
+WEB=''
+DNS=''
+MAIL=''
+DB=''
+CRON=''
+USER=''
+
# Defining fileds to select
touch $USER_DATA/backup-excludes.conf
fields="\$WEB \$DNS \$MAIL \$DB \$CRON \$USER"
diff --git a/bin/v-list-user-backups b/bin/v-list-user-backups
index 80ed675be..eb666ab12 100755
--- a/bin/v-list-user-backups
+++ b/bin/v-list-user-backups
@@ -2,14 +2,14 @@
# info: list user backups
# options: USER [FORMAT]
#
-# The function for obtainig the list of available user backups.
+# The function for obtaining the list of available user backups.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-user-favourites b/bin/v-list-user-favourites
new file mode 100755
index 000000000..362d39a13
--- /dev/null
+++ b/bin/v-list-user-favourites
@@ -0,0 +1,105 @@
+#!/bin/bash
+# info: list user favourites
+# options: USER [FORMAT]
+#
+# The function for getting the list of favourite user objects
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+format=${2-shell}
+
+# Includes
+source $VESTA/func/main.sh
+
+# Json function
+json_list_favourites() {
+ i=1
+ fileds_count=$(echo "$fields" | wc -w)
+ fvrt_data=$(cat $USER_DATA/favourites.conf 2>/dev/null)
+ echo '{'
+ eval $fvrt_data
+ for field in $fields; do
+ eval value=$field
+ if [ $i -eq 1 ]; then
+ echo -e "\t\"$value\": {"
+ else
+ if [ $fileds_count -eq $i ]; then
+ echo -e "\t\t\"${field//$/}\": \"${value//,/, }\""
+ else
+ echo -e "\t\t\"${field//$/}\": \"${value//,/, }\","
+ fi
+ fi
+ (( ++i))
+ done
+ #if [ -n "$value" ]; then
+ echo -e ' }'
+ #fi
+ echo -e '}'
+}
+
+# Shell function
+shell_list_favourites() {
+ line=$(cat $USER_DATA/favourites.conf 2>/dev/null)
+ eval $line
+ for field in $fields; do
+ eval key="$field"
+ if [ -z "$key" ]; then
+ key='NULL'
+ fi
+ echo "${field//$/}: $key "
+ done
+}
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+# Checking args
+check_args '1' "$#" 'USER [FORMAT]'
+validate_format 'user'
+is_object_valid 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Flushing vars
+USER=''
+WEB=''
+DNS=''
+DNS_REC=''
+MAIL=''
+MAIL_ACC=''
+DB=''
+CRON=''
+BACKUP=''
+IP=''
+PACKAGE=''
+FIREWALL=''
+
+# Defining fileds to select
+OBJ='Favourites'
+fields='$OBJ $USER $WEB $DNS $DNS_REC $MAIL $MAIL_ACC $DB $CRON $BACKUP
+ $IP $PACKAGE $FIREWALL'
+
+# Listing favourites
+case $format in
+ json) json_list_favourites ;;
+ plain) shell_list_favourites ;;
+ shell) shell_list_favourites | column -t ;;
+ *) check_args '1' '0' 'USER [FORMAT]'
+esac
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-user-ips b/bin/v-list-user-ips
index ec29f00bd..d2b7930ce 100755
--- a/bin/v-list-user-ips
+++ b/bin/v-list-user-ips
@@ -2,14 +2,14 @@
# info: list user ips
# options: USER [FORMAT]
#
-# The function for obtainig the list of available ip addresses.
+# The function for obtaining the list of available ip addresses.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-user-log b/bin/v-list-user-log
index c5fdcc1f7..bcd0f7ce1 100755
--- a/bin/v-list-user-log
+++ b/bin/v-list-user-log
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-user-notifications b/bin/v-list-user-notifications
new file mode 100755
index 000000000..23cd3f87a
--- /dev/null
+++ b/bin/v-list-user-notifications
@@ -0,0 +1,97 @@
+#!/bin/bash
+# info: list user notifications
+# options: USER [FORMAT]
+#
+# The function for getting the list notifications
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+format=${2-shell}
+
+# Includes
+source $VESTA/func/main.sh
+
+# Json function
+json_list_notifications() {
+ echo '{'
+ fileds_count=$(echo $fields| wc -w )
+ while read line; do
+ eval $line
+ if [ -n "$data" ]; then
+ echo -e ' },'
+ fi
+ i=1
+ IFS=' '
+ for field in $fields; do
+ eval value=\"$field\"
+ value=$(echo "$value"|sed -e 's/"/\\"/g' -e "s/%quote%/'/g")
+ if [ $i -eq 1 ]; then
+ (( ++i))
+ echo -e "\t\"$value\": {"
+ else
+ if [ $i -lt $fileds_count ]; then
+ (( ++i))
+ echo -e "\t\t\"${field//$/}\": \"${value//,/, }\","
+ else
+ echo -e "\t\t\"${field//$/}\": \"${value//,/, }\""
+ data=1
+ fi
+ fi
+ done
+ done < $conf
+ if [ -n "$data" ]; then
+ echo -e ' }'
+ fi
+ echo -e '}'
+}
+
+# Shell function
+shell_list_notifications() {
+ while read line ; do
+ eval $line
+ echo "$TOPIC" |sed -e "s/%quote%/'/g"
+ echo "$NOTICE" |sed -e "s/%quote%/'/g"
+ echo "$DATE $TIME"
+ echo "--"
+ echo
+ done < $conf
+}
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+# Checking args
+check_args '1' "$#" 'USER [FORMAT]'
+validate_format 'user'
+is_object_valid 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Defining fileds to select
+conf=$USER_DATA/notifications.conf
+fields='$NID $TOPIC $NOTICE $TYPE $ACK $TIME $DATE'
+
+# Listing favourites
+case $format in
+ json) json_list_notifications ;;
+ plain) shell_list_notifications ;;
+ shell) shell_list_notifications ;;
+ *) check_args '1' '0' 'USER [FORMAT]'
+esac
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-list-user-ns b/bin/v-list-user-ns
index 1da0fe5f1..5c950fa5e 100755
--- a/bin/v-list-user-ns
+++ b/bin/v-list-user-ns
@@ -2,14 +2,14 @@
# info: list user nameservers
# options: USER [FORMAT]
#
-# Function for obtainig the list of user's DNS servers.
+# Function for obtaining the list of user's DNS servers.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-user-package b/bin/v-list-user-package
index df26482a0..38a390f88 100755
--- a/bin/v-list-user-package
+++ b/bin/v-list-user-package
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
package=$1
PACKAGE=$package
format=${2-shell}
diff --git a/bin/v-list-user-packages b/bin/v-list-user-packages
index 86a7c414d..4f0523429 100755
--- a/bin/v-list-user-packages
+++ b/bin/v-list-user-packages
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
@@ -19,7 +19,7 @@ source $VESTA/func/main.sh
json_list_pkgs() {
echo '{'
fileds_count=$(echo "$fields" | wc -w)
- for package in $(ls -t $VESTA/data/packages |grep .pkg); do
+ for package in $(ls --sort=time $VESTA/data/packages |grep .pkg); do
PACKAGE=${package/.pkg/}
pkg_data=$(cat $VESTA/data/packages/$package)
eval $pkg_data
diff --git a/bin/v-list-user-stats b/bin/v-list-user-stats
index 8126fa2ea..8b56fcc88 100755
--- a/bin/v-list-user-stats
+++ b/bin/v-list-user-stats
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-users b/bin/v-list-users
index d0f2ede63..4c65b1051 100755
--- a/bin/v-list-users
+++ b/bin/v-list-users
@@ -2,14 +2,14 @@
# info: list system users
# options: [FORMAT]
#
-# The function for obtainig the list of all server's users.
+# The function for obtaining the list of all server's users.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Json function
diff --git a/bin/v-list-users-stats b/bin/v-list-users-stats
index 5416da7b8..61358ef27 100755
--- a/bin/v-list-users-stats
+++ b/bin/v-list-users-stats
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-web-domain b/bin/v-list-web-domain
index 1a6cc1562..13f1fd715 100755
--- a/bin/v-list-web-domain
+++ b/bin/v-list-web-domain
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
@@ -76,7 +76,7 @@ conf=$USER_DATA/web.conf
# Defining fileds to select
fields='$DOMAIN $IP $IP6 $U_DISK $U_BANDWIDTH $TPL $ALIAS $STATS $STATS_USER
- $SSL $SSL_HOME $FTP_USER $FTP_PATH $BACKEND $PROXY $PROXY_EXT
+ $SSL $SSL_HOME $FTP_USER $FTP_PATH $BACKEND $PROXY $PROXY_EXT $AUTH_USER
$DOCUMENT_ROOT $SUSPENDED $TIME $DATE'
# Defining document root
diff --git a/bin/v-list-web-domain-accesslog b/bin/v-list-web-domain-accesslog
index 9fdff009a..2d5a6918c 100755
--- a/bin/v-list-web-domain-accesslog
+++ b/bin/v-list-web-domain-accesslog
@@ -1,6 +1,6 @@
#!/bin/bash
# info: list web domain access log
-# options: USER DOMAIN [LINES]
+# options: USER DOMAIN [LINES] [FORMAT]
#
# The function of obtaining raw access web domain logs.
@@ -9,36 +9,69 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
-lines=${3-70}
+ttl=${3-70}
+format=${4-shell}
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
+# Json function
+json_list_log() {
+ i=1
+ echo '['
+ for str in $lines; do
+ str=$(echo "$str" |sed -e 's/"/\\"/g')
+ if [ "$i" -lt "$counter" ]; then
+ echo -e "\t\"$str\","
+ else
+ echo -e "\t\"$str\""
+ fi
+ (( ++i))
+ done
+ echo "]"
+}
+
+# Shell function
+shell_list_log() {
+ echo "$lines"
+}
+
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
-check_args '2' "$#" 'USER DOMAIN [FORMAT]'
+check_args '2' "$#" 'USER DOMAIN [LINES] [FORMAT]'
+validate_format 'user' 'domain' 'ttl'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'web' 'DOMAIN' "$domain"
+
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Check number of output lines
-if [ "$lines" -gt '3000' ]; then
+if [ "$ttl" -gt '3000' ]; then
read_cmd="cat"
else
- read_cmd="tail -n $lines"
+ read_cmd="tail -n $ttl"
fi
-$read_cmd /var/log/$WEB_SYSTEM/domains/$domain.log
+lines=$($read_cmd /var/log/$WEB_SYSTEM/domains/$domain.log)
+counter=$(echo "$lines" |wc -l)
+IFS=$'\n'
+
+# Listing logs
+case $format in
+ json) json_list_log ;;
+ plain) shell_list_log ;;
+ shell) shell_list_log ;;
+esac
#----------------------------------------------------------#
diff --git a/bin/v-list-web-domain-errorlog b/bin/v-list-web-domain-errorlog
index 04520213c..f1d92d8e7 100755
--- a/bin/v-list-web-domain-errorlog
+++ b/bin/v-list-web-domain-errorlog
@@ -1,6 +1,6 @@
#!/bin/bash
# info: list web domain error log
-# options: USER DOMAIN [LINES]
+# options: USER DOMAIN [LINES] [FORMAT]
#
# The function of obtaining raw error web domain logs.
@@ -9,36 +9,69 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
-lines=${3-70}
+ttl=${3-70}
+format=${4-shell}
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
+# Json function
+json_list_log() {
+ i=1
+ echo '['
+ for str in $lines; do
+ str=$(echo "$str" |sed -e 's/"/\\"/g')
+ if [ "$i" -lt "$counter" ]; then
+ echo -e "\t\"$str\","
+ else
+ echo -e "\t\"$str\""
+ fi
+ (( ++i))
+ done
+ echo "]"
+}
+
+# Shell function
+shell_list_log() {
+ echo "$lines"
+}
+
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
-check_args '2' "$#" 'USER DOMAIN [FORMAT]'
+check_args '2' "$#" 'USER DOMAIN [LINES] [FORMAT]'
+validate_format 'user' 'domain' 'ttl'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'web' 'DOMAIN' "$domain"
+
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Check number of output lines
-if [ "$lines" -gt '3000' ]; then
+if [ "$ttl" -gt '3000' ]; then
read_cmd="cat"
else
- read_cmd="tail -n $lines"
+ read_cmd="tail -n $ttl"
fi
-$read_cmd /var/log/$WEB_SYSTEM/domains/$domain.error.log
+lines=$($read_cmd /var/log/$WEB_SYSTEM/domains/$domain.error.log)
+counter=$(echo "$lines" |wc -l)
+IFS=$'\n'
+
+# Listing logs
+case $format in
+ json) json_list_log ;;
+ plain) shell_list_log ;;
+ shell) shell_list_log ;;
+esac
#----------------------------------------------------------#
diff --git a/bin/v-list-web-domain-ssl b/bin/v-list-web-domain-ssl
index a8696572f..4d8b9ab88 100755
--- a/bin/v-list-web-domain-ssl
+++ b/bin/v-list-web-domain-ssl
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
format=${3-shell}
diff --git a/bin/v-list-web-domains b/bin/v-list-web-domains
index 8bc05df4e..a5cb9113a 100755
--- a/bin/v-list-web-domains
+++ b/bin/v-list-web-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
@@ -35,7 +35,7 @@ conf=$USER_DATA/web.conf
# Defining fileds to select
fields="\$DOMAIN \$IP \$IP6 \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS \$STATS"
-fields="$fields \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER \$FTP_PATH"
+fields="$fields \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER \$FTP_PATH \$AUTH_USER"
fields="$fields \$BACKEND \$PROXY \$PROXY_EXT \$SUSPENDED \$TIME \$DATE"
# Listing domains
diff --git a/bin/v-list-web-domains-alias b/bin/v-list-web-domains-alias
index fb8f24514..572cc56ab 100755
--- a/bin/v-list-web-domains-alias
+++ b/bin/v-list-web-domains-alias
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-web-domains-proxy b/bin/v-list-web-domains-proxy
index d2fef4133..6e8144864 100755
--- a/bin/v-list-web-domains-proxy
+++ b/bin/v-list-web-domains-proxy
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-web-domains-ssl b/bin/v-list-web-domains-ssl
index 6f05bc743..84c58db73 100755
--- a/bin/v-list-web-domains-ssl
+++ b/bin/v-list-web-domains-ssl
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-web-domains-stats b/bin/v-list-web-domains-stats
index 52c3eb23a..64e01d53c 100755
--- a/bin/v-list-web-domains-stats
+++ b/bin/v-list-web-domains-stats
@@ -12,7 +12,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
format=${2-shell}
diff --git a/bin/v-list-web-stats b/bin/v-list-web-stats
index 33d56c24a..e77889ced 100755
--- a/bin/v-list-web-stats
+++ b/bin/v-list-web-stats
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-web-templates b/bin/v-list-web-templates
index e4e472f17..fb4219bef 100755
--- a/bin/v-list-web-templates
+++ b/bin/v-list-web-templates
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
@@ -18,8 +18,8 @@ source $VESTA/conf/vesta.conf
# Json function
json_list_wtpl() {
- templates=$(ls -t $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
- templates=$(echo "$templates" | grep "\.tpl" |cut -f 1 -d '.' )
+ templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
+ templates=$(echo "$templates" | grep '\.tpl' | sed 's/\.tpl$//')
t_counter=$(echo "$templates" | wc -w)
i=1
echo '['
@@ -36,8 +36,8 @@ json_list_wtpl() {
# Shell function
shell_list_wtpl() {
- templates=$(ls -t $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
- templates=$(echo "$templates" | grep "\.tpl" |cut -f 1 -d '.' )
+ templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
+ templates=$(echo "$templates" | grep '\.tpl' | sed 's/\.tpl$//')
if [ -z "$nohead" ]; then
echo "Templates"
echo "----------"
diff --git a/bin/v-list-web-templates-backend b/bin/v-list-web-templates-backend
index dfcfee249..4d520e7be 100755
--- a/bin/v-list-web-templates-backend
+++ b/bin/v-list-web-templates-backend
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-list-web-templates-proxy b/bin/v-list-web-templates-proxy
index 852fee82b..42673592f 100755
--- a/bin/v-list-web-templates-proxy
+++ b/bin/v-list-web-templates-proxy
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
format=${1-shell}
# Includes
diff --git a/bin/v-move-fs-directory b/bin/v-move-fs-directory
new file mode 100755
index 000000000..f101d9955
--- /dev/null
+++ b/bin/v-move-fs-directory
@@ -0,0 +1,59 @@
+#!/bin/bash
+# info: move file
+# options: USER SRC_DIRECTORY DST_DIRECTORY
+#
+# The function moved file or directory on the file system. This function
+# can also be used to rename files just like normal mv command.
+
+user=$1
+src_dir=$2
+dst_dir=$3
+
+# Checking arguments
+if [ -z "$dst_dir" ]; then
+ echo "Usage: USER SRC_DIRECTORY DST_DIRECTORY"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking source file
+if [ ! -d "$src_dir" ]; then
+ echo "Error: source directory $src_dir doesn't exist"
+ exit 3
+fi
+
+# Checking source path
+rpath=$(readlink -f "$src_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_dir"
+ exit 2
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_dir")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_dir"
+ exit 2
+fi
+
+# Moving directory
+sudo -u $user mv "$src_dir" "$dst_dir" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: directory $src_dir was not moved"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-move-fs-file b/bin/v-move-fs-file
new file mode 100755
index 000000000..3671e0e58
--- /dev/null
+++ b/bin/v-move-fs-file
@@ -0,0 +1,59 @@
+#!/bin/bash
+# info: move file
+# options: USER SRC_FILE DST_FLE
+#
+# The function moved file or directory on the file system. This function
+# can also be used to rename files just like normal mv command.
+
+user=$1
+src_file=$2
+dst_file=$3
+
+# Checking arguments
+if [ -z "$dst_file" ]; then
+ echo "Usage: USER SRC_FILE DST_FILE"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking source file
+if [ ! -f "$src_file" ]; then
+ echo "Error: source file $src_file doesn't exist"
+ exit 3
+fi
+
+# Checking source path
+rpath=$(readlink -f "$src_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_file"
+ exit 2
+fi
+
+# Checking destination path
+rpath=$(readlink -f "$dst_file")
+if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid destination path $dst_file"
+ exit 2
+fi
+
+# Moving file
+sudo -u $user mv "$src_file" "$dst_file" >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Error: file $src_file was not moved"
+ exit 3
+fi
+
+# Exiting
+exit
diff --git a/bin/v-open-fs-file b/bin/v-open-fs-file
index d5c8ea3a6..b04ad4933 100755
--- a/bin/v-open-fs-file
+++ b/bin/v-open-fs-file
@@ -1,36 +1,46 @@
#!/bin/bash
-# File reader
+# info: open file
+# options: USER FILE
+#
+# The function opens/reads files on the file system
user=$1
-path=$2
+src_file=$2
# Checking arguments
-if [ -z "$path" ]; then
- echo "Usage: USER PATH"
+if [ -z "$src_file" ]; then
+ echo "Usage: USER FILE"
exit 1
fi
-# Checking users
+# Checking vesta user
if [ ! -e "$VESTA/data/users/$user" ]; then
- exit 1
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
fi
-# Checking homedir
+# Checking user homedir
homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
if [ -z $homedir ]; then
- exit 1
+ echo "Error: user home directory doesn't exist"
+ exit 12
fi
# Checking path
-if [ ! -z "$path" ]; then
- # Validating absolute path
- rpath=$(readlink -f "$path")
- if [ -z "$(echo $rpath |grep $homedir)" ]; then
- exit 1
+if [ ! -z "$src_file" ]; then
+ rpath=$(readlink -f "$src_file")
+ if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
+ echo "Error: invalid source path $src_file"
+ exit 2
fi
fi
-cat "$path"
+# Reading file
+sudo -u $user cat "$src_file" 2>/dev/null
+if [ $? -ne 0 ]; then
+ echo "Error: file $src_file was not opened"
+ exit 3
+fi
+# Exiting
exit
-
diff --git a/bin/v-rebuild-cron-jobs b/bin/v-rebuild-cron-jobs
index 8fcd2da2d..0d75000eb 100755
--- a/bin/v-rebuild-cron-jobs
+++ b/bin/v-rebuild-cron-jobs
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -40,12 +40,10 @@ sync_cron_jobs
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-rebuild-databases b/bin/v-rebuild-databases
index f3f74cbc6..4d50a09da 100755
--- a/bin/v-rebuild-databases
+++ b/bin/v-rebuild-databases
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-rebuild-dns-domain b/bin/v-rebuild-dns-domain
index 7fdb0bd33..3e123992f 100755
--- a/bin/v-rebuild-dns-domain
+++ b/bin/v-rebuild-dns-domain
@@ -1,6 +1,6 @@
#!/bin/bash
# info: rebuild dns domain
-# options: USER DOMAIN [RESTART]
+# options: USER DOMAIN [RESTART] [UPDATE_SERIAL]
#
# The function rebuilds DNS configuration files.
@@ -9,10 +9,11 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$2
restart=$3
+update_serial=$4
# Includes
source $VESTA/func/main.sh
@@ -25,7 +26,7 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '2' "$#" 'USER DOMAIN [RESTART]'
+check_args '2' "$#" 'USER DOMAIN [RESTART] [UPDATE_SERIAL]'
validate_format 'user' 'domain'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user"
@@ -59,10 +60,15 @@ if [ -e '/etc/bind/named.conf' ]; then
dns_conf='/etc/bind/named.conf'
fi
-# Remove old user's zone
+# Deleting old user's zone
sed -i "/\/$user\/conf\/dns\/$domain/d" $dns_conf
-# Starting loop
+# Updating zone serial
+if [ "$update_serial" != 'no' ]; then
+ update_domain_serial
+fi
+
+# Rebuiling zone config
rebuild_dns_domain_conf
@@ -75,12 +81,10 @@ update_user_value "$user" '$U_DNS_DOMAINS' "$user_domains"
update_user_value "$user" '$U_DNS_RECORDS' "$user_records"
update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$restart"
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-rebuild-dns-domains b/bin/v-rebuild-dns-domains
index 971a99f45..e3303de62 100755
--- a/bin/v-rebuild-dns-domains
+++ b/bin/v-rebuild-dns-domains
@@ -1,6 +1,6 @@
#!/bin/bash
# info: rebuild dns domains
-# options: USER [RESTART]
+# options: USER [RESTART] [UPDATE_SERIAL]
#
# The function rebuilds DNS configuration files.
@@ -9,9 +9,10 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
+update_serial=$3
# Includes
source $VESTA/func/main.sh
@@ -24,7 +25,7 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
-check_args '1' "$#" 'USER [RESTART]'
+check_args '1' "$#" 'USER [RESTART] [UPDATE_SERIAL]'
validate_format 'user'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user"
@@ -65,6 +66,9 @@ sed -i "/\/$user\/conf\/dns/d" $dns_conf
# Starting loop
for domain in $(search_objects 'dns' 'DOMAIN' "*" 'DOMAIN'); do
+ if [ "$update_serial" != 'no' ]; then
+ update_domain_serial
+ fi
rebuild_dns_domain_conf
done
@@ -78,12 +82,10 @@ update_user_value "$user" '$U_DNS_DOMAINS' "$user_domains"
update_user_value "$user" '$U_DNS_RECORDS' "$user_records"
update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
-# Restart named
+# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Bind restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-rebuild-mail-domains b/bin/v-rebuild-mail-domains
index 9faeb29a8..8e101a947 100755
--- a/bin/v-rebuild-mail-domains
+++ b/bin/v-rebuild-mail-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-rebuild-user b/bin/v-rebuild-user
index 2d57f6ae8..52385694e 100755
--- a/bin/v-rebuild-user
+++ b/bin/v-rebuild-user
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
diff --git a/bin/v-rebuild-web-domains b/bin/v-rebuild-web-domains
index b0dfeb9d4..c0fe2a1fc 100755
--- a/bin/v-rebuild-web-domains
+++ b/bin/v-rebuild-web-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -159,18 +159,14 @@ update_user_value "$user" '$U_WEB_DOMAINS' "$user_domains"
update_user_value "$user" '$U_WEB_SSL' "$user_ssl"
update_user_value "$user" '$U_WEB_ALIASES' "$user_aliases"
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- if [ ! -z "$PROXY_SYSTEM" ];then
+ if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-restart-dns b/bin/v-restart-dns
index fe960e269..9945f32e9 100755
--- a/bin/v-restart-dns
+++ b/bin/v-restart-dns
@@ -25,7 +25,7 @@ send_email_report() {
email=$(echo "$email" | cut -f 2 -d "'")
tmpfile=$(mktemp)
subj="$(hostname): $DNS_SYSTEM restart failed"
- named-checkconf $dns_conf >> $tmpfile 2>&1
+ /usr/sbin/named-checkconf $dns_conf >> $tmpfile 2>&1
service $DNS_SYSTEM restart >> $tmpfile 2>&1
cat $tmpfile | $send_mail -s "$subj" $email
rm -f $tmpfile
diff --git a/bin/v-restart-service b/bin/v-restart-service
index 612b3fb6f..d539c1a39 100755
--- a/bin/v-restart-service
+++ b/bin/v-restart-service
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
service=$1
# Includes
diff --git a/bin/v-restart-system b/bin/v-restart-system
index 209794a7a..40767acec 100755
--- a/bin/v-restart-system
+++ b/bin/v-restart-system
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
restart=$1
# Includes
diff --git a/bin/v-restore-user b/bin/v-restore-user
index efdb21e25..a1daaa347 100755
--- a/bin/v-restore-user
+++ b/bin/v-restore-user
@@ -12,7 +12,7 @@
# Import VESTA variable for cron launch
source /etc/profile
-# Argument defenition
+# Argument definition
user=$1
backup=$2
web=$3
@@ -649,7 +649,7 @@ if [ "$db" != 'no' ]; then
# Create domain list
db_list=$(tar -tf $BACKUP/$backup | grep "^./db" |\
- grep db.conf | cut -f 3 -d '/')
+ grep db.conf | cut -f 3 -d '/' |sort -u)
if [ ! -z "$db" ]; then
db_include_list=$(mktemp)
for db_include in ${db//,/ }; do
diff --git a/bin/v-schedule-user-backup b/bin/v-schedule-user-backup
index 41cc3d79b..404f012ed 100755
--- a/bin/v-schedule-user-backup
+++ b/bin/v-schedule-user-backup
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-schedule-user-restore b/bin/v-schedule-user-restore
index 0aded2148..e91f0cac8 100755
--- a/bin/v-schedule-user-restore
+++ b/bin/v-schedule-user-restore
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
backup=$2
web=$3
diff --git a/bin/v-search-domain-owner b/bin/v-search-domain-owner
index 453fdfdca..146a0b4c1 100755
--- a/bin/v-search-domain-owner
+++ b/bin/v-search-domain-owner
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
domain=$(idn -t --quiet -u "$1" )
type=${2-any}
diff --git a/bin/v-search-fs-object b/bin/v-search-fs-object
new file mode 100755
index 000000000..3c7785682
--- /dev/null
+++ b/bin/v-search-fs-object
@@ -0,0 +1,47 @@
+#!/bin/bash
+# info: search file or directory
+# options: USER OBJECT [PATH]
+#
+# The function search files and directories on the file system
+
+user=$1
+object=$2
+path=$3
+
+# Checking arguments
+if [ -z "$object" ]; then
+ echo "Usage: USER OBJECT [PATH]"
+ exit 1
+fi
+
+# Checking vesta user
+if [ ! -e "$VESTA/data/users/$user" ]; then
+ echo "Error: vesta user $user doesn't exist"
+ exit 3
+fi
+
+# Checking user homedir
+homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
+if [ -z $homedir ]; then
+ echo "Error: user home directory doesn't exist"
+ exit 12
+fi
+
+# Checking path
+if [ ! -z "$path" ]; then
+ rpath=$(readlink -f "$path")
+ if [ -z "$(echo $rpath |grep $homedir)" ]; then
+ echo "Error: invalid path $dst_dir"
+ exit 2
+ fi
+else
+ path=$homedir
+fi
+
+# Listing directory
+sudo -u $user find "$path" -name "$object" \
+ -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM|%u|%g|%s|%P\n" 2>/dev/null
+# -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n" 2>/dev/null
+
+# Exiting
+exit $?
diff --git a/bin/v-search-object b/bin/v-search-object
index 3c6ab0d46..a15bc9ed1 100755
--- a/bin/v-search-object
+++ b/bin/v-search-object
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
object=$1
format=${2-shell}
diff --git a/bin/v-search-user-object b/bin/v-search-user-object
index 084b8b01a..28ca2a1e3 100755
--- a/bin/v-search-user-object
+++ b/bin/v-search-user-object
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
object=$2
format=${3-shell}
diff --git a/bin/v-start-service b/bin/v-start-service
index 970c7ca0a..0e5c9b895 100755
--- a/bin/v-start-service
+++ b/bin/v-start-service
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
service=$1
# Includes
@@ -29,14 +29,10 @@ check_args '1' "$#" 'SERVICE'
if [ "$service" != 'iptables' ]; then
service $service start >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "$service start failed" $E_RESTART
else
$BIN/v-update-firewall
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "$service start failed" $E_RESTART
fi
diff --git a/bin/v-stop-firewall b/bin/v-stop-firewall
index 1806d4fae..4087190dd 100755
--- a/bin/v-stop-firewall
+++ b/bin/v-stop-firewall
@@ -40,6 +40,15 @@ echo "$iptables -F INPUT" >> $tmp
# Deleting vesta chain
echo "$iptables -X vesta" >> $tmp
+# Deleting custom chains
+chains=$(cat $VESTA/data/firewall/chains.conf 2>/dev/null)
+IFS=$'\n'
+for chain in $chains; do
+ eval $chain
+ echo "$iptables -F fail2ban-$CHAIN" >> $tmp
+ echo "$iptables -X fail2ban-$CHAIN" >> $tmp
+done
+
# Applying rules
bash $tmp 2>/dev/null
diff --git a/bin/v-stop-service b/bin/v-stop-service
index 7355a113c..68f4009ed 100755
--- a/bin/v-stop-service
+++ b/bin/v-stop-service
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
service=$1
# Includes
@@ -29,14 +29,10 @@ check_args '1' "$#" 'SERVICE'
if [ "$service" != 'iptables' ]; then
service $service stop >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "$service stop failed" $E_RESTART
else
$BIN/v-stop-firewall
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "$service stop failed" $E_RESTART
fi
diff --git a/bin/v-suspend-cron-job b/bin/v-suspend-cron-job
index 977b77aba..78e75da65 100755
--- a/bin/v-suspend-cron-job
+++ b/bin/v-suspend-cron-job
@@ -9,12 +9,12 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
job=$2
restart=$3
-# Inlcudes
+# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
@@ -46,12 +46,10 @@ sync_cron_jobs
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-suspend-cron-jobs b/bin/v-suspend-cron-jobs
index 993989a5f..f53facf48 100755
--- a/bin/v-suspend-cron-jobs
+++ b/bin/v-suspend-cron-jobs
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -41,12 +41,10 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-suspend-database b/bin/v-suspend-database
index 1f7765194..e8348873e 100755
--- a/bin/v-suspend-database
+++ b/bin/v-suspend-database
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
diff --git a/bin/v-suspend-database-host b/bin/v-suspend-database-host
index 7ed06316b..03cdd9de1 100755
--- a/bin/v-suspend-database-host
+++ b/bin/v-suspend-database-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
diff --git a/bin/v-suspend-databases b/bin/v-suspend-databases
index 53ed4cec3..d1a7104c3 100755
--- a/bin/v-suspend-databases
+++ b/bin/v-suspend-databases
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-suspend-dns-domain b/bin/v-suspend-dns-domain
index 9d6c0906c..be32feb5a 100755
--- a/bin/v-suspend-dns-domain
+++ b/bin/v-suspend-dns-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -46,14 +46,6 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$SUSPENDED' 'yes'
sed -i "s/SUSPENDED='no'/SUSPENDED='yes'/g" $USER_DATA/dns/$domain.conf
increase_user_value "$user" '$SUSPENDED_DNS'
-# Restart named
-#if [ "$restart" != 'no' ]; then
-# $BIN/v-restart-dns
-# if [ $? -ne 0 ]; then
-# exit $E_RESTART
-# fi
-#fi
-
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-suspend-dns-domains b/bin/v-suspend-dns-domains
index f46cc39e6..d561495b2 100755
--- a/bin/v-suspend-dns-domains
+++ b/bin/v-suspend-dns-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -42,14 +42,6 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart dns server
-#if [ "$restart" != 'no' ]; then
-# $BIN/v-restart-dns
-# if [ $? -ne 0 ]; then
-# exit $E_RESTART
-# fi
-#fi
-
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-suspend-dns-record b/bin/v-suspend-dns-record
index 5cc8f310f..0a68f8ce3 100755
--- a/bin/v-suspend-dns-record
+++ b/bin/v-suspend-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -54,6 +54,7 @@ sort_dns_records
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -62,14 +63,6 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
-#if [ "$restart" != 'no' ]; then
-# $BIN/v-restart-dns
-# if [ $? -ne 0 ]; then
-# exit $E_RESTART
-# fi
-#fi
-
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-suspend-domain b/bin/v-suspend-domain
new file mode 100755
index 000000000..fabbb2dec
--- /dev/null
+++ b/bin/v-suspend-domain
@@ -0,0 +1,90 @@
+#!/bin/bash
+# info: suspend web/dns/mail domain
+# options: USER DOMAIN
+#
+# The function suspends web/dns/mail domain.
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+restart="${3-yes}"
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER DOMAIN'
+validate_format 'user' 'domain'
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Working on Web domain
+if [ ! -z "$WEB_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='no")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
+ $BIN/v-suspend-web-domain $user $domain 'no'
+ check_result $? "can't suspend web" > /dev/null
+ fi
+fi
+
+# Working on DNS domain
+if [ ! -z "$DNS_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf |grep "SUSPENDED='no")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
+ $BIN/v-suspend-dns-domain $user $domain 'no'
+ check_result $? "can't suspend dns" > /dev/null
+ fi
+fi
+
+# Working on Mail domain
+if [ ! -z "$MAIL_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf |grep "SUSPENDED='no")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
+ $BIN/v-suspend-mail-domain $user $domain
+ check_result $? "can't suspend mail" > /dev/null
+ fi
+fi
+
+# Checking domain search result
+if [ -z "$domain_found" ]; then
+ echo "Error: domain $domain doesn't exist"
+ log_event "$E_NOTEXIST" "$EVENT"
+ exit $E_NOTEXIST
+fi
+
+# Restarting services
+if [ "$restart" != 'no' ]; then
+ $BIN/v-restart-web
+ check_result $? "can't restart web" > /dev/null
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "can't restart proxy" > /dev/null
+ fi
+ $BIN/v-restart-dns
+ check_result $? "can't restart dns" > /dev/null
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-suspend-firewall-rule b/bin/v-suspend-firewall-rule
index a5e2d638e..dffeba716 100755
--- a/bin/v-suspend-firewall-rule
+++ b/bin/v-suspend-firewall-rule
@@ -9,10 +9,10 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
rule=$1
-# Inlcudes
+# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
diff --git a/bin/v-suspend-mail-account b/bin/v-suspend-mail-account
index d691d05b2..7ea2bc6a8 100755
--- a/bin/v-suspend-mail-account
+++ b/bin/v-suspend-mail-account
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-suspend-mail-accounts b/bin/v-suspend-mail-accounts
index 9cc393f20..d8cae620e 100755
--- a/bin/v-suspend-mail-accounts
+++ b/bin/v-suspend-mail-accounts
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-suspend-mail-domain b/bin/v-suspend-mail-domain
index 02828e5d3..93a1328cb 100755
--- a/bin/v-suspend-mail-domain
+++ b/bin/v-suspend-mail-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-suspend-mail-domains b/bin/v-suspend-mail-domains
index db52c5d4f..61e2dda84 100755
--- a/bin/v-suspend-mail-domains
+++ b/bin/v-suspend-mail-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-suspend-remote-dns-host b/bin/v-suspend-remote-dns-host
index b55977c7a..c44e65739 100755
--- a/bin/v-suspend-remote-dns-host
+++ b/bin/v-suspend-remote-dns-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
host=$1
# Includes
diff --git a/bin/v-suspend-user b/bin/v-suspend-user
index bd9ad7f92..aba883ac2 100755
--- a/bin/v-suspend-user
+++ b/bin/v-suspend-user
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -39,7 +39,7 @@ fi
/usr/sbin/usermod --lock $user
# Suspending ftp accounts
-for ftp in $(grep ^$user_.* /etc/passwd| cut -f 1 -d : ); do
+for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
/usr/sbin/usermod --lock $ftp 2>/dev/null
done
@@ -73,22 +73,16 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart web server
+# Restarting system services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Changing suspend value
diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain
index 5eac5cdaa..a7fb6ba0d 100755
--- a/bin/v-suspend-web-domain
+++ b/bin/v-suspend-web-domain
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -63,41 +63,39 @@ if [ "$SSL" = 'yes' ]; then
fi
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
del_web_config
add_web_config
+ # Checking proxy SSL
+ if [ "$SSL" = 'yes' ]; then
+ tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+ conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+ del_web_config
+ add_web_config
+ fi
fi
-# Checking proxy SSL
-if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
- tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
- conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
- del_web_config
- add_web_config
-fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
-# Update config
+# Updating config
update_object_value 'web' 'DOMAIN' "$domain" '$SUSPENDED' 'yes'
increase_user_value "$user" '$SUSPENDED_WEB'
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-suspend-web-domains b/bin/v-suspend-web-domains
index fc4bf125c..0f4c31162 100755
--- a/bin/v-suspend-web-domains
+++ b/bin/v-suspend-web-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -42,16 +42,14 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-sync-dns-cluster b/bin/v-sync-dns-cluster
index ac0045184..811f1bbe0 100755
--- a/bin/v-sync-dns-cluster
+++ b/bin/v-sync-dns-cluster
@@ -8,9 +8,8 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
host=$1
-verbose=$2
# Includes
source $VESTA/func/main.sh
@@ -23,146 +22,60 @@ source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
-
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
- echo "Error: dns-cluster.conf doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
+ check_result $E_NOTEXIST "dns-cluster.conf doesn't exist"
fi
-
-number_of_proc=$(ps auxf | grep -v grep | grep $VESTA/bin/$SCRIPT | wc -l)
-if [ "$number_of_proc" -gt 2 ]; then
- echo "Error: another sync process already exists"
- log_event "$E_EXISTS $EVENT"
- exit $E_EXISTS
+if [ "$(ps auxf |grep -v grep |grep $BIN/$SCRIPT |wc -l)" -gt 2 ]; then
+ check_result $E_EXISTS "another sync process already running"
fi
+remote_dns_health_check 'no_email'
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
-old_ifs="$IFS"
+# Selecting remote hosts
IFS=$'\n'
-
if [ -z $host ]; then
- hosts=$(cat $VESTA/conf/dns-cluster.conf | grep "SUSPENDED='no'")
- rm -f $VESTA/data/queue/dns-cluster.pipe
- touch $VESTA/data/queue/dns-cluster.pipe
- chmod 660 $VESTA/data/queue/dns-cluster.pipe
+ hosts=$(cat $VESTA/conf/dns-cluster.conf |grep "SUSPENDED='no'")
else
hosts=$(grep "HOST='$host'" $VESTA/conf/dns-cluster.conf)
fi
# Starting cluster loop
-for cluster_str in $hosts; do
+for cluster in $hosts; do
- # Get host values
- eval $cluster_str
+ # Parsing host values
+ eval $cluster
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
+ # Wiping remote domains
+ cluster_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME no
+ check_result $? "$HOST connection failed" $E_CONNECT
- # Print hostname
- if [ ! -z "$verbose" ]; then
- echo "HOSTNAME: $HOSTNAME"
- echo "TYPE: $TYPE"
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
- if [ ! -z "$verbose" ]; then
- echo "DNS_USER: $DNS_USER"
- fi
- $send_cmd v-list-user $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: dns user $DNS_USER doesn't exist"
- log_event "$E_NOTEXIST $EVENT"
- exit $E_NOTEXIST
- fi
-
- # Check dns exceptions
- if [ -z "$DNS_CLUSTER_IGNORE" ]; then
- DNS_CLUSTER_IGNORE='dns-cluster'
- fi
-
- # Create userlist
- user_list=$(ls $VESTA/data/users)
- for exception in $(echo -e "${DNS_CLUSTER_IGNORE//,/\n}"); do
- user_list=$(echo "$user_list" | grep -v "^$exception$")
- done
-
- # Clean source records
- if [ ! -z "$verbose" ]; then
- echo "STATUS: Wiping dns domains"
- fi
- $send_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME no
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (cleanup)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
-
- # Start user loop
+ # Syncing user domains
+ user_list=$(ls $VESTA/data/users |grep -v "dns-cluster")
for user in $user_list; do
-
- # Sync domain
for str in $(cat $VESTA/data/users/$user/dns.conf); do
- eval $str
- if [ ! -z "$verbose" ]; then
- echo "DOMAIN: $DOMAIN index"
- fi
- $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME
- if [ $? -eq 0 ]; then
- if [ ! -z "$verbose" ]; then
- echo "DOMAIN: $DOMAIN records"
- fi
- # Sync record
- if [ "$TYPE" = 'ssh' ]; then
- tmp=$(mktemp -u)
- scp_cmd $USER_DATA/$user/dns/$DOMAIN.conf $tmp
- $send_cmd v-insert-dns-records $DNS_USER $DOMAIN $tmp
- else
- for str in $(cat $USER_DATA/$user/dns/$DOMAIN.conf); do
- str=$(echo "$str" | sed 's/"/\\"/g')
- $send_cmd v-insert-dns-record \
- $DNS_USER $DOMAIN "$str"
- done
- fi
- else
- if [ ! -z "$verbose" ]; then
- echo "DOMAIN: $DOMAIN skiping records (not uniq)"
- fi
- fi
+ # Syncing domain index
+ eval $str
+ cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME ' ' no
+ check_result $? "$HOST connection failed" $E_CONNECT
+
+ # Syncing domain records
+ tmp_file="/tmp/vst-sync.$DOMAIN"
+ cluster_file $USER_DATA/$user/dns/$DOMAIN.conf $tmp_file
+ check_result $? "$HOST connection failed" $E_CONNECT
+
+ cluster_cmd v-insert-dns-records $DNS_USER $DOMAIN $tmp_file 'no'
+ check_result $? "$HOST connection failed" $E_CONNECT
done
done
- # Rebuild dns zones
- $send_cmd v-rebuild-dns-domains $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: $TYPE connection to $HOST failed (rebuild)"
- log_event "$E_CONNECT $EVENT"
- exit $E_CONNECT
- fi
+ # Rebuilding dns zones
+ cluster_cmd v-rebuild-dns-domains $DNS_USER
+ check_result $? "$TYPE connection to $HOST failed" $E_CONNECT
done
@@ -171,4 +84,9 @@ done
# Vesta #
#----------------------------------------------------------#
+# Flushing dns-cluster queue
+rm -f $VESTA/data/queue/dns-cluster.pipe
+touch $VESTA/data/queue/dns-cluster.pipe
+chmod 660 $VESTA/data/queue/dns-cluster.pipe
+
exit
diff --git a/bin/v-unsuspend-cron-job b/bin/v-unsuspend-cron-job
index 39af81b16..b2fa0f79a 100755
--- a/bin/v-unsuspend-cron-job
+++ b/bin/v-unsuspend-cron-job
@@ -1,15 +1,15 @@
#!/bin/bash
-# info: unuspend cron job
+# info: unsuspend cron job
# options: USER JOB [RESTART]
#
-# The function unsuspen certain cron job.
+# The function unsuspend certain cron job.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
job=$2
restart="${3-yes}"
@@ -46,12 +46,10 @@ sync_cron_jobs
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-unsuspend-cron-jobs b/bin/v-unsuspend-cron-jobs
index e1d3e686b..f7b5e876e 100755
--- a/bin/v-unsuspend-cron-jobs
+++ b/bin/v-unsuspend-cron-jobs
@@ -1,5 +1,5 @@
#!/bin/bash
-# info: unuspend sys cron
+# info: unsuspend sys cron
# options: USER [RESTART]
#
# The function unsuspends all suspended cron jobs.
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -41,12 +41,10 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart crond
+# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-unsuspend-database b/bin/v-unsuspend-database
index 5a75ba3be..ea58389c6 100755
--- a/bin/v-unsuspend-database
+++ b/bin/v-unsuspend-database
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
diff --git a/bin/v-unsuspend-database-host b/bin/v-unsuspend-database-host
index 2d2a0dc7c..e9e7b80df 100755
--- a/bin/v-unsuspend-database-host
+++ b/bin/v-unsuspend-database-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
type=$1
host=$2
diff --git a/bin/v-unsuspend-databases b/bin/v-unsuspend-databases
index fcf9dc62e..52d153af2 100755
--- a/bin/v-unsuspend-databases
+++ b/bin/v-unsuspend-databases
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-unsuspend-dns-domain b/bin/v-unsuspend-dns-domain
index 25253590c..e7c412849 100755
--- a/bin/v-unsuspend-dns-domain
+++ b/bin/v-unsuspend-dns-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -47,15 +47,6 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$SUSPENDED' 'no'
decrease_user_value "$user" '$SUSPENDED_DNS'
sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/dns/$domain.conf
-
-# Restart named
-#if [ "$restart" != 'no' ]; then
-# $BIN/v-restart-dns
-# if [ $? -ne 0 ]; then
-# exit $E_RESTART
-# fi
-#fi
-
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-unsuspend-dns-domains b/bin/v-unsuspend-dns-domains
index 177770e04..083dc3d34 100755
--- a/bin/v-unsuspend-dns-domains
+++ b/bin/v-unsuspend-dns-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -42,14 +42,6 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart dns server
-#if [ "$restart" != 'no' ]; then
-# $BIN/v-restart-dns
-# if [ $? -ne 0 ]; then
-# exit $E_RESTART
-# fi
-#fi
-
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-unsuspend-dns-record b/bin/v-unsuspend-dns-record
index 761581ef2..963e9676d 100755
--- a/bin/v-unsuspend-dns-record
+++ b/bin/v-unsuspend-dns-record
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -53,6 +53,7 @@ sort_dns_records
# Updating zone
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
+ update_domain_serial
update_domain_zone
fi
@@ -61,14 +62,6 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Restart named
-#if [ "$restart" != 'no' ]; then
-# $BIN/v-restart-dns
-# if [ $? -ne 0 ]; then
-# exit $E_RESTART
-# fi
-#fi
-
# Logging
log_event "$OK" "$EVENT"
diff --git a/bin/v-unsuspend-domain b/bin/v-unsuspend-domain
new file mode 100755
index 000000000..32920c31a
--- /dev/null
+++ b/bin/v-unsuspend-domain
@@ -0,0 +1,89 @@
+#!/bin/bash
+# info: unsuspend web/dns/mail domain
+# options: USER DOMAIN
+#
+# The function unsuspends web/dns/mail domain.
+
+
+#----------------------------------------------------------#
+# Variable&Function #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+restart="${3-yes}"
+
+# Includes
+source $VESTA/func/main.sh
+source $VESTA/conf/vesta.conf
+
+
+#----------------------------------------------------------#
+# Verifications #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER DOMAIN'
+validate_format 'user' 'domain'
+is_object_valid 'user' 'USER' "$user"
+
+
+#----------------------------------------------------------#
+# Action #
+#----------------------------------------------------------#
+
+# Working on Web domain
+if [ ! -z "$WEB_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='yes")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
+ $BIN/v-unsuspend-web-domain $user $domain 'no'
+ check_result $? "can't suspend web" > /dev/null
+ fi
+fi
+
+# Working on DNS domain
+if [ ! -z "$DNS_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf |grep "SUSPENDED='yes")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
+ $BIN/v-unsuspend-dns-domain $user $domain 'no'
+ check_result $? "can't suspend dns" > /dev/null
+ fi
+fi
+
+# Working on Mail domain
+if [ ! -z "$MAIL_SYSTEM" ]; then
+ str=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf |grep "SUSPENDED='yes")
+ if [ ! -z "$str" ]; then
+ domain_found='yes'
+ $BIN/v-unsuspend-mail-domain $user $domain
+ check_result $? "can't suspend mail" > /dev/null
+ fi
+fi
+
+# Checking domain search result
+if [ -z "$domain_found" ]; then
+ echo "Error: domain $domain doesn't exist"
+ log_event "$E_NOTEXIST" "$EVENT"
+ exit $E_NOTEXIST
+fi
+
+# Restarting services
+if [ "$restart" != 'no' ]; then
+ $BIN/v-restart-web
+ check_result $? "can't restart web" > /dev/null
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "can't restart proxy" > /dev/null
+ fi
+ $BIN/v-restart-dns
+ check_result $? "can't restart dns" > /dev/null
+fi
+
+
+#----------------------------------------------------------#
+# Vesta #
+#----------------------------------------------------------#
+
+exit
diff --git a/bin/v-unsuspend-firewall-rule b/bin/v-unsuspend-firewall-rule
index c1c97e2c7..f2d27a48e 100755
--- a/bin/v-unsuspend-firewall-rule
+++ b/bin/v-unsuspend-firewall-rule
@@ -9,10 +9,10 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
rule=$1
-# Inlcudes
+# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
diff --git a/bin/v-unsuspend-mail-account b/bin/v-unsuspend-mail-account
index 690f78df1..98936101f 100755
--- a/bin/v-unsuspend-mail-account
+++ b/bin/v-unsuspend-mail-account
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-unsuspend-mail-accounts b/bin/v-unsuspend-mail-accounts
index 6db20f07e..d78165f6b 100755
--- a/bin/v-unsuspend-mail-accounts
+++ b/bin/v-unsuspend-mail-accounts
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-unsuspend-mail-domain b/bin/v-unsuspend-mail-domain
index d6167852a..8cf65fa9f 100755
--- a/bin/v-unsuspend-mail-domain
+++ b/bin/v-unsuspend-mail-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-unsuspend-mail-domains b/bin/v-unsuspend-mail-domains
index 19321a538..30d70a9af 100755
--- a/bin/v-unsuspend-mail-domains
+++ b/bin/v-unsuspend-mail-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-unsuspend-remote-dns-host b/bin/v-unsuspend-remote-dns-host
index 37e90e6b2..4e0023658 100755
--- a/bin/v-unsuspend-remote-dns-host
+++ b/bin/v-unsuspend-remote-dns-host
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
host=$1
# Includes
diff --git a/bin/v-unsuspend-user b/bin/v-unsuspend-user
index df574808c..cfba10ab3 100755
--- a/bin/v-unsuspend-user
+++ b/bin/v-unsuspend-user
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -38,7 +38,7 @@ fi
/usr/sbin/usermod --unlock $user
# Unsuspending ftp accounts
-for ftp in $(grep ^$user_.* /etc/passwd| cut -f 1 -d : ); do
+for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
/usr/sbin/usermod --unlock $ftp 2>/dev/null
done
@@ -76,21 +76,16 @@ fi
update_user_value "$user" '$SUSPENDED' 'no'
decrease_user_value 'admin' '$SUSPENDED_USERS'
+# Restarting system services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "DNS restart failed" >/dev/null
$BIN/v-restart-cron
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Cron restart failed" >/dev/null
fi
# Logging
diff --git a/bin/v-unsuspend-web-domain b/bin/v-unsuspend-web-domain
index ad189c9aa..61071f0fc 100755
--- a/bin/v-unsuspend-web-domain
+++ b/bin/v-unsuspend-web-domain
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
@@ -52,7 +52,7 @@ upd_web_domain_values
del_web_config
add_web_config
-# Check SSL
+# Checking SSL
if [ "$SSL" = 'yes' ]; then
tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl"
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
@@ -61,19 +61,19 @@ if [ "$SSL" = 'yes' ]; then
fi
# Checking proxy
-if [ ! -z "$PROXY" ]; then
+if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
del_web_config
add_web_config
-fi
-# Checking SSL proxy
-if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
- tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
- conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
- del_web_config
- add_web_config
+ # Checking proxy SSL
+ if [ "$SSL" = 'yes' ]; then
+ tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+ conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+ del_web_config
+ add_web_config
+ fi
fi
@@ -81,20 +81,18 @@ fi
# Vesta #
#----------------------------------------------------------#
-# Update config
+# Updating config
update_object_value 'web' 'DOMAIN' "$domain" '$SUSPENDED' 'no'
decrease_user_value "$user" '$SUSPENDED_WEB'
-# Restart web erver
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-unsuspend-web-domains b/bin/v-unsuspend-web-domains
index 15c860260..a07ca86aa 100755
--- a/bin/v-unsuspend-web-domains
+++ b/bin/v-unsuspend-web-domains
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
restart=$2
@@ -43,16 +43,14 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "Web restart failed" >/dev/null
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$PROXY_SYSTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "Proxy restart failed" >/dev/null
fi
fi
diff --git a/bin/v-update-database-disk b/bin/v-update-database-disk
index fe0346192..77768c1db 100755
--- a/bin/v-update-database-disk
+++ b/bin/v-update-database-disk
@@ -2,14 +2,14 @@
# info: update database disk usage
# options: USER DATABASE
#
-# The function recalculates disk usage for speciefic database.
+# The function recalculates disk usage for specific database.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
database=$2
diff --git a/bin/v-update-databases-disk b/bin/v-update-databases-disk
index a6ca5b94a..066dde388 100755
--- a/bin/v-update-databases-disk
+++ b/bin/v-update-databases-disk
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-dns-templates b/bin/v-update-dns-templates
index 3d3692c81..a5f4a14b6 100755
--- a/bin/v-update-dns-templates
+++ b/bin/v-update-dns-templates
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
restart=$1
# Includes
diff --git a/bin/v-update-firewall b/bin/v-update-firewall
index cd7205b8a..04a15a5fe 100755
--- a/bin/v-update-firewall
+++ b/bin/v-update-firewall
@@ -51,6 +51,12 @@ if [ $? -ne 0 ]; then
conntrack_ftp='no'
fi
+# Checking custom OpenSSH port
+sshport=$(grep '^Port ' /etc/ssh/sshd_config | head -1 | cut -d ' ' -f 2)
+if [[ "$sshport" =~ ^[0-9]+$ ]] && [ "$sshport" -ne "22" ]; then
+ sed -i "s/PORT='22'/PORT=\'$sshport\'/" $rules
+fi
+
# Creating temporary file
tmp=$(mktemp)
@@ -132,19 +138,29 @@ fi
# Checking fail2ban support
if [ ! -z "$FIREWALL_EXTENSION" ]; then
- chains=$(cat $VESTA/data/firewall/chains.conf 2>/dev/null)
-fi
-for chain in $chains; do
- eval $chain
- if [[ "$PORT" =~ ,|-|: ]] ; then
- port="-m multiport --dports $PORT"
- else
- port="--dport $PORT"
- fi
- echo "$iptables -I INPUT -p $PROTOCOL $port -j fail2ban-$CHAIN" > $tmp
- bash $tmp
+ for chain in $(cat $VESTA/data/firewall/chains.conf 2>/dev/null); do
+ eval $chain
+ if [[ "$PORT" =~ ,|-|: ]] ; then
+ port="-m multiport --dports $PORT"
+ else
+ port="--dport $PORT"
+ fi
+ echo "$iptables -N fail2ban-$CHAIN" >> $tmp
+ echo "$iptables -F fail2ban-$CHAIN" >> $tmp
+ echo "$iptables -I fail2ban-$CHAIN -s 0.0.0.0/0 -j RETURN" >> $tmp
+ echo "$iptables -I INPUT -p $PROTOCOL $port -j fail2ban-$CHAIN" >>$tmp
+ done
+ bash $tmp 2>/dev/null
rm -f $tmp
-done
+
+ for ban in $(cat $VESTA/data/firewall/banlist.conf 2>/dev/null); do
+ eval $ban
+ echo -n "$iptables -I fail2ban-$CHAIN 1 -s $IP" >> $tmp
+ echo " -j REJECT --reject-with icmp-port-unreachable" >> $tmp
+ done
+ bash $tmp 2>/dev/null
+ rm -f $tmp
+fi
# Saving rules to the master iptables file
if [ -e "/etc/redhat-release" ]; then
diff --git a/bin/v-update-mail-domain-disk b/bin/v-update-mail-domain-disk
index e3c79dcc0..c5bf5ba59 100755
--- a/bin/v-update-mail-domain-disk
+++ b/bin/v-update-mail-domain-disk
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
diff --git a/bin/v-update-mail-domains-disk b/bin/v-update-mail-domains-disk
index 49494cd9a..58ad8f04d 100755
--- a/bin/v-update-mail-domains-disk
+++ b/bin/v-update-mail-domains-disk
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-sys-ip b/bin/v-update-sys-ip
index 5f60be8b3..f995c1af4 100755
--- a/bin/v-update-sys-ip
+++ b/bin/v-update-sys-ip
@@ -11,7 +11,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=${1-admin}
ip_status=${2-shared}
@@ -87,9 +87,7 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
$BIN/v-rebuild-dns-domains $user no
done
$BIN/v-restart-dns
- if [ $? -ne 0 ]; then
- exit $E_RESTART
- fi
+ check_result $? "dns restart failed" >/dev/null
fi
# No further comparation is needed
@@ -102,7 +100,7 @@ for ip in $ip_list; do
if [ ! -e "$VESTA/data/ips/$ip" ]; then
interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}')
interface=$(echo $interface |cut -f 1 -d :)
- netmask=$(/sbin/ip addr |grep $ip |awk '{print $2}' |cut -f 2 -d /)
+ netmask=$(/sbin/ip addr |grep $ip |cut -f 2 -d / |cut -f 1 -d \ )
netmask=$(convert_cidr $netmask)
$BIN/v-add-sys-ip $ip $netmask $interface
fi
diff --git a/bin/v-update-sys-ip-counters b/bin/v-update-sys-ip-counters
index bafeed130..dc8c561c5 100755
--- a/bin/v-update-sys-ip-counters
+++ b/bin/v-update-sys-ip-counters
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
ip=$1
# Includes
diff --git a/bin/v-update-sys-queue b/bin/v-update-sys-queue
index 67225e6b9..56842b488 100755
--- a/bin/v-update-sys-queue
+++ b/bin/v-update-sys-queue
@@ -12,10 +12,10 @@
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
queue=$1
-# Importing system enviroment as we run this script
+# Importing system environment as we run this script
# mostly by cron wich not read it by itself
source /etc/profile
diff --git a/bin/v-update-sys-rrd b/bin/v-update-sys-rrd
index 81cc6d64e..f8633aa76 100755
--- a/bin/v-update-sys-rrd
+++ b/bin/v-update-sys-rrd
@@ -10,7 +10,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Importing system enviroment as we run this script
+# Importing system environment as we run this script
# mostly by cron wich do not read it by itself
source /etc/profile
@@ -18,7 +18,7 @@ source /etc/profile
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
-# Another workaround for cron enviroment
+# Another workaround for cron environment
PATH="$PATH:$BIN"
export PATH
diff --git a/bin/v-update-sys-rrd-apache2 b/bin/v-update-sys-rrd-apache2
index bdd0e226b..d03a862de 100755
--- a/bin/v-update-sys-rrd-apache2
+++ b/bin/v-update-sys-rrd-apache2
@@ -1,5 +1,5 @@
#!/bin/bash
-# info: update apach2 rrd
+# info: update apache2 rrd
# options: PERIOD
#
# The function is for updating apache rrd database and graphic.
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-ftp b/bin/v-update-sys-rrd-ftp
index 6f9e502e9..ff1a642f6 100755
--- a/bin/v-update-sys-rrd-ftp
+++ b/bin/v-update-sys-rrd-ftp
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-httpd b/bin/v-update-sys-rrd-httpd
index 0a56b9921..4e9af2817 100755
--- a/bin/v-update-sys-rrd-httpd
+++ b/bin/v-update-sys-rrd-httpd
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-la b/bin/v-update-sys-rrd-la
index 9d8b312bd..c6343e3d2 100755
--- a/bin/v-update-sys-rrd-la
+++ b/bin/v-update-sys-rrd-la
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-mail b/bin/v-update-sys-rrd-mail
index 15d70f717..50cd05c34 100755
--- a/bin/v-update-sys-rrd-mail
+++ b/bin/v-update-sys-rrd-mail
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-mem b/bin/v-update-sys-rrd-mem
index 2e767dbfb..e0de66a9a 100755
--- a/bin/v-update-sys-rrd-mem
+++ b/bin/v-update-sys-rrd-mem
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-mysql b/bin/v-update-sys-rrd-mysql
index 8b9056aa8..c045057f9 100755
--- a/bin/v-update-sys-rrd-mysql
+++ b/bin/v-update-sys-rrd-mysql
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-net b/bin/v-update-sys-rrd-net
index 979bff53c..542c00cfd 100755
--- a/bin/v-update-sys-rrd-net
+++ b/bin/v-update-sys-rrd-net
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-nginx b/bin/v-update-sys-rrd-nginx
index b1b0b3e81..85bf30b8c 100755
--- a/bin/v-update-sys-rrd-nginx
+++ b/bin/v-update-sys-rrd-nginx
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-pgsql b/bin/v-update-sys-rrd-pgsql
index aeeb95823..3eeb16ab6 100755
--- a/bin/v-update-sys-rrd-pgsql
+++ b/bin/v-update-sys-rrd-pgsql
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-rrd-ssh b/bin/v-update-sys-rrd-ssh
index 44c6d167b..a421b62dd 100755
--- a/bin/v-update-sys-rrd-ssh
+++ b/bin/v-update-sys-rrd-ssh
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
period=${1-daily}
# Includes
diff --git a/bin/v-update-sys-vesta b/bin/v-update-sys-vesta
index d47fb9f06..a03470e9b 100755
--- a/bin/v-update-sys-vesta
+++ b/bin/v-update-sys-vesta
@@ -10,10 +10,10 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
package=$1
-# Importing system enviroment
+# Importing system environment
source /etc/profile
# Includes
@@ -42,11 +42,7 @@ if [ -e "/etc/redhat-release" ]; then
# Update vesta package
$yum update $package > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "Error: $package update failed"
- log_event "$E_UPDATE" "$EVENT"
- exit $E_UPDATE
- fi
+ check_result $? "$package update failed" $E_UPDATE
else
# Update repo
apt-get update -o Dir::Etc::sourcelist="sources.list.d/vesta.list" \
@@ -54,11 +50,7 @@ else
# Update vesta package
apt-get install $package -qq > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "Error: $package update failed"
- log_event "$E_UPDATE" "$EVENT"
- exit $E_UPDATE
- fi
+ check_result $? "$package update failed" $E_UPDATE
fi
diff --git a/bin/v-update-user-backup-exclusions b/bin/v-update-user-backup-exclusions
index 898a1d55b..ed90e9d90 100755
--- a/bin/v-update-user-backup-exclusions
+++ b/bin/v-update-user-backup-exclusions
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
vfile=$2
diff --git a/bin/v-update-user-backups b/bin/v-update-user-backups
index df2c920d2..6dfe32992 100755
--- a/bin/v-update-user-backups
+++ b/bin/v-update-user-backups
@@ -13,7 +13,7 @@
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
-# Argument defenition
+# Argument definition
user=$1
type="${2-$BACKUP_SYSTEM}"
diff --git a/bin/v-update-user-counters b/bin/v-update-user-counters
index 0805c154c..9fc1ac5e3 100755
--- a/bin/v-update-user-counters
+++ b/bin/v-update-user-counters
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-user-disk b/bin/v-update-user-disk
index d129a94ca..a37f9a389 100755
--- a/bin/v-update-user-disk
+++ b/bin/v-update-user-disk
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-user-package b/bin/v-update-user-package
index 1b524b09e..511c8dbf0 100755
--- a/bin/v-update-user-package
+++ b/bin/v-update-user-package
@@ -1,15 +1,15 @@
#!/bin/bash
# info: update user package
-# options: PACAKGE
+# options: PACKAGE
#
-# The function propogates package to connected users.
+# The function propagates package to connected users.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
package=$1
# Includes
diff --git a/bin/v-update-user-quota b/bin/v-update-user-quota
index f248662ed..9de5f28c7 100755
--- a/bin/v-update-user-quota
+++ b/bin/v-update-user-quota
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
@@ -31,12 +31,20 @@ is_object_valid 'user' 'USER' "$user"
#----------------------------------------------------------#
# Updating disk quota
-soft=$(get_user_value '$DISK_QUOTA')
-soft=$((soft * 1000))
-hard=$((soft + 50000))
+# Had quota equals package value. Soft quota equals 90% of package value for warnings.
+quota=$(get_user_value '$DISK_QUOTA')
+soft=$(echo "$quota * 1024 * 0.90"|bc |cut -f 1 -d .)
+hard=$(echo "$quota * 1024"|bc |cut -f 1 -d .)
+# Searching home mount point
mnt=$(df -P /home |awk '{print $6}' |tail -n1)
-setquota $user $soft $hard 0 0 $mnt
+
+# Checking unlinmited quota
+if [ "$quota" = 'unlimited' ]; then
+ setquota $user 0 0 0 0 $mnt 2>/dev/null
+else
+ setquota $user $soft $hard 0 0 $mnt 2>/dev/null
+fi
#----------------------------------------------------------#
diff --git a/bin/v-update-user-stats b/bin/v-update-user-stats
index b6b3c9996..7dc467443 100755
--- a/bin/v-update-user-stats
+++ b/bin/v-update-user-stats
@@ -9,10 +9,10 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
-# Importing system enviroment as we run this script
+# Importing system environment as we run this script
# mostly by cron wich not read it by itself
source /etc/profile
diff --git a/bin/v-update-web-domain-disk b/bin/v-update-web-domain-disk
index 6ffdee828..67dcaa8aa 100755
--- a/bin/v-update-web-domain-disk
+++ b/bin/v-update-web-domain-disk
@@ -2,14 +2,14 @@
# info: update disk usage for domain
# options: USER DOMAIN
#
-# The function recalculates disk usage for speciefic webdomain.
+# The function recalculates disk usage for specific webdomain.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-update-web-domain-stat b/bin/v-update-web-domain-stat
index 0443d187b..a89664fb5 100755
--- a/bin/v-update-web-domain-stat
+++ b/bin/v-update-web-domain-stat
@@ -2,14 +2,14 @@
# info: update domain statistics
# options: USER DOMAIN
#
-# The function runs log analyzer for speciefic webdomain.
+# The function runs log analyzer for specific webdomain.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-update-web-domain-traff b/bin/v-update-web-domain-traff
index 47f2ae927..d78e9938f 100755
--- a/bin/v-update-web-domain-traff
+++ b/bin/v-update-web-domain-traff
@@ -2,14 +2,14 @@
# info: update domain bandwidth usage
# options: USER DOMAIN
#
-# The function recalculates bandwidth usage for speciefic domain.
+# The function recalculates bandwidth usage for specific domain.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
diff --git a/bin/v-update-web-domains-disk b/bin/v-update-web-domains-disk
index 9f8c2a523..ae538997a 100755
--- a/bin/v-update-web-domains-disk
+++ b/bin/v-update-web-domains-disk
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-web-domains-stat b/bin/v-update-web-domains-stat
index 6f2f20f40..1ef2abd83 100755
--- a/bin/v-update-web-domains-stat
+++ b/bin/v-update-web-domains-stat
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-web-domains-traff b/bin/v-update-web-domains-traff
index d8a2e9240..dfeacf780 100755
--- a/bin/v-update-web-domains-traff
+++ b/bin/v-update-web-domains-traff
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
user=$1
# Includes
diff --git a/bin/v-update-web-templates b/bin/v-update-web-templates
index 617a7e27a..a526e0d4e 100755
--- a/bin/v-update-web-templates
+++ b/bin/v-update-web-templates
@@ -1,5 +1,5 @@
#!/bin/bash
-# info: updates web templates
+# info: update web templates
# options: [RESTART]
#
# The function for obtaining updated pack of web templates.
@@ -9,7 +9,7 @@
# Variable&Function #
#----------------------------------------------------------#
-# Argument defenition
+# Argument definition
restart=$1
# Includes
@@ -21,37 +21,40 @@ source $VESTA/conf/vesta.conf
# Action #
#----------------------------------------------------------#
-# Find out OS name
-if [ -e "/etc/redhat-release" ]; then
- os="rhel"
-else
- os="ubuntu"
+# Defining config host
+chost='c.vestacp.com'
+
+# Detcing OS
+case $(head -n1 /etc/issue |cut -f 1 -d ' ') in
+ Debian) version="debian" ;;
+ Ubuntu) version="ubuntu" ;;
+ *) version="rhel" ;;
+esac
+
+# Detecting release
+if [ "$version" = 'rhel' ]; then
+ release=$(grep -o "[0-9]" /etc/redhat-release |head -n1)
+fi
+if [ "$version" = 'ubuntu' ]; then
+ release=$(lsb_release -r |awk '{print $2}')
+fi
+if [ "$version" = 'debian' ]; then
+ release=$(cat /etc/issue|grep -o [0-9]|head -n1)
fi
-# Get new archive
-tmpdir=$(mktemp -d --dry-run)
-mkdir $tmpdir
-cd $tmpdir
-wget http://c.vestacp.com/$VERSION/$os/templates.tar.gz -q
-if [ "$?" -ne 0 ]; then
- echo "Error: can't download template.tar.gz"
- log_event "$E_CONNECT" "$EVENT"
- rm -rf $tmpdir
- exit $E_CONNECT
-fi
+# Defining download url
+vestacp="http://$chost/$version/$release"
-# Update templates
+# Downloading template archive
+cd $(mktemp -d)
+wget $vestacp/templates.tar.gz -q
+
+check_result $? "can't download template.tar.gz" $E_CONNECT
+
+# Updating templates
tar -xzpf templates.tar.gz -C $VESTA/data/ templates/web
-# Replace includes for apache2.4
-if [ "$WEB_SYSTEM" = 'httpd' ] || [ "$WEB_SYSTEM" = 'apache2' ]; then
- if [ ! -z "$(/usr/sbin/apachectl -v | grep 'Apache/2.4')" ]; then
- sed -i "s/Include /IncludeOptional /g" \
- $VESTA/data/templates/web/$WEB_SYSTEM/*tpl
- fi
-fi
-
-# Rebuild web domains
+# Rebuilding web domains
for user in $($BIN/v-list-sys-users plain); do
$BIN/v-rebuild-web-domains $user no
done
@@ -61,20 +64,20 @@ done
# Vesta #
#----------------------------------------------------------#
-# Restart web server
+# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ check_result $? "restart" >/dev/null 2>&1
+
+ if [ ! -z "$PROXY_SYSTTEM" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "restart" >/dev/null 2>&1
fi
- $BIN/v-restart-proxy
- if [ $? -ne 0 ]; then
- exit $E_RESTART
+ if [ ! -z "$WEB_BACKEND" ]; then
+ $BIN/v-restart-proxy
+ check_result $? "restart" >/dev/null 2>&1
fi
fi
-# Delete tmpdir
-rm -rf $tmpdir
-
exit
diff --git a/func/domain.sh b/func/domain.sh
index bc5219d78..6fdabc08e 100644
--- a/func/domain.sh
+++ b/func/domain.sh
@@ -11,10 +11,11 @@ is_web_template_valid() {
# Proxy template check
is_proxy_template_valid() {
- t="$WEBTPL/$PROXY_SYSTEM/$template.tpl"
- s="$WEBTPL/$PROXY_SYSTEM/$template.stpl"
+ proxy=$1
+ t="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl"
+ s="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl"
if [ ! -e $t ] || [ ! -e $s ]; then
- echo "Error: proxy template $template not found"
+ echo "Error: proxy template $proxy not found"
log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST
fi
@@ -84,65 +85,73 @@ is_dns_template_valid() {
is_domain_new() {
type="$1"
dom=${2-$domain}
-
- web=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/web.conf)
- dns=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/dns.conf)
- mail=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/mail.conf)
+ object=${3-domain}
# Check web domain
+ if [ ! -z "$WEB_SYSTEM" ]; then
+ web=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/web.conf)
+ fi
if [ ! -z "$web" ] && [ "$type" == 'web' ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$web" ]; then
web_user=$(echo "$web" |cut -f 7 -d /)
if [ "$web_user" != "$user" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
fi
# Check dns domain
+ if [ ! -z "$DNS_SYSTEM" ]; then
+ dns=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/dns.conf)
+ fi
if [ ! -z "$dns" ] && [ "$type" == 'dns' ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$dns" ]; then
dns_user=$(echo "$dns" |cut -f 7 -d /)
if [ "$dns_user" != "$user" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
fi
# Check mail domain
+ if [ ! -z "$MAIL_SYSTEM" ]; then
+ mail=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/mail.conf)
+ fi
if [ ! -z "$mail" ] && [ "$type" == 'mail' ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$mail" ]; then
mail_user=$(echo "$mail" |cut -f 7 -d /)
if [ "$mail_user" != "$user" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
fi
# Check web aliases
- web_alias=$(grep -w $dom $VESTA/data/users/*/web.conf)
+ if [ ! -z "$WEB_SYSTEM" ]; then
+ web_alias=$(grep -w $dom $VESTA/data/users/*/web.conf)
+ fi
if [ ! -z "$web_alias" ]; then
- c1=$(grep -H "'$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
- c2=$(grep -H "'$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
- c3=$(grep -H ",$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
- c4=$(grep -H ",$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
+ c1=$(grep -HF "'$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
+ c2=$(grep -HF "'$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
+ c3=$(grep -HF ",$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
+ c4=$(grep -HF ",$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
if [ ! -z "$c1" ] && [ "$type" == "web" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
@@ -153,34 +162,34 @@ is_domain_new() {
fi
if [ ! -z "$c2" ] && [ "$type" == "web" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$c2" ] && [ "$c2" != "$user" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$c3" ] && [ "$type" == "web" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$c3" ] && [ "$c3" != "$user" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$c4" ] && [ "$type" == "web" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
if [ ! -z "$c4" ] && [ "$c4" != "$user" ]; then
- echo "Error: domain $dom exist"
+ echo "Error: $object $dom exist"
log_event "$E_EXISTS" "$EVENT"
exit $E_EXISTS
fi
@@ -206,11 +215,44 @@ is_mail_new() {
# Update domain zone
update_domain_zone() {
- conf="$HOMEDIR/$user/conf/dns/$domain.db"
- line=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
+ domain_param=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
+ eval $domain_param
+ SOA=$(idn --quiet -a -t "$SOA")
+ if [ -z "$SERIAL" ]; then
+ SERIAL=$(date +'%Y%m%d01')
+ fi
+ zn_conf="$HOMEDIR/$user/conf/dns/$domain.db"
+ echo "\$TTL $TTL
+@ IN SOA $SOA. root.$domain_idn. (
+ $SERIAL
+ 7200
+ 3600
+ 1209600
+ 180 )
+" > $zn_conf
fields='$RECORD\t$TTL\tIN\t$TYPE\t$PRIORITY\t$VALUE'
- if [ -e $conf ]; then
- zn_serial=$(head $conf|grep 'SOA' -A1|tail -n 1|sed "s/ //g")
+ while read line ; do
+ IFS=$'\n'
+ for key in $(echo $line|sed "s/' /'\n/g"); do
+ eval ${key%%=*}="${key#*=}"
+ done
+
+ RECORD=$(idn --quiet -a -t "$RECORD")
+ if [ "$TYPE" = 'CNAME' ] || [ "$TYPE" = 'MX' ]; then
+ VALUE=$(idn --quiet -a -t "$VALUE")
+ fi
+
+ if [ "$SUSPENDED" != 'yes' ]; then
+ eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $zn_conf
+ fi
+ done < $USER_DATA/dns/$domain.conf
+}
+
+# Update zone serial
+update_domain_serial() {
+ zn_conf="$HOMEDIR/$user/conf/dns/$domain.db"
+ if [ -e $zn_conf ]; then
+ zn_serial=$(head $zn_conf |grep 'SOA' -A1 |tail -n 1 |sed "s/ //g")
s_date=$(echo ${zn_serial:0:8})
c_date=$(date +'%Y%m%d')
if [ "$s_date" == "$c_date" ]; then
@@ -227,32 +269,8 @@ update_domain_zone() {
else
serial="$(date +'%Y%m%d01')"
fi
-
- eval $line
- SOA=$(idn --quiet -a -t "$SOA")
- echo "\$TTL $TTL
-@ IN SOA $SOA. root.$domain_idn. (
- $serial
- 7200
- 3600
- 1209600
- 180 )
-" > $conf
- while read line ; do
- IFS=$'\n'
- for key in $(echo $line|sed "s/' /'\n/g"); do
- eval ${key%%=*}="${key#*=}"
- done
-
- RECORD=$(idn --quiet -a -t "$RECORD")
- if [ "$TYPE" = 'CNAME' ] || [ "$TYPE" = 'MX' ]; then
- VALUE=$(idn --quiet -a -t "$VALUE")
- fi
-
- if [ "$SUSPENDED" != 'yes' ]; then
- eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $conf
- fi
- done < $USER_DATA/dns/$domain.conf
+ add_object_key "dns" 'DOMAIN' "$domain" 'SERIAL' 'RECORDS'
+ update_object_value 'dns' 'DOMAIN' "$domain" '$SERIAL' "$serial"
}
# Get next DNS record ID
@@ -305,6 +323,7 @@ add_web_config() {
# Get config top and bottom line numbers
get_web_config_brds() {
+
serv_line=$(egrep -ni "Name %domain_idn%($| )" $tpl_file |cut -f 1 -d :)
if [ -z "$serv_line" ]; then
log_event "$E_PARSING" "$EVENT"
@@ -315,15 +334,14 @@ get_web_config_brds() {
bfr_line=$((serv_line - 1))
aftr_line=$((last_line - serv_line - 1))
- str=$(egrep -ni "Name $domain_idn($| )" $conf | cut -f 1 -d :)
+ str=$(grep -niF "Name $domain_idn" $conf |egrep "$domain_idn$|$domain_idn ")
+ str=$(echo "$str" |cut -f 1 -d :)
top_line=$((str - serv_line + 1))
bottom_line=$((top_line + last_line -1))
-
multi=$(sed -n "$top_line,$bottom_line p" $conf |grep ServerAlias |wc -l)
if [ "$multi" -ge 2 ]; then
bottom_line=$((bottom_line + multi -1))
fi
-
}
# Replace web config
diff --git a/func/ip.sh b/func/ip.sh
index a77c62d59..9fb0a28aa 100644
--- a/func/ip.sh
+++ b/func/ip.sh
@@ -178,7 +178,11 @@ get_real_ip() {
echo $1
else
nated_ip=$(grep -H "^NAT='$1'" $VESTA/data/ips/*)
- echo "$nated_ip" | cut -f 1 -d : | cut -f 7 -d /
+ if [ ! -z "$nated_ip" ]; then
+ echo "$nated_ip" | cut -f 1 -d : | cut -f 7 -d /
+ else
+ get_user_ip
+ fi
fi
}
diff --git a/func/main.sh b/func/main.sh
index 87195dc5d..94f64e294 100644
--- a/func/main.sh
+++ b/func/main.sh
@@ -2,16 +2,6 @@
DATE=$(date +%F)
TIME=$(date +%T)
SCRIPT=$(basename $0)
-A1=$1
-A2=$2
-A3=$3
-A4=$4
-A5=$5
-A6=$6
-A7=$7
-A8=$8
-A9=$9
-EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
HOMEDIR='/home'
BACKUP='/backup'
BACKUP_GZIP=5
@@ -51,6 +41,16 @@ E_RRD=18
E_UPDATE=19
E_RESTART=20
+# Event string for logger
+EVENT="$DATE $TIME $SCRIPT"
+for ((I=1; I <= $# ; I++)); do
+ if [[ "$HIDE" != $I ]]; then
+ EVENT="$EVENT '$(eval echo \$${I})'"
+ else
+ EVENT="$EVENT '******'"
+ fi
+done
+
# Log event function
log_event() {
if [ "$1" -eq 0 ]; then
@@ -79,6 +79,20 @@ log_history() {
echo "ID='$id' DATE='$DATE' TIME='$TIME' CMD='$cmd' UNDO='$undo'" >> $log
}
+# Result checker
+check_result() {
+ if [ $1 -ne 0 ]; then
+ echo "Error: $2"
+ if [ ! -z "$3" ]; then
+ log_event $3 $EVENT
+ exit $3
+ else
+ log_event $1 $EVENT
+ exit $1
+ fi
+ fi
+}
+
# Argument list checker
check_args() {
if [ "$1" -gt "$2" ]; then
@@ -292,7 +306,7 @@ get_object_value() {
# Update object value
update_object_value() {
- row=$(grep -n "$2='$3'" $USER_DATA/$1.conf)
+ row=$(grep -nF "$2='$3'" $USER_DATA/$1.conf)
lnr=$(echo $row | cut -f 1 -d ':')
object=$(echo $row | sed "s/^$lnr://")
eval "$object"
@@ -327,7 +341,7 @@ search_objects() {
# Get user value
get_user_value() {
- grep "^${1//$/}=" $USER_DATA/user.conf| cut -f 2 -d \'
+ grep "^${1//$/}=" $USER_DATA/user.conf |awk -F "'" '{print $2}'
}
# Update user value in user.conf
@@ -613,14 +627,7 @@ validate_format_ip_status() {
# Email address
validate_format_email() {
- local_part=$(echo $1 | cut -s -f1 -d\@)
- remote_host=$(echo $1 | cut -s -f2 -d\@)
- mx_failed=1
- if [ ! -z "$remote_host" ] && [ ! -z "$local_part" ]; then
- /usr/bin/host -t mx "$remote_host" &> /dev/null
- mx_failed="$?"
- fi
- if [ "$mx_failed" -eq 1 ]; then
+ if [[ ! "$1" =~ "@" ]] ; then
echo "Error: email $1 is not valid"
log_event "$E_INVALID" "$EVENT"
exit $E_INVALID
@@ -677,7 +684,7 @@ validate_format_domain() {
validate_format_domain_alias() {
exclude="[!|@|#|$|^|&|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]"
if [[ "$1" =~ $exclude ]] || [[ "$1" =~ "^[0-9]+$" ]]; then
- echo "Error: domain alias $1 is not valid"
+ echo "Error: $2 $1 is not valid"
log_event "$E_INVALID" "$EVENT"
exit $E_INVALID
fi
@@ -923,6 +930,7 @@ validate_format(){
ns2) validate_format_domain "$arg" 'name_server';;
ns3) validate_format_domain "$arg" 'name_server';;
ns4) validate_format_domain "$arg" 'name_server';;
+ object) validate_format_name_s "$arg" 'object';;
package) validate_format_name "$arg" "$arg_name" ;;
password) validate_format_password "$arg" ;;
port) validate_format_int "$arg" 'port' ;;
diff --git a/func/rebuild.sh b/func/rebuild.sh
index 572d0e479..86641a740 100644
--- a/func/rebuild.sh
+++ b/func/rebuild.sh
@@ -176,22 +176,22 @@ rebuild_web_domain_conf() {
fi
# Set folder permissions
- chmod 551 $HOMEDIR/$user/web/$domain
- chmod 751 $HOMEDIR/$user/web/$domain/private
- chmod 751 $HOMEDIR/$user/web/$domain/cgi-bin
- chmod 751 $HOMEDIR/$user/web/$domain/public_html
- chmod 751 $HOMEDIR/$user/web/$domain/public_shtml
- chmod 751 $HOMEDIR/$user/web/$domain/document_errors
- chmod 551 $HOMEDIR/$user/web/$domain/stats
- chmod 551 $HOMEDIR/$user/web/$domain/logs
+ chmod 551 $HOMEDIR/$user/web/$domain \
+ $HOMEDIR/$user/web/$domain/stats \
+ $HOMEDIR/$user/web/$domain/logs
+ chmod 751 $HOMEDIR/$user/web/$domain/private \
+ $HOMEDIR/$user/web/$domain/cgi-bin \
+ $HOMEDIR/$user/web/$domain/public_html \
+ $HOMEDIR/$user/web/$domain/public_shtml \
+ $HOMEDIR/$user/web/$domain/document_errors
chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
# Set ownership
- chown $user:$user $HOMEDIR/$user/web/$domain
- chown $user:$user $HOMEDIR/$user/web/$domain/private
- chown $user:$user $HOMEDIR/$user/web/$domain/cgi-bin
- chown $user:$user $HOMEDIR/$user/web/$domain/public_html
- chown $user:$user $HOMEDIR/$user/web/$domain/public_shtml
+ chown $user:$user $HOMEDIR/$user/web/$domain \
+ $HOMEDIR/$user/web/$domain/private \
+ $HOMEDIR/$user/web/$domain/cgi-bin \
+ $HOMEDIR/$user/web/$domain/public_html \
+ $HOMEDIR/$user/web/$domain/public_shtml
chown -R $user:$user $HOMEDIR/$user/web/$domain/document_errors
chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.*
@@ -367,6 +367,39 @@ rebuild_web_domain_conf() {
chmod u-w /etc/shadow
fi
done
+
+ # Adding http auth protection
+ htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
+ htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
+ docroot="$HOMEDIR/$user/web/$domain/public_html"
+ for auth_user in ${AUTH_USER//:/ }; do
+ # Parsing auth user variables
+ position=$(echo $AUTH_USER | tr ':' '\n' | grep -n '' |\
+ grep ":$auth_user$" | cut -f 1 -d:)
+ auth_hash=$(echo $AUTH_HASH | tr ':' '\n' | grep -n '' |\
+ grep "^$position:" | cut -f 2 -d :)
+
+ # Adding http auth user
+ touch $htpasswd
+ sed -i "/^$auth_user:/d" $htpasswd
+ echo "$auth_user:$auth_hash" >> $htpasswd
+
+ # Checking web server include
+ if [ ! -e "$htaccess" ]; then
+ if [ "$WEB_SYSTEM" != 'nginx' ]; then
+ echo "" > $htaccess
+ echo " AuthUserFile $htpasswd" >> $htaccess
+ echo " AuthName \"$domain access\"" >> $htaccess
+ echo " AuthType Basic" >> $htaccess
+ echo " Require valid-user" >> $htaccess
+ echo " " >> $htaccess
+ else
+ echo "auth_basic \"$domain password access\";" > $htaccess
+ echo "auth_basic_user_file $htpasswd;" >> $htaccess
+ fi
+ fi
+ done
+ chmod 640 $htpasswd $htaccess >/dev/null 2>&1
}
# DNS domain rebuild
@@ -515,6 +548,9 @@ rebuild_mail_domain_conf() {
fi
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
+ if [ "$QUOTA" = 'unlimited' ]; then
+ QUOTA=0
+ fi
str="$account:$MD5:$user:mail::$HOMEDIR/$user:$QUOTA"
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
for malias in ${ALIAS//,/ }; do
diff --git a/func/remote.sh b/func/remote.sh
index 61b050065..f680ce0d3 100644
--- a/func/remote.sh
+++ b/func/remote.sh
@@ -1,11 +1,4 @@
send_api_cmd() {
- if [ -z $PORT ]; then
- PORT=8083
- fi
- if [ -z $USER ]; then
- USER=admin
- fi
-
answer=$(curl -s -k \
--data-urlencode "user=$USER" \
--data-urlencode "password=$PASSWORD" \
@@ -20,21 +13,22 @@ send_api_cmd() {
--data-urlencode "arg7=$8" \
--data-urlencode "arg8=$9" \
https://$HOST:$PORT/api/)
+ return $answer
+}
- if [ "$answer" != '0' ]; then
- return 1
- else
- return 0
- fi
+send_api_file() {
+ answer=$(curl -s -k \
+ --data-urlencode "user=$USER" \
+ --data-urlencode "password=$PASSWORD" \
+ --data-urlencode "returncode=yes" \
+ --data-urlencode "cmd=v-make-tmp-file" \
+ --data-urlencode "arg1=$(cat $1)" \
+ --data-urlencode "arg2=$2" \
+ https://$HOST:$PORT/api/)
+ return $answer
}
send_ssh_cmd() {
- if [ -z $PORT ]; then
- PORT=22
- fi
- if [ -z $USER ]; then
- USER=admin
- fi
if [ -z "$IDENTITY_FILE" ] && [ "$USER" = 'root' ]; then
IDENTITY_FILE="/root/.ssh/id_rsa"
fi
@@ -55,13 +49,7 @@ send_ssh_cmd() {
fi
}
-scp_cmd() {
- if [ -z $PORT ]; then
- PORT=22
- fi
- if [ -z $USER ]; then
- USER=admin
- fi
+send_scp_file() {
if [ -z "$IDENTITY_FILE" ]; then
IDENTITY_FILE="/home/admin/.ssh/id_rsa"
fi
@@ -77,75 +65,33 @@ is_dnshost_new() {
if [ -e "$VESTA/conf/dns-cluster.conf" ]; then
check_host=$(grep "HOST='$host'" $VESTA/conf/dns-cluster.conf)
if [ ! -z "$check_host" ]; then
- echo "Error: dns host $host exists"
- log_event "$E_EXISTS" "$EVENT"
- exit $E_EXISTS
+ check_result $E_EXISTS "remote dns host $host exists"
fi
fi
}
is_dnshost_alive() {
- HOST=$host
- PORT=$port
- USER=$user
- PASSWORD=$password
+ cluster_cmd v-list-sys-config
+ check_result $? "$type connection to $HOST failed" $E_CONNECT
- # Switch on connection type
- case $type in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
- if [ $? -ne 0 ]; then
- echo "Error: $type connection to $HOST failed"
- log_event "$E_CONNECT" "$EVENT"
- exit $E_CONNECT
- fi
-
- # Check recipient dns user
- if [ -z "$DNS_USER" ]; then
- DNS_USER='dns-cluster'
- fi
- if [ ! -z "$verbose" ]; then
- echo "DNS_USER: $DNS_USER"
- fi
- $send_cmd v-list-user $DNS_USER
- if [ $? -ne 0 ]; then
- echo "Error: dns user $DNS_USER doesn't exist"
- log_event "$E_NOTEXIST" "$EVENT"
- exit $E_NOTEXIST
- fi
+ cluster_cmd v-list-user $DNS_USER
+ check_result $? "$DNS_USER doesn't exist" $E_CONNECT
}
remote_dns_health_check() {
- # Define tmp mail vars
- subj="DNS sync failed"
- email=$(grep CONTACT $VESTA/data/users/admin/user.conf | cut -f 2 -d \')
- send_mail="$VESTA/web/inc/mail-wrapper.php"
- tmpfile=$(mktemp)
+ OLD_IFS="$IFS"
+ IFS=$'\n'
# Starting health-check
for str in $(grep "SUSPENDED='no'" $VESTA/conf/dns-cluster.conf); do
-
- # Get host values
eval $str
- # Check connection type
- if [ -z "TYPE" ]; then
- TYPE='api'
- fi
-
- # Switch on connection type
- case $TYPE in
- ssh) send_cmd="send_ssh_cmd" ;;
- *) send_cmd="send_api_cmd" ;;
- esac
-
- # Check host connection
- $send_cmd v-list-sys-config
+ # Checking host connection
+ cluster_cmd v-list-user $DNS_USER
if [ $? -ne 0 ]; then
+
+ # Creating error report
+ tmpfile=$(mktemp)
echo "$(basename $0) $*" > $tmpfile
echo -e "Error: $TYPE connection to $HOST failed.\n" >> $tmpfile
echo -n "Remote dns host has been suspended." >> $tmpfile
@@ -154,14 +100,37 @@ remote_dns_health_check() {
echo "v-unsuspend-remote-dns-host $HOST" >> $tmpfile
echo "v-sync-dns-cluster $HOST" >> $tmpfile
echo -e "\n\n--\nVesta Control Panel\n$(hostname)" >> $tmpfile
- cat $tmpfile | $send_mail -s "$subj" $email
+ if [ "$1" = 'no_email' ]; then
+ cat $tmpfile
+ else
+ subj="DNS sync failed"
+ email=$($BIN/v-get-user-value admin CONTACT)
+ cat $tmpfile |$send_mail -s "$subj" $email
+ fi
+
+ # Deleting tmp file
+ rm -f $tmpfile
log_event "$E_CONNECT" "$EVENT"
- dconf="../../../conf/dns-cluster"
+
+ # Suspending remote host
+ dconf="../../conf/dns-cluster"
update_object_value "$dconf" 'HOST' "$HOST" '$SUSPENDED' 'yes'
fi
-
- # Remove tmp file
- rm -f $tmpfile
done
+ IFS="$OLD_IFS"
+}
+
+cluster_cmd() {
+ case $TYPE in
+ ssh) send_ssh_cmd $* ;;
+ api) send_api_cmd $* ;;
+ esac
+}
+
+cluster_file() {
+ case $TYPE in
+ ssh) send_scp_file $* ;;
+ api) send_api_file $* ;;
+ esac
}
diff --git a/install/debian/apache2.conf b/install/debian/7/apache2/apache2.conf
similarity index 100%
rename from install/debian/apache2.conf
rename to install/debian/7/apache2/apache2.conf
diff --git a/install/debian/apache2-status.conf b/install/debian/7/apache2/status.conf
similarity index 100%
rename from install/debian/apache2-status.conf
rename to install/debian/7/apache2/status.conf
diff --git a/install/debian/named.conf b/install/debian/7/bind/named.conf
similarity index 100%
rename from install/debian/named.conf
rename to install/debian/7/bind/named.conf
diff --git a/install/debian/clamd.conf b/install/debian/7/clamav/clamd.conf
similarity index 100%
rename from install/debian/clamd.conf
rename to install/debian/7/clamav/clamd.conf
diff --git a/install/debian/7/deb_signing.key b/install/debian/7/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/debian/7/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/debian/dovecot/conf.d/10-auth.conf b/install/debian/7/dovecot/conf.d/10-auth.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/10-auth.conf
rename to install/debian/7/dovecot/conf.d/10-auth.conf
diff --git a/install/debian/dovecot/conf.d/10-logging.conf b/install/debian/7/dovecot/conf.d/10-logging.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/10-logging.conf
rename to install/debian/7/dovecot/conf.d/10-logging.conf
diff --git a/install/debian/dovecot/conf.d/10-mail.conf b/install/debian/7/dovecot/conf.d/10-mail.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/10-mail.conf
rename to install/debian/7/dovecot/conf.d/10-mail.conf
diff --git a/install/debian/dovecot/conf.d/10-master.conf b/install/debian/7/dovecot/conf.d/10-master.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/10-master.conf
rename to install/debian/7/dovecot/conf.d/10-master.conf
diff --git a/install/debian/dovecot/conf.d/10-ssl.conf b/install/debian/7/dovecot/conf.d/10-ssl.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/10-ssl.conf
rename to install/debian/7/dovecot/conf.d/10-ssl.conf
diff --git a/install/debian/dovecot/conf.d/20-imap.conf b/install/debian/7/dovecot/conf.d/20-imap.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/20-imap.conf
rename to install/debian/7/dovecot/conf.d/20-imap.conf
diff --git a/install/debian/dovecot/conf.d/20-pop3.conf b/install/debian/7/dovecot/conf.d/20-pop3.conf
similarity index 100%
rename from install/debian/dovecot/conf.d/20-pop3.conf
rename to install/debian/7/dovecot/conf.d/20-pop3.conf
diff --git a/install/debian/dovecot/conf.d/auth-passwdfile.conf.ext b/install/debian/7/dovecot/conf.d/auth-passwdfile.conf.ext
similarity index 100%
rename from install/debian/dovecot/conf.d/auth-passwdfile.conf.ext
rename to install/debian/7/dovecot/conf.d/auth-passwdfile.conf.ext
diff --git a/install/ubuntu/dovecot.conf b/install/debian/7/dovecot/dovecot.conf
similarity index 100%
rename from install/ubuntu/dovecot.conf
rename to install/debian/7/dovecot/dovecot.conf
diff --git a/install/debian/dnsbl.conf b/install/debian/7/exim/dnsbl.conf
similarity index 100%
rename from install/debian/dnsbl.conf
rename to install/debian/7/exim/dnsbl.conf
diff --git a/install/debian/exim4.conf.template b/install/debian/7/exim/exim4.conf.template
similarity index 99%
rename from install/debian/exim4.conf.template
rename to install/debian/7/exim/exim4.conf.template
index 64cd03fca..742f0409e 100644
--- a/install/debian/exim4.conf.template
+++ b/install/debian/7/exim/exim4.conf.template
@@ -108,7 +108,7 @@ acl_check_rcpt:
require message = relay not permitted
domains = +local_domains : +relay_to_domains
- deny message = smtp auth required
+ deny message = smtp auth requried
sender_domains = +local_domains
!authenticated = *
diff --git a/install/debian/spam-blocks.conf b/install/debian/7/exim/spam-blocks.conf
similarity index 100%
rename from install/debian/spam-blocks.conf
rename to install/debian/7/exim/spam-blocks.conf
diff --git a/install/debian/7/fail2ban/action.d/vesta.conf b/install/debian/7/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/debian/7/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/debian/7/fail2ban/filter.d/vesta.conf b/install/debian/7/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/debian/7/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/debian/7/fail2ban/jail.local b/install/debian/7/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/debian/7/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/debian/firewall/ports.conf b/install/debian/7/firewall/ports.conf
similarity index 93%
rename from install/debian/firewall/ports.conf
rename to install/debian/7/firewall/ports.conf
index e970f91de..a6ef4dae5 100644
--- a/install/debian/firewall/ports.conf
+++ b/install/debian/7/firewall/ports.conf
@@ -11,6 +11,6 @@ PROTOCOL='TCP' PORT='143'
PROTOCOL='TCP' PORT='3306'
PROTOCOL='TCP' PORT='5432'
PROTOCOL='TCP' PORT='8080'
-PROTOCOL='TCP' PORT='8443'
+PROTOCOL='TCP' PORT='8433'
PROTOCOL='TCP' PORT='8083'
PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/debian/firewall/rules.conf b/install/debian/7/firewall/rules.conf
similarity index 89%
rename from install/debian/firewall/rules.conf
rename to install/debian/7/firewall/rules.conf
index 60136e1a5..956c2e1d9 100644
--- a/install/debian/firewall/rules.conf
+++ b/install/debian/7/firewall/rules.conf
@@ -1,6 +1,6 @@
RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
-RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='127.0.0.1/32' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
diff --git a/install/debian/apache2.log b/install/debian/7/logrotate/apache2
similarity index 100%
rename from install/debian/apache2.log
rename to install/debian/7/logrotate/apache2
diff --git a/install/debian/7/logrotate/nginx b/install/debian/7/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/debian/7/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/debian/vesta.log b/install/debian/7/logrotate/vesta
similarity index 100%
rename from install/debian/vesta.log
rename to install/debian/7/logrotate/vesta
diff --git a/install/debian/7/mysql/my-large.cnf b/install/debian/7/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/debian/7/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/my.cnf b/install/debian/7/mysql/my-medium.cnf
similarity index 59%
rename from install/ubuntu/my.cnf
rename to install/debian/7/mysql/my-medium.cnf
index 1b5ff1d24..1c10ab9a6 100644
--- a/install/ubuntu/my.cnf
+++ b/install/debian/7/mysql/my-medium.cnf
@@ -15,11 +15,26 @@ datadir=/var/lib/mysql
tmpdir=/tmp
lc-messages-dir=/usr/share/mysql
log_error=/var/log/mysql/error.log
-max_connections=200
-max_user_connections=30
-wait_timeout=30
-interactive_timeout=50
-long_query_time=5
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
innodb_file_per_table
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
!includedir /etc/mysql/conf.d/
diff --git a/install/debian/7/mysql/my-small.cnf b/install/debian/7/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/debian/7/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/debian/nginx.conf b/install/debian/7/nginx/nginx.conf
similarity index 97%
rename from install/debian/nginx.conf
rename to install/debian/7/nginx/nginx.conf
index 7937301c1..1e29f1fce 100644
--- a/install/debian/nginx.conf
+++ b/install/debian/7/nginx/nginx.conf
@@ -21,7 +21,7 @@ http {
client_body_timeout 1m;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
- client_max_body_size 100m;
+ client_max_body_size 256m;
large_client_header_buffers 4 8k;
send_timeout 30;
keepalive_timeout 60 60;
@@ -52,7 +52,7 @@ http {
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/plain text/css text/javascript
- application/x-javascript;
+ application/x-javascript application/javascript;
gzip_proxied any;
diff --git a/install/debian/7/nginx/phpmyadmin.inc b/install/debian/7/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/debian/7/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/debian/7/nginx/phppgadmin.inc b/install/debian/7/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/debian/7/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/debian/nginx-status.conf b/install/debian/7/nginx/status.conf
similarity index 100%
rename from install/debian/nginx-status.conf
rename to install/debian/7/nginx/status.conf
diff --git a/install/debian/7/nginx/webmail.inc b/install/debian/7/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/debian/7/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/debian/packages/default.pkg b/install/debian/7/packages/default.pkg
similarity index 100%
rename from install/debian/packages/default.pkg
rename to install/debian/7/packages/default.pkg
diff --git a/install/debian/packages/gainsboro.pkg b/install/debian/7/packages/gainsboro.pkg
similarity index 100%
rename from install/debian/packages/gainsboro.pkg
rename to install/debian/7/packages/gainsboro.pkg
diff --git a/install/debian/packages/palegreen.pkg b/install/debian/7/packages/palegreen.pkg
similarity index 100%
rename from install/debian/packages/palegreen.pkg
rename to install/debian/7/packages/palegreen.pkg
diff --git a/install/debian/packages/slategrey.pkg b/install/debian/7/packages/slategrey.pkg
similarity index 100%
rename from install/debian/packages/slategrey.pkg
rename to install/debian/7/packages/slategrey.pkg
diff --git a/install/debian/pga.conf b/install/debian/7/pga/config.inc.php
similarity index 100%
rename from install/debian/pga.conf
rename to install/debian/7/pga/config.inc.php
diff --git a/install/debian/apache2-pga.conf b/install/debian/7/pga/phppgadmin.conf
similarity index 100%
rename from install/debian/apache2-pga.conf
rename to install/debian/7/pga/phppgadmin.conf
diff --git a/install/debian/apache2-pma.conf b/install/debian/7/pma/apache.conf
similarity index 100%
rename from install/debian/apache2-pma.conf
rename to install/debian/7/pma/apache.conf
diff --git a/install/debian/pma.conf b/install/debian/7/pma/config.inc.php
similarity index 100%
rename from install/debian/pma.conf
rename to install/debian/7/pma/config.inc.php
diff --git a/install/debian/pg_hba.conf b/install/debian/7/postgresql/pg_hba.conf
similarity index 100%
rename from install/debian/pg_hba.conf
rename to install/debian/7/postgresql/pg_hba.conf
diff --git a/install/ubuntu/proftpd.conf b/install/debian/7/proftpd/proftpd.conf
similarity index 100%
rename from install/ubuntu/proftpd.conf
rename to install/debian/7/proftpd/proftpd.conf
diff --git a/install/debian/apache2-webmail.conf b/install/debian/7/roundcube/apache.conf
similarity index 100%
rename from install/debian/apache2-webmail.conf
rename to install/debian/7/roundcube/apache.conf
diff --git a/install/debian/roundcube-pw.conf b/install/debian/7/roundcube/config.inc.php
similarity index 100%
rename from install/debian/roundcube-pw.conf
rename to install/debian/7/roundcube/config.inc.php
diff --git a/install/debian/roundcube-db.conf b/install/debian/7/roundcube/db.inc.php
similarity index 100%
rename from install/debian/roundcube-db.conf
rename to install/debian/7/roundcube/db.inc.php
diff --git a/install/debian/roundcube-main.conf b/install/debian/7/roundcube/main.inc.php
similarity index 100%
rename from install/debian/roundcube-main.conf
rename to install/debian/7/roundcube/main.inc.php
diff --git a/install/debian/roundcube-driver.php b/install/debian/7/roundcube/vesta.php
similarity index 100%
rename from install/debian/roundcube-driver.php
rename to install/debian/7/roundcube/vesta.php
diff --git a/install/debian/7/sudo/admin b/install/debian/7/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/debian/7/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/debian/templates/dns/child-ns.tpl b/install/debian/7/templates/dns/child-ns.tpl
similarity index 100%
rename from install/debian/templates/dns/child-ns.tpl
rename to install/debian/7/templates/dns/child-ns.tpl
diff --git a/install/debian/templates/dns/default.tpl b/install/debian/7/templates/dns/default.tpl
similarity index 100%
rename from install/debian/templates/dns/default.tpl
rename to install/debian/7/templates/dns/default.tpl
diff --git a/install/debian/templates/dns/gmail.tpl b/install/debian/7/templates/dns/gmail.tpl
similarity index 100%
rename from install/debian/templates/dns/gmail.tpl
rename to install/debian/7/templates/dns/gmail.tpl
diff --git a/install/debian/templates/web/apache2/basedir.stpl b/install/debian/7/templates/web/apache2/basedir.stpl
similarity index 86%
rename from install/debian/templates/web/apache2/basedir.stpl
rename to install/debian/7/templates/web/apache2/basedir.stpl
index 269c09711..96de57af7 100755
--- a/install/debian/templates/web/apache2/basedir.stpl
+++ b/install/debian/7/templates/web/apache2/basedir.stpl
@@ -15,9 +15,7 @@
AllowOverride All
SSLRequireSSL
Options +Includes -Indexes +ExecCGI
- php_admin_value open_basedir %docroot%:%home%/%user%/tmp
- php_admin_value upload_tmp_dir %home%/%user%/tmp
- php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value open_basedir %docroot%
AllowOverride All
diff --git a/install/ubuntu/templates/web/apache2/basedir.tpl b/install/debian/7/templates/web/apache2/basedir.tpl
similarity index 84%
rename from install/ubuntu/templates/web/apache2/basedir.tpl
rename to install/debian/7/templates/web/apache2/basedir.tpl
index c24b12796..07ec38c98 100755
--- a/install/ubuntu/templates/web/apache2/basedir.tpl
+++ b/install/debian/7/templates/web/apache2/basedir.tpl
@@ -14,9 +14,7 @@
AllowOverride All
Options +Includes -Indexes +ExecCGI
- php_admin_value open_basedir %docroot%:%home%/%user%/tmp
- php_admin_value upload_tmp_dir %home%/%user%/tmp
- php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value open_basedir %docroot%
AllowOverride All
diff --git a/install/debian/templates/web/apache2/default.stpl b/install/debian/7/templates/web/apache2/default.stpl
similarity index 100%
rename from install/debian/templates/web/apache2/default.stpl
rename to install/debian/7/templates/web/apache2/default.stpl
diff --git a/install/debian/templates/web/apache2/default.tpl b/install/debian/7/templates/web/apache2/default.tpl
similarity index 100%
rename from install/debian/templates/web/apache2/default.tpl
rename to install/debian/7/templates/web/apache2/default.tpl
diff --git a/install/debian/templates/web/apache2/hosting.stpl b/install/debian/7/templates/web/apache2/hosting.stpl
similarity index 100%
rename from install/debian/templates/web/apache2/hosting.stpl
rename to install/debian/7/templates/web/apache2/hosting.stpl
diff --git a/install/debian/templates/web/apache2/hosting.tpl b/install/debian/7/templates/web/apache2/hosting.tpl
similarity index 100%
rename from install/debian/templates/web/apache2/hosting.tpl
rename to install/debian/7/templates/web/apache2/hosting.tpl
diff --git a/install/debian/templates/web/apache2/phpcgi.sh b/install/debian/7/templates/web/apache2/phpcgi.sh
similarity index 100%
rename from install/debian/templates/web/apache2/phpcgi.sh
rename to install/debian/7/templates/web/apache2/phpcgi.sh
diff --git a/install/debian/templates/web/apache2/phpcgi.stpl b/install/debian/7/templates/web/apache2/phpcgi.stpl
similarity index 100%
rename from install/debian/templates/web/apache2/phpcgi.stpl
rename to install/debian/7/templates/web/apache2/phpcgi.stpl
diff --git a/install/debian/templates/web/apache2/phpcgi.tpl b/install/debian/7/templates/web/apache2/phpcgi.tpl
similarity index 100%
rename from install/debian/templates/web/apache2/phpcgi.tpl
rename to install/debian/7/templates/web/apache2/phpcgi.tpl
diff --git a/install/debian/templates/web/apache2/phpfcgid.sh b/install/debian/7/templates/web/apache2/phpfcgid.sh
similarity index 100%
rename from install/debian/templates/web/apache2/phpfcgid.sh
rename to install/debian/7/templates/web/apache2/phpfcgid.sh
diff --git a/install/debian/templates/web/apache2/phpfcgid.stpl b/install/debian/7/templates/web/apache2/phpfcgid.stpl
similarity index 100%
rename from install/debian/templates/web/apache2/phpfcgid.stpl
rename to install/debian/7/templates/web/apache2/phpfcgid.stpl
diff --git a/install/debian/templates/web/apache2/phpfcgid.tpl b/install/debian/7/templates/web/apache2/phpfcgid.tpl
similarity index 100%
rename from install/debian/templates/web/apache2/phpfcgid.tpl
rename to install/debian/7/templates/web/apache2/phpfcgid.tpl
diff --git a/install/debian/templates/web/awstats/awstats.tpl b/install/debian/7/templates/web/awstats/awstats.tpl
similarity index 100%
rename from install/debian/templates/web/awstats/awstats.tpl
rename to install/debian/7/templates/web/awstats/awstats.tpl
diff --git a/install/debian/templates/web/awstats/index.tpl b/install/debian/7/templates/web/awstats/index.tpl
similarity index 100%
rename from install/debian/templates/web/awstats/index.tpl
rename to install/debian/7/templates/web/awstats/index.tpl
diff --git a/install/debian/templates/web/awstats/nav.tpl b/install/debian/7/templates/web/awstats/nav.tpl
similarity index 100%
rename from install/debian/templates/web/awstats/nav.tpl
rename to install/debian/7/templates/web/awstats/nav.tpl
diff --git a/install/debian/templates/web/nginx/caching.stpl b/install/debian/7/templates/web/nginx/caching.stpl
similarity index 100%
rename from install/debian/templates/web/nginx/caching.stpl
rename to install/debian/7/templates/web/nginx/caching.stpl
diff --git a/install/debian/templates/web/nginx/caching.tpl b/install/debian/7/templates/web/nginx/caching.tpl
similarity index 100%
rename from install/debian/templates/web/nginx/caching.tpl
rename to install/debian/7/templates/web/nginx/caching.tpl
diff --git a/install/debian/templates/web/nginx/default.stpl b/install/debian/7/templates/web/nginx/default.stpl
similarity index 100%
rename from install/debian/templates/web/nginx/default.stpl
rename to install/debian/7/templates/web/nginx/default.stpl
diff --git a/install/debian/templates/web/nginx/default.tpl b/install/debian/7/templates/web/nginx/default.tpl
similarity index 100%
rename from install/debian/templates/web/nginx/default.tpl
rename to install/debian/7/templates/web/nginx/default.tpl
diff --git a/install/debian/templates/web/nginx/hosting.sh b/install/debian/7/templates/web/nginx/hosting.sh
similarity index 100%
rename from install/debian/templates/web/nginx/hosting.sh
rename to install/debian/7/templates/web/nginx/hosting.sh
diff --git a/install/debian/templates/web/nginx/hosting.stpl b/install/debian/7/templates/web/nginx/hosting.stpl
similarity index 100%
rename from install/debian/templates/web/nginx/hosting.stpl
rename to install/debian/7/templates/web/nginx/hosting.stpl
diff --git a/install/debian/templates/web/nginx/hosting.tpl b/install/debian/7/templates/web/nginx/hosting.tpl
similarity index 100%
rename from install/debian/templates/web/nginx/hosting.tpl
rename to install/debian/7/templates/web/nginx/hosting.tpl
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/default.stpl b/install/debian/7/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/default.tpl b/install/debian/7/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/joomla.stpl b/install/debian/7/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/joomla.tpl b/install/debian/7/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/no-php.stpl b/install/debian/7/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/no-php.tpl b/install/debian/7/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/piwik.stpl b/install/debian/7/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/piwik.tpl b/install/debian/7/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/wordpress.stpl b/install/debian/7/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/wordpress.tpl b/install/debian/7/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/debian/7/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/debian/7/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/www.conf b/install/debian/7/templates/web/nginx/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/debian/7/templates/web/nginx/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/debian/templates/web/nginx/proxy_ip.tpl b/install/debian/7/templates/web/nginx/proxy_ip.tpl
similarity index 100%
rename from install/debian/templates/web/nginx/proxy_ip.tpl
rename to install/debian/7/templates/web/nginx/proxy_ip.tpl
diff --git a/install/debian/7/templates/web/php5-fpm/default.tpl b/install/debian/7/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/debian/7/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/debian/7/templates/web/php5-fpm/no-php.tpl b/install/debian/7/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/debian/7/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/debian/7/templates/web/php5-fpm/socket.tpl b/install/debian/7/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/debian/7/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/debian/7/templates/web/skel/document_errors/403.html b/install/debian/7/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/debian/7/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/debian/7/templates/web/skel/document_errors/404.html b/install/debian/7/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/debian/7/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/debian/7/templates/web/skel/document_errors/50x.html b/install/debian/7/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/debian/7/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/debian/templates/web/skel/public_html/index.html b/install/debian/7/templates/web/skel/public_html/index.html
similarity index 100%
rename from install/debian/templates/web/skel/public_html/index.html
rename to install/debian/7/templates/web/skel/public_html/index.html
diff --git a/install/debian/templates/web/skel/public_html/robots.txt b/install/debian/7/templates/web/skel/public_html/robots.txt
similarity index 100%
rename from install/debian/templates/web/skel/public_html/robots.txt
rename to install/debian/7/templates/web/skel/public_html/robots.txt
diff --git a/install/debian/templates/web/skel/public_shtml/index.html b/install/debian/7/templates/web/skel/public_shtml/index.html
similarity index 100%
rename from install/debian/templates/web/skel/public_shtml/index.html
rename to install/debian/7/templates/web/skel/public_shtml/index.html
diff --git a/install/debian/templates/web/skel/public_shtml/robots.txt b/install/debian/7/templates/web/skel/public_shtml/robots.txt
similarity index 100%
rename from install/debian/templates/web/skel/public_shtml/robots.txt
rename to install/debian/7/templates/web/skel/public_shtml/robots.txt
diff --git a/install/debian/templates/web/suspend/.htaccess b/install/debian/7/templates/web/suspend/.htaccess
similarity index 100%
rename from install/debian/templates/web/suspend/.htaccess
rename to install/debian/7/templates/web/suspend/.htaccess
diff --git a/install/debian/templates/web/suspend/index.html b/install/debian/7/templates/web/suspend/index.html
similarity index 100%
rename from install/debian/templates/web/suspend/index.html
rename to install/debian/7/templates/web/suspend/index.html
diff --git a/install/debian/templates/web/webalizer/webalizer.tpl b/install/debian/7/templates/web/webalizer/webalizer.tpl
similarity index 100%
rename from install/debian/templates/web/webalizer/webalizer.tpl
rename to install/debian/7/templates/web/webalizer/webalizer.tpl
diff --git a/install/debian/vsftpd.conf b/install/debian/7/vsftpd/vsftpd.conf
similarity index 100%
rename from install/debian/vsftpd.conf
rename to install/debian/7/vsftpd/vsftpd.conf
diff --git a/install/ubuntu/apache2.conf b/install/debian/8/apache2/apache2.conf
similarity index 98%
rename from install/ubuntu/apache2.conf
rename to install/debian/8/apache2/apache2.conf
index 140acee09..221780117 100644
--- a/install/ubuntu/apache2.conf
+++ b/install/debian/8/apache2/apache2.conf
@@ -11,7 +11,6 @@
# | `-- *
# Global configuration
-LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 30
KeepAlive Off
diff --git a/install/ubuntu/apache2-status.conf b/install/debian/8/apache2/status.conf
similarity index 100%
rename from install/ubuntu/apache2-status.conf
rename to install/debian/8/apache2/status.conf
diff --git a/install/ubuntu/named.conf b/install/debian/8/bind/named.conf
similarity index 100%
rename from install/ubuntu/named.conf
rename to install/debian/8/bind/named.conf
diff --git a/install/ubuntu/clamd.conf b/install/debian/8/clamav/clamd.conf
similarity index 100%
rename from install/ubuntu/clamd.conf
rename to install/debian/8/clamav/clamd.conf
diff --git a/install/debian/8/deb_signing.key b/install/debian/8/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/debian/8/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/rhel/dovecot/conf.d/10-auth.conf b/install/debian/8/dovecot/conf.d/10-auth.conf
similarity index 100%
rename from install/rhel/dovecot/conf.d/10-auth.conf
rename to install/debian/8/dovecot/conf.d/10-auth.conf
diff --git a/install/rhel/dovecot/conf.d/10-logging.conf b/install/debian/8/dovecot/conf.d/10-logging.conf
similarity index 100%
rename from install/rhel/dovecot/conf.d/10-logging.conf
rename to install/debian/8/dovecot/conf.d/10-logging.conf
diff --git a/install/rhel/dovecot/conf.d/10-mail.conf b/install/debian/8/dovecot/conf.d/10-mail.conf
similarity index 100%
rename from install/rhel/dovecot/conf.d/10-mail.conf
rename to install/debian/8/dovecot/conf.d/10-mail.conf
diff --git a/install/rhel/dovecot/conf.d/10-master.conf b/install/debian/8/dovecot/conf.d/10-master.conf
similarity index 100%
rename from install/rhel/dovecot/conf.d/10-master.conf
rename to install/debian/8/dovecot/conf.d/10-master.conf
diff --git a/install/ubuntu/dovecot/conf.d/10-ssl.conf b/install/debian/8/dovecot/conf.d/10-ssl.conf
similarity index 100%
rename from install/ubuntu/dovecot/conf.d/10-ssl.conf
rename to install/debian/8/dovecot/conf.d/10-ssl.conf
diff --git a/install/debian/8/dovecot/conf.d/20-imap.conf b/install/debian/8/dovecot/conf.d/20-imap.conf
new file mode 100644
index 000000000..1a459f8e4
--- /dev/null
+++ b/install/debian/8/dovecot/conf.d/20-imap.conf
@@ -0,0 +1,58 @@
+##
+## IMAP specific settings
+##
+
+protocol imap {
+ # Maximum IMAP command line length. Some clients generate very long command
+ # lines with huge mailboxes, so you may need to raise this if you get
+ # "Too long argument" or "IMAP command line too large" errors often.
+ #imap_max_line_length = 64k
+
+ # Maximum number of IMAP connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # IMAP logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ #imap_logout_format = bytes=%i/%o
+
+ # Override the IMAP CAPABILITY response. If the value begins with '+',
+ # add the given capabilities on top of the defaults (e.g. +XFOO XBAR).
+ #imap_capability =
+
+ # How long to wait between "OK Still here" notifications when client is
+ # IDLEing.
+ #imap_idle_notify_interval = 2 mins
+
+ # ID field names and values to send to clients. Using * as the value makes
+ # Dovecot use the default value. The following fields have default values
+ # currently: name, version, os, os-version, support-url, support-email.
+ #imap_id_send =
+
+ # ID fields sent by client to log. * means everything.
+ #imap_id_log =
+
+ # Workarounds for various client bugs:
+ # delay-newmail:
+ # Send EXISTS/RECENT new mail notifications only when replying to NOOP
+ # and CHECK commands. Some clients ignore them otherwise, for example OSX
+ # Mail (
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/debian/8/fail2ban/filter.d/vesta.conf b/install/debian/8/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/debian/8/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/debian/8/fail2ban/jail.local b/install/debian/8/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/debian/8/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/rhel/firewall/ports.conf b/install/debian/8/firewall/ports.conf
similarity index 93%
rename from install/rhel/firewall/ports.conf
rename to install/debian/8/firewall/ports.conf
index e970f91de..a6ef4dae5 100644
--- a/install/rhel/firewall/ports.conf
+++ b/install/debian/8/firewall/ports.conf
@@ -11,6 +11,6 @@ PROTOCOL='TCP' PORT='143'
PROTOCOL='TCP' PORT='3306'
PROTOCOL='TCP' PORT='5432'
PROTOCOL='TCP' PORT='8080'
-PROTOCOL='TCP' PORT='8443'
+PROTOCOL='TCP' PORT='8433'
PROTOCOL='TCP' PORT='8083'
PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/rhel/firewall/rules.conf b/install/debian/8/firewall/rules.conf
similarity index 89%
rename from install/rhel/firewall/rules.conf
rename to install/debian/8/firewall/rules.conf
index 60136e1a5..956c2e1d9 100644
--- a/install/rhel/firewall/rules.conf
+++ b/install/debian/8/firewall/rules.conf
@@ -1,6 +1,6 @@
RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
-RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='127.0.0.1/32' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
diff --git a/install/ubuntu/apache2.log b/install/debian/8/logrotate/apache2
similarity index 100%
rename from install/ubuntu/apache2.log
rename to install/debian/8/logrotate/apache2
diff --git a/install/debian/8/logrotate/nginx b/install/debian/8/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/debian/8/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/rhel/vesta.log b/install/debian/8/logrotate/vesta
similarity index 100%
rename from install/rhel/vesta.log
rename to install/debian/8/logrotate/vesta
diff --git a/install/debian/8/mysql/my-large.cnf b/install/debian/8/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/debian/8/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/debian/my.cnf b/install/debian/8/mysql/my-medium.cnf
similarity index 59%
rename from install/debian/my.cnf
rename to install/debian/8/mysql/my-medium.cnf
index 1b5ff1d24..1c10ab9a6 100644
--- a/install/debian/my.cnf
+++ b/install/debian/8/mysql/my-medium.cnf
@@ -15,11 +15,26 @@ datadir=/var/lib/mysql
tmpdir=/tmp
lc-messages-dir=/usr/share/mysql
log_error=/var/log/mysql/error.log
-max_connections=200
-max_user_connections=30
-wait_timeout=30
-interactive_timeout=50
-long_query_time=5
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
innodb_file_per_table
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
!includedir /etc/mysql/conf.d/
diff --git a/install/debian/8/mysql/my-small.cnf b/install/debian/8/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/debian/8/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/nginx.conf b/install/debian/8/nginx/nginx.conf
similarity index 96%
rename from install/ubuntu/nginx.conf
rename to install/debian/8/nginx/nginx.conf
index 1e0d321b2..1e29f1fce 100644
--- a/install/ubuntu/nginx.conf
+++ b/install/debian/8/nginx/nginx.conf
@@ -1,5 +1,5 @@
# Server globals
-user nginx;
+user www-data;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
@@ -21,7 +21,7 @@ http {
client_body_timeout 1m;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
- client_max_body_size 100m;
+ client_max_body_size 256m;
large_client_header_buffers 4 8k;
send_timeout 30;
keepalive_timeout 60 60;
@@ -52,7 +52,7 @@ http {
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/plain text/css text/javascript
- application/x-javascript;
+ application/x-javascript application/javascript;
gzip_proxied any;
diff --git a/install/debian/8/nginx/phpmyadmin.inc b/install/debian/8/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/debian/8/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/debian/8/nginx/phppgadmin.inc b/install/debian/8/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/debian/8/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/nginx-status.conf b/install/debian/8/nginx/status.conf
similarity index 100%
rename from install/rhel/nginx-status.conf
rename to install/debian/8/nginx/status.conf
diff --git a/install/debian/8/nginx/webmail.inc b/install/debian/8/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/debian/8/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/packages/default.pkg b/install/debian/8/packages/default.pkg
similarity index 100%
rename from install/rhel/packages/default.pkg
rename to install/debian/8/packages/default.pkg
diff --git a/install/rhel/packages/gainsboro.pkg b/install/debian/8/packages/gainsboro.pkg
similarity index 100%
rename from install/rhel/packages/gainsboro.pkg
rename to install/debian/8/packages/gainsboro.pkg
diff --git a/install/rhel/packages/palegreen.pkg b/install/debian/8/packages/palegreen.pkg
similarity index 100%
rename from install/rhel/packages/palegreen.pkg
rename to install/debian/8/packages/palegreen.pkg
diff --git a/install/rhel/packages/slategrey.pkg b/install/debian/8/packages/slategrey.pkg
similarity index 100%
rename from install/rhel/packages/slategrey.pkg
rename to install/debian/8/packages/slategrey.pkg
diff --git a/install/rhel/pga.conf b/install/debian/8/pga/config.inc.php
similarity index 100%
rename from install/rhel/pga.conf
rename to install/debian/8/pga/config.inc.php
diff --git a/install/ubuntu/apache2-pga.conf b/install/debian/8/pga/phppgadmin.conf
similarity index 100%
rename from install/ubuntu/apache2-pga.conf
rename to install/debian/8/pga/phppgadmin.conf
diff --git a/install/debian/8/php5-fpm/www.conf b/install/debian/8/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/debian/8/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/apache2-pma.conf b/install/debian/8/pma/apache.conf
similarity index 92%
rename from install/ubuntu/apache2-pma.conf
rename to install/debian/8/pma/apache.conf
index 037a42862..2a8f69e25 100644
--- a/install/ubuntu/apache2-pma.conf
+++ b/install/debian/8/pma/apache.conf
@@ -15,7 +15,7 @@ Alias /phpmyadmin /usr/share/phpmyadmin
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
- php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext:/usr/share/javascript:
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
diff --git a/install/ubuntu/pma.conf b/install/debian/8/pma/config.inc.php
similarity index 100%
rename from install/ubuntu/pma.conf
rename to install/debian/8/pma/config.inc.php
diff --git a/install/rhel/pg_hba.conf b/install/debian/8/postgresql/pg_hba.conf
similarity index 100%
rename from install/rhel/pg_hba.conf
rename to install/debian/8/postgresql/pg_hba.conf
diff --git a/install/debian/8/proftpd/proftpd.conf b/install/debian/8/proftpd/proftpd.conf
new file mode 100644
index 000000000..69ec6b2ec
--- /dev/null
+++ b/install/debian/8/proftpd/proftpd.conf
@@ -0,0 +1,32 @@
+ServerName "FTP"
+ServerIdent on "FTP Server ready."
+ServerAdmin root@localhost
+DefaultServer on
+DefaultRoot ~ !adm
+
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/apache2-webmail.conf b/install/debian/8/roundcube/apache.conf
similarity index 100%
rename from install/ubuntu/apache2-webmail.conf
rename to install/debian/8/roundcube/apache.conf
diff --git a/install/rhel/roundcube-pw.conf b/install/debian/8/roundcube/config.inc.php
similarity index 100%
rename from install/rhel/roundcube-pw.conf
rename to install/debian/8/roundcube/config.inc.php
diff --git a/install/rhel/roundcube-db.conf b/install/debian/8/roundcube/db.inc.php
similarity index 100%
rename from install/rhel/roundcube-db.conf
rename to install/debian/8/roundcube/db.inc.php
diff --git a/install/rhel/roundcube-main.conf b/install/debian/8/roundcube/main.inc.php
similarity index 99%
rename from install/rhel/roundcube-main.conf
rename to install/debian/8/roundcube/main.inc.php
index a6e1fc2ee..97cdbf2df 100644
--- a/install/rhel/roundcube-main.conf
+++ b/install/debian/8/roundcube/main.inc.php
@@ -175,6 +175,8 @@ $rcmail_config['smtp_timeout'] = 0;
// ----------------------------------
// SYSTEM
// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
@@ -437,6 +439,7 @@ $rcmail_config['trash_mbox'] = 'Trash';
// these folders will also be displayed with localized names
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
// automatically create the above listed default folders on first login
$rcmail_config['create_default_folders'] = true;
diff --git a/install/ubuntu/roundcube-driver.php b/install/debian/8/roundcube/vesta.php
similarity index 100%
rename from install/ubuntu/roundcube-driver.php
rename to install/debian/8/roundcube/vesta.php
diff --git a/install/debian/8/sudo/admin b/install/debian/8/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/debian/8/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/rhel/templates/dns/child-ns.tpl b/install/debian/8/templates/dns/child-ns.tpl
similarity index 100%
rename from install/rhel/templates/dns/child-ns.tpl
rename to install/debian/8/templates/dns/child-ns.tpl
diff --git a/install/debian/8/templates/dns/default.tpl b/install/debian/8/templates/dns/default.tpl
new file mode 100755
index 000000000..942c15bc8
--- /dev/null
+++ b/install/debian/8/templates/dns/default.tpl
@@ -0,0 +1,15 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns3%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns4%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns5%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns6%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns7%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns8%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/rhel/templates/dns/gmail.tpl b/install/debian/8/templates/dns/gmail.tpl
similarity index 100%
rename from install/rhel/templates/dns/gmail.tpl
rename to install/debian/8/templates/dns/gmail.tpl
diff --git a/install/debian/8/templates/web/apache2/basedir.stpl b/install/debian/8/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..3f71e6999
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/basedir.tpl b/install/debian/8/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..75daf0e10
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/default.stpl b/install/debian/8/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..e884a95b9
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/default.tpl b/install/debian/8/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..073724ce0
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/hosting.stpl b/install/debian/8/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..7a5d7787f
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/hosting.tpl b/install/debian/8/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..ab844dc74
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/templates/web/httpd/phpcgi.sh b/install/debian/8/templates/web/apache2/phpcgi.sh
similarity index 100%
rename from install/rhel/templates/web/httpd/phpcgi.sh
rename to install/debian/8/templates/web/apache2/phpcgi.sh
diff --git a/install/debian/8/templates/web/apache2/phpcgi.stpl b/install/debian/8/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..aa5137308
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/phpcgi.tpl b/install/debian/8/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..a05ff252d
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/templates/web/httpd/phpfcgid.sh b/install/debian/8/templates/web/apache2/phpfcgid.sh
similarity index 100%
rename from install/rhel/templates/web/httpd/phpfcgid.sh
rename to install/debian/8/templates/web/apache2/phpfcgid.sh
diff --git a/install/debian/8/templates/web/apache2/phpfcgid.stpl b/install/debian/8/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..622495756
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/debian/8/templates/web/apache2/phpfcgid.tpl b/install/debian/8/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..5c1f16e20
--- /dev/null
+++ b/install/debian/8/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/templates/web/awstats/awstats.tpl b/install/debian/8/templates/web/awstats/awstats.tpl
similarity index 100%
rename from install/rhel/templates/web/awstats/awstats.tpl
rename to install/debian/8/templates/web/awstats/awstats.tpl
diff --git a/install/rhel/templates/web/awstats/index.tpl b/install/debian/8/templates/web/awstats/index.tpl
similarity index 100%
rename from install/rhel/templates/web/awstats/index.tpl
rename to install/debian/8/templates/web/awstats/index.tpl
diff --git a/install/rhel/templates/web/awstats/nav.tpl b/install/debian/8/templates/web/awstats/nav.tpl
similarity index 100%
rename from install/rhel/templates/web/awstats/nav.tpl
rename to install/debian/8/templates/web/awstats/nav.tpl
diff --git a/install/debian/8/templates/web/nginx/caching.sh b/install/debian/8/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/rhel/templates/web/nginx/caching.stpl b/install/debian/8/templates/web/nginx/caching.stpl
similarity index 100%
rename from install/rhel/templates/web/nginx/caching.stpl
rename to install/debian/8/templates/web/nginx/caching.stpl
diff --git a/install/rhel/templates/web/nginx/caching.tpl b/install/debian/8/templates/web/nginx/caching.tpl
similarity index 100%
rename from install/rhel/templates/web/nginx/caching.tpl
rename to install/debian/8/templates/web/nginx/caching.tpl
diff --git a/install/ubuntu/templates/web/nginx/default.stpl b/install/debian/8/templates/web/nginx/default.stpl
similarity index 100%
rename from install/ubuntu/templates/web/nginx/default.stpl
rename to install/debian/8/templates/web/nginx/default.stpl
diff --git a/install/ubuntu/templates/web/nginx/default.tpl b/install/debian/8/templates/web/nginx/default.tpl
similarity index 100%
rename from install/ubuntu/templates/web/nginx/default.tpl
rename to install/debian/8/templates/web/nginx/default.tpl
diff --git a/install/rhel/templates/web/nginx/hosting.sh b/install/debian/8/templates/web/nginx/hosting.sh
similarity index 100%
rename from install/rhel/templates/web/nginx/hosting.sh
rename to install/debian/8/templates/web/nginx/hosting.sh
diff --git a/install/ubuntu/templates/web/nginx/hosting.stpl b/install/debian/8/templates/web/nginx/hosting.stpl
similarity index 100%
rename from install/ubuntu/templates/web/nginx/hosting.stpl
rename to install/debian/8/templates/web/nginx/hosting.stpl
diff --git a/install/ubuntu/templates/web/nginx/hosting.tpl b/install/debian/8/templates/web/nginx/hosting.tpl
similarity index 100%
rename from install/ubuntu/templates/web/nginx/hosting.tpl
rename to install/debian/8/templates/web/nginx/hosting.tpl
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/default.stpl b/install/debian/8/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/default.tpl b/install/debian/8/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/joomla.stpl b/install/debian/8/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/joomla.tpl b/install/debian/8/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/no-php.stpl b/install/debian/8/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/no-php.tpl b/install/debian/8/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/piwik.stpl b/install/debian/8/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/piwik.tpl b/install/debian/8/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/wordpress.stpl b/install/debian/8/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/wordpress.tpl b/install/debian/8/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/debian/8/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/debian/8/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/debian/8/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/templates/web/nginx/proxy_ip.tpl b/install/debian/8/templates/web/nginx/proxy_ip.tpl
similarity index 100%
rename from install/rhel/templates/web/nginx/proxy_ip.tpl
rename to install/debian/8/templates/web/nginx/proxy_ip.tpl
diff --git a/install/debian/8/templates/web/php5-fpm/default.tpl b/install/debian/8/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/debian/8/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/debian/8/templates/web/php5-fpm/no-php.tpl b/install/debian/8/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/debian/8/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/debian/8/templates/web/php5-fpm/socket.tpl b/install/debian/8/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/debian/8/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/debian/8/templates/web/skel/document_errors/403.html b/install/debian/8/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/debian/8/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/debian/8/templates/web/skel/document_errors/404.html b/install/debian/8/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/debian/8/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/debian/8/templates/web/skel/document_errors/50x.html b/install/debian/8/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/debian/8/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/rhel/templates/web/skel/public_html/index.html b/install/debian/8/templates/web/skel/public_html/index.html
similarity index 100%
rename from install/rhel/templates/web/skel/public_html/index.html
rename to install/debian/8/templates/web/skel/public_html/index.html
diff --git a/install/rhel/templates/web/skel/public_html/robots.txt b/install/debian/8/templates/web/skel/public_html/robots.txt
similarity index 100%
rename from install/rhel/templates/web/skel/public_html/robots.txt
rename to install/debian/8/templates/web/skel/public_html/robots.txt
diff --git a/install/rhel/templates/web/skel/public_shtml/index.html b/install/debian/8/templates/web/skel/public_shtml/index.html
similarity index 100%
rename from install/rhel/templates/web/skel/public_shtml/index.html
rename to install/debian/8/templates/web/skel/public_shtml/index.html
diff --git a/install/rhel/templates/web/skel/public_shtml/robots.txt b/install/debian/8/templates/web/skel/public_shtml/robots.txt
similarity index 100%
rename from install/rhel/templates/web/skel/public_shtml/robots.txt
rename to install/debian/8/templates/web/skel/public_shtml/robots.txt
diff --git a/install/rhel/templates/web/suspend/.htaccess b/install/debian/8/templates/web/suspend/.htaccess
similarity index 100%
rename from install/rhel/templates/web/suspend/.htaccess
rename to install/debian/8/templates/web/suspend/.htaccess
diff --git a/install/rhel/templates/web/suspend/index.html b/install/debian/8/templates/web/suspend/index.html
similarity index 100%
rename from install/rhel/templates/web/suspend/index.html
rename to install/debian/8/templates/web/suspend/index.html
diff --git a/install/rhel/templates/web/webalizer/webalizer.tpl b/install/debian/8/templates/web/webalizer/webalizer.tpl
similarity index 100%
rename from install/rhel/templates/web/webalizer/webalizer.tpl
rename to install/debian/8/templates/web/webalizer/webalizer.tpl
diff --git a/install/ubuntu/vsftpd.conf b/install/debian/8/vsftpd/vsftpd.conf
similarity index 100%
rename from install/ubuntu/vsftpd.conf
rename to install/debian/8/vsftpd/vsftpd.conf
index 9c3c2742f..0902899e7 100644
--- a/install/ubuntu/vsftpd.conf
+++ b/install/debian/8/vsftpd/vsftpd.conf
@@ -5,9 +5,9 @@ local_umask=002
anon_upload_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
-dual_log_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
+dual_log_enable=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
diff --git a/install/debian/apache2.readme.txt b/install/debian/apache2.readme.txt
deleted file mode 100644
index b8d05cbe1..000000000
--- a/install/debian/apache2.readme.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|
-# _| _| _| _| _| _| _|
-# _| _| _|_|_| _|_| _| _|_|_|_|
-# _| _| _| _| _| _| _|
-# _| _|_|_|_| _|_|_| _| _| _|
-#
-#
-# Server is manager by Vesta Control Panel.
-# See /etc/apache2/conf.d/vesta.conf to get a full list of running vhosts.
-#
diff --git a/install/debian/certificate.crt b/install/debian/certificate.crt
deleted file mode 100644
index 4a3230ac2..000000000
--- a/install/debian/certificate.crt
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDqjCCApICCQCBAQdAxoNnAjANBgkqhkiG9w0BAQUFADCBljELMAkGA1UEBhMC
-VVMxFjAUBgNVBAgMDU1hc3NhY2h1c2V0dHMxEzARBgNVBAcMClN3YW1wc2NvdHQx
-EDAOBgNVBAoMB1Zlc3RhQ1AxCzAJBgNVBAsMAklUMRowGAYDVQQDDBFwYW5lbC52
-ZXN0YWNwLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B2ZXN0YWNwLmNvbTAeFw0x
-MzA5MjMwNzA0NDVaFw0xNDA5MjMwNzA0NDVaMIGWMQswCQYDVQQGEwJVUzEWMBQG
-A1UECAwNTWFzc2FjaHVzZXR0czETMBEGA1UEBwwKU3dhbXBzY290dDEQMA4GA1UE
-CgwHVmVzdGFDUDELMAkGA1UECwwCSVQxGjAYBgNVBAMMEXBhbmVsLnZlc3RhY3Au
-Y29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHZlc3RhY3AuY29tMIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvu84meigHrwPmzEbFpKe/o8FTKwO5w1VL0HU
-ILVW5EBGT76VEBqpWC+x0QrChHit14FV7m+hZRvhhkulXrknChTTNA500EVNZ5Wb
-UpDWezZDivTKAHzzq0aUwKB230Tz+k3j+duBcbzwFwirnDXb5dE5RqzBOhiIvDw9
-mjP66UyH8RxFF+pTAPlcF18zWak7KnaDreyGknzy7m+Zqs07uLnb0wTgcwIcqREP
-eqgw0E8xrEdjz1N9HIvxi+glfnjNgHja3cCYhe9ZCpDDr9ERXrEcULrqRuch6Zfv
-QKoscG4dankbq0V4DfpMBYMTvFvFLLp/uWvwLjunzfu37XmBLQIDAQABMA0GCSqG
-SIb3DQEBBQUAA4IBAQBl+GF4Ii+7cW0tWVTsDh0Kw+rjc9bEA0eF4p3LBLEsFRkP
-Yeqp2t0g8RTAAiq3OyUWYISzOX8xu0i56/3jUFazABBjz0P0w2A0BfRZS5TAEwxJ
-TS9zAgobBuLtTh3FDJJIRXLJOKLJZVUmi6D+8QIQVOox0925tMIxGc9CxLK05bIc
-HUYdHsn1gDwmTWem/XED559eWV/vGnvf3Ea0EHU76kTQaLPkul2y8BTbbLaHSw96
-1xFc8x9gqxWTT70YmBpZIApmSzvOGVXqTduMY/CeEbmigo1/1i2YMVjePFEDYnmE
-/f6rNQrtM9kgtE+glWdA7zHlaigKl3SVof1ETStB
------END CERTIFICATE-----
diff --git a/install/debian/certificate.key b/install/debian/certificate.key
deleted file mode 100644
index eb913d684..000000000
--- a/install/debian/certificate.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAvu84meigHrwPmzEbFpKe/o8FTKwO5w1VL0HUILVW5EBGT76V
-EBqpWC+x0QrChHit14FV7m+hZRvhhkulXrknChTTNA500EVNZ5WbUpDWezZDivTK
-AHzzq0aUwKB230Tz+k3j+duBcbzwFwirnDXb5dE5RqzBOhiIvDw9mjP66UyH8RxF
-F+pTAPlcF18zWak7KnaDreyGknzy7m+Zqs07uLnb0wTgcwIcqREPeqgw0E8xrEdj
-z1N9HIvxi+glfnjNgHja3cCYhe9ZCpDDr9ERXrEcULrqRuch6ZfvQKoscG4dankb
-q0V4DfpMBYMTvFvFLLp/uWvwLjunzfu37XmBLQIDAQABAoIBAF59YsSAJCWxqgOC
-dMZh/z85JkVAbQuZRIvjhwg81eiVinZSedCDcUUMLXKnYYZPdrDM9+rM4dF4z843
-R3quJIzPq4n6kYK0mU7m8fwVY5+MRjbRV9qP+8LKZjlB8DIkHJ3FyEnRgKj5+NNd
-Xhgra0y7kx3Pxrxqgdit80qJ6OVlN2gsMjUcDBhqQev9Xs8cKYjYc1uPtFw14B2G
-5fsNE8cHJA+hH/aym7xTaEQlz/JOKn2GsH/dOhm3RM2QygdyrVOBBj6rKSi03LMb
-7QOkDvZ3nBltxQKOqs2PkYyEAdqR4dMZIPNxye/k21iVovLeMVe4lG7BmNOD6XwB
-+TOhYh0CgYEA9WyUeSNPP309Br65wg61GdapWmQIaj7HSZE06BWhp82PPwHaF1yY
-p9hWgo6fDxwHiTSLeUqEPXJMaPG+RxvYFc7Lc3JjOKU4ezR9fqz01LLtWXHVVT/x
-RZuogMyaDhIjhwMyu4mybpUMkBQ/B3DFufrzTv0y8ljAc0nlFsuXaPMCgYEAxymI
-btxZFGES6UNG7ldEaihll9MpP22/VghUeAaia0qgnXlYkbngIIhGpGJUkvZ2pduE
-tfw2S20k38qvrWXx/NhLxmiVSIvq5TFi/22dfT20kfrdCcnkrp/tRpeR72IrQ6Kx
-+6l7QHV5Gjcc4rvNc8mw7itVu+StgCYx+koD9V8CgYA8sThaaLf9XGxOEbaAXgC9
-Pg+tcdV+6L2B3O33gvnyNGx7SWr0ogqCX4atTLXbF7RpYtwnB52CUJTC0x2aGjGq
-2vQHPb95z6oTFdz/CaiWPRVjLDp0lZaF/0OBbpeeaS/uAIV4SUod/LAZpVgc7++F
-2aB35TfHJNma6ShFJd3wrwKBgBH444DtjXRTVjuKgKodYeUahCBxQ7Wfl7aRxd2W
-66027MuJGb78wQbuhUFsRimE6CwLZSxu+A9SaBNx3OyO2Ilyk1PyOBZ12dqY3FAk
-eiPFH7hUpQGvIF3JvMW0A81QVIsj8V++aYrljuoYsxiaze128+pqKrBr8GQyDiyB
-5V2NAoGBAIPWovM20cbx6LpEuFN5Pmkl500F6sTc8F3DQVRe3JhwVhqHQXv7tUE1
-VHMqpMybUQin8q/RXvJ0vr2sQEe2fVC2a0FWJTqww1eMwu1V9ppUJAfXfaYWY+XJ
-4d3myajakr0Eh3ia+IrSBcMRJ2sD3sL5KQC6jbD0R8odex4syiu2
------END RSA PRIVATE KEY-----
diff --git a/install/debian/dovecot.conf b/install/debian/dovecot.conf
deleted file mode 100644
index 005e97aaa..000000000
--- a/install/debian/dovecot.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-protocols = imap pop3
-listen = *, ::
-base_dir = /var/run/dovecot/
-!include conf.d/*.conf
-
- namespace {
- type = private
- separator = /
- prefix =
- inbox = yes
-
- mailbox Sent {
- auto = subscribe
- special_use = \Sent
- }
- mailbox Drafts {
- auto = subscribe
- special_use = \Drafts
- }
- mailbox Trash {
- auto = subscribe
- special_use = \Trash
- }
- mailbox Junk {
- auto = subscribe
- special_use = \Junk
- }
- }
diff --git a/install/debian/freshclam.conf b/install/debian/freshclam.conf
deleted file mode 100644
index 5e6ca56c1..000000000
--- a/install/debian/freshclam.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# Automatically created by the clamav-freshclam postinst
-# Comments will get lost when you reconfigure the clamav-freshclam package
-
-DatabaseOwner clamav
-UpdateLogFile /var/log/clamav/freshclam.log
-LogVerbose false
-LogSyslog false
-LogFacility LOG_LOCAL6
-LogFileMaxSize 0
-LogTime true
-Foreground false
-Debug false
-MaxAttempts 5
-DatabaseDirectory /var/lib/clamav
-DNSDatabaseInfo current.cvd.clamav.net
-AllowSupplementaryGroups false
-PidFile /var/run/clamav/freshclam.pid
-ConnectTimeout 30
-ReceiveTimeout 30
-TestDatabases yes
-ScriptedUpdates yes
-CompressLocalDatabase no
-Bytecode true
-# Check for new database 24 times a day
-Checks 24
-DatabaseMirror db.local.clamav.net
-DatabaseMirror database.clamav.net
diff --git a/install/debian/nginx.readme.txt b/install/debian/nginx.readme.txt
deleted file mode 100644
index e5db79e79..000000000
--- a/install/debian/nginx.readme.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|
-# _| _| _| _| _| _| _|
-# _| _| _|_|_| _|_| _| _|_|_|_|
-# _| _| _| _| _| _| _|
-# _| _|_|_|_| _|_|_| _| _| _|
-#
-#
-# Server is manager by Vesta Control Panel.
-# See /etc/nginx/conf.d/vesta.conf to get a full list of running vhosts.
-#
diff --git a/install/debian/sudoers.admin.conf b/install/debian/sudoers.admin.conf
deleted file mode 100644
index b4f870395..000000000
--- a/install/debian/sudoers.admin.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Created by vesta installer
-admin ALL=(ALL) ALL
-admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/debian/sudoers.conf b/install/debian/sudoers.conf
deleted file mode 100644
index efe9ce9c9..000000000
--- a/install/debian/sudoers.conf
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# This file MUST be edited with the 'visudo' command as root.
-#
-# Please consider adding local content in /etc/sudoers.d/ instead of
-# directly modifying this file.
-#
-# See the man page for details on how to write a sudoers file.
-#
-Defaults env_reset
-Defaults mail_badpass
-Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-Defaults env_keep="VESTA"
-Defaults:admin !requiretty
-
-# Host alias specification
-
-# User alias specification
-
-# Cmnd alias specification
-
-# User privilege specification
-root ALL=(ALL:ALL) ALL
-
-# Members of the admin group may gain root privileges
-%admin ALL=(ALL) ALL
-
-# Allow members of group sudo to execute any command
-%sudo ALL=(ALL:ALL) ALL
-
-# See sudoers(5) for more information on "#include" directives:
-
-#includedir /etc/sudoers.d
diff --git a/install/debian/vesta.conf b/install/debian/vesta.conf
deleted file mode 100644
index 6c148bd17..000000000
--- a/install/debian/vesta.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-WEB_SYSTEM='apache2'
-WEB_RGROUPS='www-data'
-WEB_PORT='8080'
-WEB_SSL='mod_ssl'
-WEB_SSL_PORT='8443'
-PROXY_SYSTEM='nginx'
-PROXY_PORT='80'
-PROXY_SSL_PORT='443'
-FTP_SYSTEM='vsftpd'
-MAIL_SYSTEM='exim4'
-IMAP_SYSTEM='dovecot'
-ANTIVIRUS_SYSTEM='clamav-daemon'
-ANTISPAM_SYSTEM='spamassassin'
-DB_SYSTEM='mysql'
-DNS_SYSTEM='bind9'
-STATS_SYSTEM='webalizer,awstats'
-BACKUP_SYSTEM='local'
-CRON_SYSTEM='cron'
-DISK_QUOTA='no'
-FIREWALL_SYSTEM='iptables'
-FIREWALL_EXTENSION='fail2ban'
-REPOSITORY='cmmnt'
-VERSION='0.9.8'
-LANGUAGE='en'
diff --git a/install/debian/whmcs-module.php b/install/debian/whmcs-module.php
deleted file mode 100644
index 1cb250611..000000000
--- a/install/debian/whmcs-module.php
+++ /dev/null
@@ -1,359 +0,0 @@
- array( "Type" => "text", "Default" => "default"),
- "SSH Access" => array( "Type" => "yesno", "Description" => "Tick to grant access", ),
- "IP Address (optional)" => array( "Type" => "text" ),
- );
- return $configarray;
-
-}
-
-function vesta_CreateAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-add-user',
- 'arg1' => $params["username"],
- 'arg2' => $params["password"],
- 'arg3' => $params["clientsdetails"]["email"],
- 'arg4' => $params["configoption1"],
- 'arg5' => $params["clientsdetails"]["firstname"],
- 'arg6' => $params["clientsdetails"]["lastname"],
- );
- $postdata = http_build_query($postvars);
-
- // Create user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- // Enable ssh access
- if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-shell',
- 'arg1' => $params["username"],
- 'arg2' => 'bash'
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
- }
-
- // Add domain
- if(($answer == 'OK') && (!empty($params["domain"]))) {
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-add-domain',
- 'arg1' => $params["username"],
- 'arg2' => $params["domain"],
- 'arg3' => $params["configoption3"],
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
- }
- }
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_TerminateAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-delete-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Delete user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_SuspendAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-suspend-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Susupend user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_UnsuspendAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-unsuspend-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Unsusupend user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ChangePassword($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-password',
- 'arg1' => $params["username"],
- 'arg2' => $params["password"]
- );
- $postdata = http_build_query($postvars);
-
- // Change user package
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ChangePackage($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-package',
- 'arg1' => $params["username"],
- 'arg2' => $params["configoption1"]
- );
- $postdata = http_build_query($postvars);
-
- // Change user package
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ClientArea($params) {
-
- $code = '';
- return $code;
-
-}
-
-function vesta_AdminLink($params) {
-
- $code = '';
- return $code;
-
-}
-
-function vesta_LoginLink($params) {
-
- echo "control panel ";
-
-}
-
-function vesta_UsageUpdate($params) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-list-users',
- 'arg1' => 'json'
- );
- $postdata = http_build_query($postvars);
-
- // Get user stats
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- // Decode json data
- $results = json_decode($answer, true);
-
- // Loop through results and update DB
- foreach ($results AS $user=>$values) {
- update_query("tblhosting",array(
- "diskusage"=>$values['U_DISK'],
- "disklimit"=>$values['DISK_QUOTA'],
- "bwusage"=>$values['U_BANDWIDTH'],
- "bwlimit"=>$values['BANDWIDTH'],
- "lastupdate"=>"now()",
- ),array("server"=>$params['serverid'], "username"=>$user));
- }
-
-}
-
-?>
diff --git a/install/rhel/5/GPG.txt b/install/rhel/5/GPG.txt
new file mode 100644
index 000000000..33bb1ff26
--- /dev/null
+++ b/install/rhel/5/GPG.txt
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQGiBExUOVkRBACPJeB3bdrAggHlFpkaB1aRDXDz7clRg6jyEzdMYHhrniSyjhAH
++b53zE4iapCHFIamEG2Fa7zS2lSx7068AmqHsZK5jwmyhTVVYuTtbebj1C4Y5ToW
+icHhy4ullB7qeDmAod6EY4YSx2kYO3dR/QLk5QM4lWuV/OLdXWTeoKiiYwCg0UAP
+yUkBXgNcKXrFqoJelmG3JEMEAIYM7CGwVd47FsM1UCu56HNQPErxLoUPBUlAQFtx
+OMOFDMEm7qH7ve8FgGGRL9oHF7mSJ3y7HgM1BF5MHkKz6FjDrT1U5+Lub6oI2e90
+gfCMGlQAzUm9o+fijfbhKoEQ/xQRkUoqWEaf9zlFx1/4+NH+Qz/L8ZDTHvSLvUgt
+HyZlA/916St5suAUugXu9PeLRVqboiHjhz0JWKneQEQ2QcTu8lhHsu/mZTWL9FYn
+XwtiCJLZT8bpBSfl8Oeqhof1+sPgnv7t/LuKQ6JJmyJ46Sa453wfrs+xs32hKAe+
+ZN0VGBmHe7NhuhW/LdM0KMMr/LHuJJJAgmt+XVHi2RFwsZvdMbQkVmVzdGEgUGFj
+a2FnZXMgPGJ1aWxkZXJAdmVzdGFjcC5jb20+iGAEExECACAFAkxUOVkCGwMGCwkI
+BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRBbjeFzoXeCtp6dAKDQfeTPHi6hCgg4L+sx
+LEjXvVdLOwCfe9yfr+en+uz6qst0QBT2cAwB+q+5Ag0ETFQ5bBAIAJYZa9pV9l/R
+OUFgIvdJd1mvzJpRAXsRBBJc22WuOHp22Uj+lMKrJMTRQZvFBvk9s7Mb1/ACXrL4
+vIbsKqXNAlVFp9kF1tKV2ejZ1MrJaQ4819bIkyG0lJzjl6u9lzJopF7ie00YHKC6
+1rltLaevfFjUXq1DoYZBg42hT/SOj+3+2D0e9qcxeuxXbsjnvwtxxUkWcP/ftOSt
+HsAAbM1YtwGl9+fZLWG9+WIKNOE9kp+h2ywZtFA4v/Ms2op7oZGAL7C95k1EgLrH
+mOZ0B2oKOLctV1z9keWksPN/osyG7Mg8ljv8zF3XwQFqHOHRntDqSWoFBMvJBkNS
+vtm6u5WyKd8ABAsH/0RbeWVA+JqpZ24Rl57XoDRPRzno0m0EnkJMXr22uBq1lPg8
+VkadrGOshFXpM3Rho57f3U7fwKmShQXGEV7RHsWcxcfwOSKVJtI468sDuYXc2l1f
+5nFo+rCtVh3BBq+JtZFKX0x53BesCT/M7l33Dfm9MDi34tEdPTPjumBIH1dowYdv
+9/2HPlPp4NZte7gOO/VIAiS+jJ30aBn09t8duW5md7/rkOPIM5It05LGCLjb9hVm
+R9zTwzw30fIrkeyWZdAbk76lH8u8j6PX30U6RRzb33+XIFR4ab3nlyqOQOpoTqyG
+cs7B02sgBbyC+RG1EYfcelSEvLXkR8mjcqjs+MCISQQYEQIACQUCTFQ5bAIbDAAK
+CRBbjeFzoXeCtlpcAKDLh59svtq/Gn99O9ZZw0nBjWv6sACfffDxPhCP1F852Jab
+d8P1WGhr2Q8=
+=Z1Jj
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/rhel/clamd.conf b/install/rhel/5/clamav/clamd.conf
similarity index 100%
rename from install/rhel/clamd.conf
rename to install/rhel/5/clamav/clamd.conf
diff --git a/install/rhel/5/clamav/clamd.service b/install/rhel/5/clamav/clamd.service
new file mode 100644
index 000000000..fdb3af7fd
--- /dev/null
+++ b/install/rhel/5/clamav/clamd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description = clamd scanner (clamd) daemon
+After = syslog.target nss-lookup.target network.target
+
+[Service]
+Type = simple
+ExecStart = /usr/sbin/clamd -c /etc/clamd.conf --nofork=yes
+Restart = on-failure
+PrivateTmp = true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/install/rhel/freshclam.conf b/install/rhel/5/clamav/freshclam.conf
similarity index 100%
rename from install/rhel/freshclam.conf
rename to install/rhel/5/clamav/freshclam.conf
diff --git a/install/rhel/dovecot.conf b/install/rhel/5/dovecot/dovecot.conf
similarity index 83%
rename from install/rhel/dovecot.conf
rename to install/rhel/5/dovecot/dovecot.conf
index c4b187b53..544d851e6 100644
--- a/install/rhel/dovecot.conf
+++ b/install/rhel/5/dovecot/dovecot.conf
@@ -1,7 +1,7 @@
protocols = imap imaps pop3 pop3s
log_path = /var/log/dovecot.log
-ssl_cert_file = /etc/pki/tls/certs/exim.pem
-ssl_key_file = /etc/pki/tls/private/exim.pem
+ssl_cert_file = /usr/local/vesta/ssl/certificate.crt
+ssl_key_file = /usr/local/vesta/ssl/certificate.key
disable_plaintext_auth = no
mail_location = maildir:%h/mail/%d/%n
diff --git a/install/rhel/5/epel-release.rpm b/install/rhel/5/epel-release.rpm
new file mode 100644
index 000000000..a65162a8e
Binary files /dev/null and b/install/rhel/5/epel-release.rpm differ
diff --git a/install/ubuntu/dnsbl.conf b/install/rhel/5/exim/dnsbl.conf
similarity index 100%
rename from install/ubuntu/dnsbl.conf
rename to install/rhel/5/exim/dnsbl.conf
diff --git a/install/rhel/exim-smarthost.conf b/install/rhel/5/exim/exim-smarthost.conf
similarity index 100%
rename from install/rhel/exim-smarthost.conf
rename to install/rhel/5/exim/exim-smarthost.conf
diff --git a/install/rhel/exim.conf b/install/rhel/5/exim/exim.conf
similarity index 99%
rename from install/rhel/exim.conf
rename to install/rhel/5/exim/exim.conf
index d75192e7c..0f9830168 100644
--- a/install/rhel/exim.conf
+++ b/install/rhel/5/exim/exim.conf
@@ -108,7 +108,7 @@ acl_check_rcpt:
require message = relay not permitted
domains = +local_domains : +relay_to_domains
- deny message = smtp auth required
+ deny message = smtp auth requried
sender_domains = +local_domains
!authenticated = *
diff --git a/install/ubuntu/spam-blocks.conf b/install/rhel/5/exim/spam-blocks.conf
similarity index 100%
rename from install/ubuntu/spam-blocks.conf
rename to install/rhel/5/exim/spam-blocks.conf
diff --git a/install/debian/fail2ban.action.conf b/install/rhel/5/fail2ban/fail2ban.action.conf
similarity index 100%
rename from install/debian/fail2ban.action.conf
rename to install/rhel/5/fail2ban/fail2ban.action.conf
diff --git a/install/rhel/fail2ban.filter.conf b/install/rhel/5/fail2ban/fail2ban.filter.conf
similarity index 61%
rename from install/rhel/fail2ban.filter.conf
rename to install/rhel/5/fail2ban/fail2ban.filter.conf
index 69670a56e..36ec10019 100644
--- a/install/rhel/fail2ban.filter.conf
+++ b/install/rhel/5/fail2ban/fail2ban.filter.conf
@@ -1,4 +1,4 @@
-# Fail2Ban filter for unsuccesfull Vesta authentication attempts
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
#
[INCLUDES]
diff --git a/install/debian/fail2ban.jail.conf b/install/rhel/5/fail2ban/fail2ban.jail.conf
similarity index 100%
rename from install/debian/fail2ban.jail.conf
rename to install/rhel/5/fail2ban/fail2ban.jail.conf
diff --git a/install/ubuntu/firewall/ports.conf b/install/rhel/5/firewall/ports.conf
similarity index 93%
rename from install/ubuntu/firewall/ports.conf
rename to install/rhel/5/firewall/ports.conf
index e970f91de..a6ef4dae5 100644
--- a/install/ubuntu/firewall/ports.conf
+++ b/install/rhel/5/firewall/ports.conf
@@ -11,6 +11,6 @@ PROTOCOL='TCP' PORT='143'
PROTOCOL='TCP' PORT='3306'
PROTOCOL='TCP' PORT='5432'
PROTOCOL='TCP' PORT='8080'
-PROTOCOL='TCP' PORT='8443'
+PROTOCOL='TCP' PORT='8433'
PROTOCOL='TCP' PORT='8083'
PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/firewall/rules.conf b/install/rhel/5/firewall/rules.conf
similarity index 89%
rename from install/ubuntu/firewall/rules.conf
rename to install/rhel/5/firewall/rules.conf
index 60136e1a5..956c2e1d9 100644
--- a/install/ubuntu/firewall/rules.conf
+++ b/install/rhel/5/firewall/rules.conf
@@ -1,6 +1,6 @@
RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
-RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='127.0.0.1/32' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
diff --git a/install/rhel/httpd.conf b/install/rhel/5/httpd/httpd.conf
similarity index 100%
rename from install/rhel/httpd.conf
rename to install/rhel/5/httpd/httpd.conf
diff --git a/install/rhel/5/httpd/ruid2.conf b/install/rhel/5/httpd/ruid2.conf
new file mode 100644
index 000000000..42f908a85
--- /dev/null
+++ b/install/rhel/5/httpd/ruid2.conf
@@ -0,0 +1,8 @@
+LoadModule ruid2_module modules/mod_ruid2.so
+
+
+ RMode config
+ RDefaultUidGid apache apache
+ RUidGid apache apache
+ RGroups apache
+
diff --git a/install/rhel/httpd-ssl.conf b/install/rhel/5/httpd/ssl.conf
similarity index 100%
rename from install/rhel/httpd-ssl.conf
rename to install/rhel/5/httpd/ssl.conf
diff --git a/install/rhel/httpd-status.conf b/install/rhel/5/httpd/status.conf
similarity index 100%
rename from install/rhel/httpd-status.conf
rename to install/rhel/5/httpd/status.conf
diff --git a/install/rhel/httpd.log b/install/rhel/5/logrotate/httpd
similarity index 100%
rename from install/rhel/httpd.log
rename to install/rhel/5/logrotate/httpd
diff --git a/install/rhel/5/logrotate/nginx b/install/rhel/5/logrotate/nginx
new file mode 100644
index 000000000..b1da1bf16
--- /dev/null
+++ b/install/rhel/5/logrotate/nginx
@@ -0,0 +1,12 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ create 0644 nginx nginx
+ daily
+ rotate 10
+ missingok
+ notifempty
+ compress
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/vesta.log b/install/rhel/5/logrotate/vesta
similarity index 100%
rename from install/ubuntu/vesta.log
rename to install/rhel/5/logrotate/vesta
diff --git a/install/rhel/5/mariadb/my-large.cnf b/install/rhel/5/mariadb/my-large.cnf
new file mode 100644
index 000000000..4e6c2225c
--- /dev/null
+++ b/install/rhel/5/mariadb/my-large.cnf
@@ -0,0 +1,38 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/5/mariadb/my-medium.cnf b/install/rhel/5/mariadb/my-medium.cnf
new file mode 100644
index 000000000..fa255ec52
--- /dev/null
+++ b/install/rhel/5/mariadb/my-medium.cnf
@@ -0,0 +1,37 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/5/mariadb/my-small.cnf b/install/rhel/5/mariadb/my-small.cnf
new file mode 100644
index 000000000..7d2fdc1b3
--- /dev/null
+++ b/install/rhel/5/mariadb/my-small.cnf
@@ -0,0 +1,35 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 32K
+max_allowed_packet = 8M
+table_open_cache = 4
+sort_buffer_size = 128K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=50
+max_user_connections=25
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/monit/clamd.conf b/install/rhel/5/monit/clamd.conf
similarity index 100%
rename from install/rhel/monit/clamd.conf
rename to install/rhel/5/monit/clamd.conf
diff --git a/install/rhel/monit/dovecot.conf b/install/rhel/5/monit/dovecot.conf
similarity index 100%
rename from install/rhel/monit/dovecot.conf
rename to install/rhel/5/monit/dovecot.conf
diff --git a/install/rhel/monit/exim.conf b/install/rhel/5/monit/exim.conf
similarity index 100%
rename from install/rhel/monit/exim.conf
rename to install/rhel/5/monit/exim.conf
diff --git a/install/rhel/monit/httpd.conf b/install/rhel/5/monit/httpd.conf
similarity index 100%
rename from install/rhel/monit/httpd.conf
rename to install/rhel/5/monit/httpd.conf
diff --git a/install/rhel/monit/mysql.conf b/install/rhel/5/monit/mysql.conf
similarity index 100%
rename from install/rhel/monit/mysql.conf
rename to install/rhel/5/monit/mysql.conf
diff --git a/install/rhel/monit/nginx.conf b/install/rhel/5/monit/nginx.conf
similarity index 100%
rename from install/rhel/monit/nginx.conf
rename to install/rhel/5/monit/nginx.conf
diff --git a/install/rhel/monit/spamassassin.conf b/install/rhel/5/monit/spamassassin.conf
similarity index 100%
rename from install/rhel/monit/spamassassin.conf
rename to install/rhel/5/monit/spamassassin.conf
diff --git a/install/rhel/monit/sshd.conf b/install/rhel/5/monit/sshd.conf
similarity index 100%
rename from install/rhel/monit/sshd.conf
rename to install/rhel/5/monit/sshd.conf
diff --git a/install/rhel/monit/vesta-nginx.conf b/install/rhel/5/monit/vesta-nginx.conf
similarity index 100%
rename from install/rhel/monit/vesta-nginx.conf
rename to install/rhel/5/monit/vesta-nginx.conf
diff --git a/install/rhel/monit/vesta-php.conf b/install/rhel/5/monit/vesta-php.conf
similarity index 100%
rename from install/rhel/monit/vesta-php.conf
rename to install/rhel/5/monit/vesta-php.conf
diff --git a/install/rhel/5/mysqld/my-large.cnf b/install/rhel/5/mysqld/my-large.cnf
new file mode 100644
index 000000000..b548eeb87
--- /dev/null
+++ b/install/rhel/5/mysqld/my-large.cnf
@@ -0,0 +1,38 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/5/mysqld/my-medium.cnf b/install/rhel/5/mysqld/my-medium.cnf
new file mode 100644
index 000000000..e5f2677fc
--- /dev/null
+++ b/install/rhel/5/mysqld/my-medium.cnf
@@ -0,0 +1,37 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/5/mysqld/my-small.cnf b/install/rhel/5/mysqld/my-small.cnf
new file mode 100644
index 000000000..52a3d33a6
--- /dev/null
+++ b/install/rhel/5/mysqld/my-small.cnf
@@ -0,0 +1,35 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 32K
+max_allowed_packet = 8M
+table_open_cache = 4
+sort_buffer_size = 128K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=50
+max_user_connections=25
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/named.conf b/install/rhel/5/named/named.conf
similarity index 100%
rename from install/rhel/named.conf
rename to install/rhel/5/named/named.conf
diff --git a/install/rhel/5/nginx/nginx.conf b/install/rhel/5/nginx/nginx.conf
new file mode 100644
index 000000000..1b953c01a
--- /dev/null
+++ b/install/rhel/5/nginx/nginx.conf
@@ -0,0 +1,101 @@
+# Server globals
+user nginx;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/rhel/5/nginx/phpmyadmin.inc b/install/rhel/5/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..09da52076
--- /dev/null
+++ b/install/rhel/5/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpMyAdmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpMyAdmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/5/nginx/phppgadmin.inc b/install/rhel/5/nginx/phppgadmin.inc
new file mode 100644
index 000000000..333e560a2
--- /dev/null
+++ b/install/rhel/5/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phpPgAdmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phpPgAdmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/nginx-status.conf b/install/rhel/5/nginx/status.conf
similarity index 100%
rename from install/ubuntu/nginx-status.conf
rename to install/rhel/5/nginx/status.conf
diff --git a/install/rhel/5/nginx/webmail.inc b/install/rhel/5/nginx/webmail.inc
new file mode 100644
index 000000000..2d0fbe293
--- /dev/null
+++ b/install/rhel/5/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /usr/share/roundcubemail/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /usr/share/roundcubemail/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/5/packages/default.pkg b/install/rhel/5/packages/default.pkg
new file mode 100644
index 000000000..3df21d3df
--- /dev/null
+++ b/install/rhel/5/packages/default.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2015-06-05'
diff --git a/install/rhel/5/packages/gainsboro.pkg b/install/rhel/5/packages/gainsboro.pkg
new file mode 100644
index 000000000..2b66b7d17
--- /dev/null
+++ b/install/rhel/5/packages/gainsboro.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2015-06-05'
diff --git a/install/rhel/5/packages/palegreen.pkg b/install/rhel/5/packages/palegreen.pkg
new file mode 100644
index 000000000..b17e5e1b2
--- /dev/null
+++ b/install/rhel/5/packages/palegreen.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='hosting'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2015-06-05'
diff --git a/install/rhel/5/packages/slategrey.pkg b/install/rhel/5/packages/slategrey.pkg
new file mode 100644
index 000000000..cc9ef423c
--- /dev/null
+++ b/install/rhel/5/packages/slategrey.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2015-06-05'
diff --git a/install/ubuntu/pga.conf b/install/rhel/5/pga/config.inc.php
similarity index 100%
rename from install/ubuntu/pga.conf
rename to install/rhel/5/pga/config.inc.php
diff --git a/install/rhel/httpd-pga.conf b/install/rhel/5/pga/phpPgAdmin.conf
similarity index 100%
rename from install/rhel/httpd-pga.conf
rename to install/rhel/5/pga/phpPgAdmin.conf
diff --git a/install/rhel/5/php-fpm/www.conf b/install/rhel/5/php-fpm/www.conf
new file mode 100644
index 000000000..260109d8f
--- /dev/null
+++ b/install/rhel/5/php-fpm/www.conf
@@ -0,0 +1,10 @@
+[www]
+listen = 127.0.0.1:9000
+listen.allowed_clients = 127.0.0.1
+user = apache
+group = apache
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 5
+pm.min_spare_servers = 3
+pm.max_spare_servers = 35
diff --git a/install/rhel/pma.conf b/install/rhel/5/pma/config.inc.conf
similarity index 100%
rename from install/rhel/pma.conf
rename to install/rhel/5/pma/config.inc.conf
diff --git a/install/rhel/httpd-pma.conf b/install/rhel/5/pma/phpMyAdmin.conf
similarity index 89%
rename from install/rhel/httpd-pma.conf
rename to install/rhel/5/pma/phpMyAdmin.conf
index 3950860ef..0049ef2b7 100644
--- a/install/rhel/httpd-pma.conf
+++ b/install/rhel/5/pma/phpMyAdmin.conf
@@ -37,9 +37,3 @@ Alias /phpmyadmin /usr/share/phpMyAdmin
# SecRuleInheritance Off
#
#
-
-
- Order Deny,Allow
- Deny from All
- Allow from None
-
diff --git a/install/rhel/5/postgresql/pg_hba.conf b/install/rhel/5/postgresql/pg_hba.conf
new file mode 100644
index 000000000..b65e66434
--- /dev/null
+++ b/install/rhel/5/postgresql/pg_hba.conf
@@ -0,0 +1,11 @@
+# "local" is for Unix domain socket connections only
+local all all md5
+
+# IPv4 local connections:
+host all all 127.0.0.1/32 md5
+
+# IPv6 local connections:
+host all all ::1/128 md5
+
+# Others
+host all all 0.0.0.0/0 md5
diff --git a/install/rhel/proftpd.conf b/install/rhel/5/proftpd/proftpd.conf
similarity index 100%
rename from install/rhel/proftpd.conf
rename to install/rhel/5/proftpd/proftpd.conf
diff --git a/install/rhel/5/remi-release.rpm b/install/rhel/5/remi-release.rpm
new file mode 100644
index 000000000..e0c3696c4
Binary files /dev/null and b/install/rhel/5/remi-release.rpm differ
diff --git a/install/ubuntu/roundcube-pw.conf b/install/rhel/5/roundcube/config.inc.php
similarity index 100%
rename from install/ubuntu/roundcube-pw.conf
rename to install/rhel/5/roundcube/config.inc.php
diff --git a/install/ubuntu/roundcube-db.conf b/install/rhel/5/roundcube/db.inc.php
similarity index 100%
rename from install/ubuntu/roundcube-db.conf
rename to install/rhel/5/roundcube/db.inc.php
diff --git a/install/rhel/5/roundcube/main.inc.php b/install/rhel/5/roundcube/main.inc.php
new file mode 100644
index 000000000..a27c306eb
--- /dev/null
+++ b/install/rhel/5/roundcube/main.inc.php
@@ -0,0 +1,40 @@
+
- Order Deny,Allow
- Deny from all
- Allow from all
-
-
-
- Order Deny,Allow
- Deny from all
- Allow from None
+ Order Deny,Allow
+ Deny from all
+ Allow from all
diff --git a/install/rhel/roundcube-driver.php b/install/rhel/5/roundcube/vesta.php
similarity index 100%
rename from install/rhel/roundcube-driver.php
rename to install/rhel/5/roundcube/vesta.php
diff --git a/install/rhel/5/sudo/admin b/install/rhel/5/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/rhel/5/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/templates/dns/child-ns.tpl b/install/rhel/5/templates/dns/child-ns.tpl
similarity index 100%
rename from install/ubuntu/templates/dns/child-ns.tpl
rename to install/rhel/5/templates/dns/child-ns.tpl
diff --git a/install/rhel/templates/dns/default.tpl b/install/rhel/5/templates/dns/default.tpl
similarity index 100%
rename from install/rhel/templates/dns/default.tpl
rename to install/rhel/5/templates/dns/default.tpl
diff --git a/install/ubuntu/templates/dns/gmail.tpl b/install/rhel/5/templates/dns/gmail.tpl
similarity index 90%
rename from install/ubuntu/templates/dns/gmail.tpl
rename to install/rhel/5/templates/dns/gmail.tpl
index 59b4779f2..950cfa456 100755
--- a/install/ubuntu/templates/dns/gmail.tpl
+++ b/install/rhel/5/templates/dns/gmail.tpl
@@ -11,4 +11,4 @@ ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPE
ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
-ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a ip4:%ip% include:_spf.google.com ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/templates/web/awstats/awstats.tpl b/install/rhel/5/templates/web/awstats/awstats.tpl
similarity index 100%
rename from install/ubuntu/templates/web/awstats/awstats.tpl
rename to install/rhel/5/templates/web/awstats/awstats.tpl
diff --git a/install/ubuntu/templates/web/awstats/index.tpl b/install/rhel/5/templates/web/awstats/index.tpl
similarity index 100%
rename from install/ubuntu/templates/web/awstats/index.tpl
rename to install/rhel/5/templates/web/awstats/index.tpl
diff --git a/install/ubuntu/templates/web/awstats/nav.tpl b/install/rhel/5/templates/web/awstats/nav.tpl
similarity index 100%
rename from install/ubuntu/templates/web/awstats/nav.tpl
rename to install/rhel/5/templates/web/awstats/nav.tpl
diff --git a/install/rhel/templates/web/httpd/basedir.stpl b/install/rhel/5/templates/web/httpd/basedir.stpl
similarity index 86%
rename from install/rhel/templates/web/httpd/basedir.stpl
rename to install/rhel/5/templates/web/httpd/basedir.stpl
index cd4a8c88c..d568276df 100755
--- a/install/rhel/templates/web/httpd/basedir.stpl
+++ b/install/rhel/5/templates/web/httpd/basedir.stpl
@@ -15,9 +15,7 @@
AllowOverride All
SSLRequireSSL
Options +Includes -Indexes +ExecCGI
- php_admin_value open_basedir %docroot%:%home%/%user%/tmp
- php_admin_value upload_tmp_dir %home%/%user%/tmp
- php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value open_basedir %docroot%
AllowOverride All
diff --git a/install/rhel/templates/web/httpd/basedir.tpl b/install/rhel/5/templates/web/httpd/basedir.tpl
similarity index 84%
rename from install/rhel/templates/web/httpd/basedir.tpl
rename to install/rhel/5/templates/web/httpd/basedir.tpl
index 94288db02..41b77334a 100755
--- a/install/rhel/templates/web/httpd/basedir.tpl
+++ b/install/rhel/5/templates/web/httpd/basedir.tpl
@@ -14,9 +14,7 @@
AllowOverride All
Options +Includes -Indexes +ExecCGI
- php_admin_value open_basedir %docroot%:%home%/%user%/tmp
- php_admin_value upload_tmp_dir %home%/%user%/tmp
- php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value open_basedir %docroot%
AllowOverride All
diff --git a/install/rhel/templates/web/httpd/default.stpl b/install/rhel/5/templates/web/httpd/default.stpl
similarity index 100%
rename from install/rhel/templates/web/httpd/default.stpl
rename to install/rhel/5/templates/web/httpd/default.stpl
diff --git a/install/rhel/templates/web/httpd/default.tpl b/install/rhel/5/templates/web/httpd/default.tpl
similarity index 100%
rename from install/rhel/templates/web/httpd/default.tpl
rename to install/rhel/5/templates/web/httpd/default.tpl
diff --git a/install/rhel/templates/web/httpd/hosting.stpl b/install/rhel/5/templates/web/httpd/hosting.stpl
similarity index 100%
rename from install/rhel/templates/web/httpd/hosting.stpl
rename to install/rhel/5/templates/web/httpd/hosting.stpl
diff --git a/install/rhel/templates/web/httpd/hosting.tpl b/install/rhel/5/templates/web/httpd/hosting.tpl
similarity index 100%
rename from install/rhel/templates/web/httpd/hosting.tpl
rename to install/rhel/5/templates/web/httpd/hosting.tpl
diff --git a/install/ubuntu/templates/web/apache2/phpcgi.sh b/install/rhel/5/templates/web/httpd/phpcgi.sh
similarity index 100%
rename from install/ubuntu/templates/web/apache2/phpcgi.sh
rename to install/rhel/5/templates/web/httpd/phpcgi.sh
diff --git a/install/rhel/templates/web/httpd/phpcgi.stpl b/install/rhel/5/templates/web/httpd/phpcgi.stpl
similarity index 100%
rename from install/rhel/templates/web/httpd/phpcgi.stpl
rename to install/rhel/5/templates/web/httpd/phpcgi.stpl
diff --git a/install/rhel/templates/web/httpd/phpcgi.tpl b/install/rhel/5/templates/web/httpd/phpcgi.tpl
similarity index 100%
rename from install/rhel/templates/web/httpd/phpcgi.tpl
rename to install/rhel/5/templates/web/httpd/phpcgi.tpl
diff --git a/install/ubuntu/templates/web/apache2/phpfcgid.sh b/install/rhel/5/templates/web/httpd/phpfcgid.sh
similarity index 100%
rename from install/ubuntu/templates/web/apache2/phpfcgid.sh
rename to install/rhel/5/templates/web/httpd/phpfcgid.sh
diff --git a/install/rhel/templates/web/httpd/phpfcgid.stpl b/install/rhel/5/templates/web/httpd/phpfcgid.stpl
similarity index 100%
rename from install/rhel/templates/web/httpd/phpfcgid.stpl
rename to install/rhel/5/templates/web/httpd/phpfcgid.stpl
diff --git a/install/rhel/templates/web/httpd/phpfcgid.tpl b/install/rhel/5/templates/web/httpd/phpfcgid.tpl
similarity index 100%
rename from install/rhel/templates/web/httpd/phpfcgid.tpl
rename to install/rhel/5/templates/web/httpd/phpfcgid.tpl
diff --git a/install/rhel/5/templates/web/nginx/caching.sh b/install/rhel/5/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/rhel/5/templates/web/nginx/caching.stpl b/install/rhel/5/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..1109c924f
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache %domain%;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/caching.tpl b/install/rhel/5/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..6d727c67f
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache %domain%;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/rhel/templates/web/nginx/default.stpl b/install/rhel/5/templates/web/nginx/default.stpl
similarity index 100%
rename from install/rhel/templates/web/nginx/default.stpl
rename to install/rhel/5/templates/web/nginx/default.stpl
diff --git a/install/rhel/templates/web/nginx/default.tpl b/install/rhel/5/templates/web/nginx/default.tpl
similarity index 100%
rename from install/rhel/templates/web/nginx/default.tpl
rename to install/rhel/5/templates/web/nginx/default.tpl
diff --git a/install/ubuntu/templates/web/nginx/hosting.sh b/install/rhel/5/templates/web/nginx/hosting.sh
similarity index 100%
rename from install/ubuntu/templates/web/nginx/hosting.sh
rename to install/rhel/5/templates/web/nginx/hosting.sh
diff --git a/install/rhel/templates/web/nginx/hosting.stpl b/install/rhel/5/templates/web/nginx/hosting.stpl
similarity index 100%
rename from install/rhel/templates/web/nginx/hosting.stpl
rename to install/rhel/5/templates/web/nginx/hosting.stpl
diff --git a/install/rhel/templates/web/nginx/hosting.tpl b/install/rhel/5/templates/web/nginx/hosting.tpl
similarity index 100%
rename from install/rhel/templates/web/nginx/hosting.tpl
rename to install/rhel/5/templates/web/nginx/hosting.tpl
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.stpl b/install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.tpl b/install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.stpl b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.tpl b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.stpl b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.tpl b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.stpl b/install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.tpl b/install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/default.stpl b/install/rhel/5/templates/web/nginx/php-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/default.tpl b/install/rhel/5/templates/web/nginx/php-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/joomla.stpl b/install/rhel/5/templates/web/nginx/php-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/joomla.tpl b/install/rhel/5/templates/web/nginx/php-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/piwik.stpl b/install/rhel/5/templates/web/nginx/php-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/piwik.tpl b/install/rhel/5/templates/web/nginx/php-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/wordpress.stpl b/install/rhel/5/templates/web/nginx/php-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/wordpress.tpl b/install/rhel/5/templates/web/nginx/php-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/wordpress2.stpl b/install/rhel/5/templates/web/nginx/php-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/wordpress2.tpl b/install/rhel/5/templates/web/nginx/php-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/rhel/5/templates/web/nginx/php-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/templates/web/nginx/proxy_ip.tpl b/install/rhel/5/templates/web/nginx/proxy_ip.tpl
similarity index 100%
rename from install/ubuntu/templates/web/nginx/proxy_ip.tpl
rename to install/rhel/5/templates/web/nginx/proxy_ip.tpl
diff --git a/install/rhel/5/templates/web/php-fpm/default.tpl b/install/rhel/5/templates/web/php-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/rhel/5/templates/web/php-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/rhel/5/templates/web/php-fpm/no-php.tpl b/install/rhel/5/templates/web/php-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/rhel/5/templates/web/php-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/rhel/5/templates/web/php-fpm/socket.tpl b/install/rhel/5/templates/web/php-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/rhel/5/templates/web/php-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/debian/templates/web/skel/document_errors/403.html b/install/rhel/5/templates/web/skel/document_errors/403.html
similarity index 100%
rename from install/debian/templates/web/skel/document_errors/403.html
rename to install/rhel/5/templates/web/skel/document_errors/403.html
diff --git a/install/debian/templates/web/skel/document_errors/404.html b/install/rhel/5/templates/web/skel/document_errors/404.html
similarity index 100%
rename from install/debian/templates/web/skel/document_errors/404.html
rename to install/rhel/5/templates/web/skel/document_errors/404.html
diff --git a/install/debian/templates/web/skel/document_errors/50x.html b/install/rhel/5/templates/web/skel/document_errors/50x.html
similarity index 100%
rename from install/debian/templates/web/skel/document_errors/50x.html
rename to install/rhel/5/templates/web/skel/document_errors/50x.html
diff --git a/install/ubuntu/templates/web/skel/public_html/index.html b/install/rhel/5/templates/web/skel/public_html/index.html
similarity index 100%
rename from install/ubuntu/templates/web/skel/public_html/index.html
rename to install/rhel/5/templates/web/skel/public_html/index.html
diff --git a/install/ubuntu/templates/web/skel/public_html/robots.txt b/install/rhel/5/templates/web/skel/public_html/robots.txt
similarity index 100%
rename from install/ubuntu/templates/web/skel/public_html/robots.txt
rename to install/rhel/5/templates/web/skel/public_html/robots.txt
diff --git a/install/ubuntu/templates/web/skel/public_shtml/index.html b/install/rhel/5/templates/web/skel/public_shtml/index.html
similarity index 100%
rename from install/ubuntu/templates/web/skel/public_shtml/index.html
rename to install/rhel/5/templates/web/skel/public_shtml/index.html
diff --git a/install/ubuntu/templates/web/skel/public_shtml/robots.txt b/install/rhel/5/templates/web/skel/public_shtml/robots.txt
similarity index 100%
rename from install/ubuntu/templates/web/skel/public_shtml/robots.txt
rename to install/rhel/5/templates/web/skel/public_shtml/robots.txt
diff --git a/install/ubuntu/templates/web/suspend/.htaccess b/install/rhel/5/templates/web/suspend/.htaccess
similarity index 100%
rename from install/ubuntu/templates/web/suspend/.htaccess
rename to install/rhel/5/templates/web/suspend/.htaccess
diff --git a/install/ubuntu/templates/web/suspend/index.html b/install/rhel/5/templates/web/suspend/index.html
similarity index 100%
rename from install/ubuntu/templates/web/suspend/index.html
rename to install/rhel/5/templates/web/suspend/index.html
diff --git a/install/ubuntu/templates/web/webalizer/webalizer.tpl b/install/rhel/5/templates/web/webalizer/webalizer.tpl
similarity index 100%
rename from install/ubuntu/templates/web/webalizer/webalizer.tpl
rename to install/rhel/5/templates/web/webalizer/webalizer.tpl
diff --git a/install/rhel/vsftpd.conf b/install/rhel/5/vsftpd/vsftpd.conf
similarity index 100%
rename from install/rhel/vsftpd.conf
rename to install/rhel/5/vsftpd/vsftpd.conf
diff --git a/install/rhel/5/wsgi/httpd/wsgi.sh b/install/rhel/5/wsgi/httpd/wsgi.sh
new file mode 100755
index 000000000..cb98116cb
--- /dev/null
+++ b/install/rhel/5/wsgi/httpd/wsgi.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+echo "# Wsgi template
+AddHandler wsgi-script .wsgi
+
+RewriteEngine On
+
+RewriteCond %{HTTP_HOST} ^www.$2\.ru\$ [NC]
+RewriteRule ^(.*)\$ http://$2/\$1 [R=301,L]
+
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)\$ /django.wsgi/\$1 [QSA,PT,L]
+" > $docroot/.htaccess
+chown $user:$user $docroot/.htaccess
+
+
+echo "import os, sys
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/env/lib/python2.6/site-packages')
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/project/src/shared/')
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/project/src/')
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'main.settings'
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()" > $docroot/django.wsgi
+chown $user:$user $docroot/django.wsgi
+
+exit 0
diff --git a/install/rhel/5/wsgi/httpd/wsgi.stpl b/install/rhel/5/wsgi/httpd/wsgi.stpl
new file mode 100755
index 000000000..e2fdd3f40
--- /dev/null
+++ b/install/rhel/5/wsgi/httpd/wsgi.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ WSGIDaemonProcess apx-idea user=%user% group=%user% processes=1 threads=5 display-name=%{GROUP} python-path=%home%/%user%/web/%domain%/private/django/%domain%/env/lib/python2.6/site-packages
+ WSGIProcessGroup apx-idea
+ WSGIApplicationGroup %{GLOBAL}
+
+
+
+ AllowOverride FileInfo
+ Options ExecCGI Indexes
+ MultiviewsMatch Handlers
+ Options +FollowSymLinks
+ Order allow,deny
+ Allow from all
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/5/wsgi/httpd/wsgi.tpl b/install/rhel/5/wsgi/httpd/wsgi.tpl
new file mode 100644
index 000000000..ad5d8a076
--- /dev/null
+++ b/install/rhel/5/wsgi/httpd/wsgi.tpl
@@ -0,0 +1,44 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ WSGIDaemonProcess apx-idea user=%user% group=%user% processes=1 threads=5 display-name=%{GROUP} python-path=%home%/%user%/web/%domain%/private/django/%domain%/env/lib/python2.6/site-packages
+ WSGIProcessGroup apx-idea
+ WSGIApplicationGroup %{GLOBAL}
+
+
+
+ AllowOverride FileInfo
+ Options ExecCGI Indexes
+ MultiviewsMatch Handlers
+ Options +FollowSymLinks
+ Order allow,deny
+ Allow from all
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/GPG.txt b/install/rhel/6/GPG.txt
new file mode 100644
index 000000000..33bb1ff26
--- /dev/null
+++ b/install/rhel/6/GPG.txt
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQGiBExUOVkRBACPJeB3bdrAggHlFpkaB1aRDXDz7clRg6jyEzdMYHhrniSyjhAH
++b53zE4iapCHFIamEG2Fa7zS2lSx7068AmqHsZK5jwmyhTVVYuTtbebj1C4Y5ToW
+icHhy4ullB7qeDmAod6EY4YSx2kYO3dR/QLk5QM4lWuV/OLdXWTeoKiiYwCg0UAP
+yUkBXgNcKXrFqoJelmG3JEMEAIYM7CGwVd47FsM1UCu56HNQPErxLoUPBUlAQFtx
+OMOFDMEm7qH7ve8FgGGRL9oHF7mSJ3y7HgM1BF5MHkKz6FjDrT1U5+Lub6oI2e90
+gfCMGlQAzUm9o+fijfbhKoEQ/xQRkUoqWEaf9zlFx1/4+NH+Qz/L8ZDTHvSLvUgt
+HyZlA/916St5suAUugXu9PeLRVqboiHjhz0JWKneQEQ2QcTu8lhHsu/mZTWL9FYn
+XwtiCJLZT8bpBSfl8Oeqhof1+sPgnv7t/LuKQ6JJmyJ46Sa453wfrs+xs32hKAe+
+ZN0VGBmHe7NhuhW/LdM0KMMr/LHuJJJAgmt+XVHi2RFwsZvdMbQkVmVzdGEgUGFj
+a2FnZXMgPGJ1aWxkZXJAdmVzdGFjcC5jb20+iGAEExECACAFAkxUOVkCGwMGCwkI
+BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRBbjeFzoXeCtp6dAKDQfeTPHi6hCgg4L+sx
+LEjXvVdLOwCfe9yfr+en+uz6qst0QBT2cAwB+q+5Ag0ETFQ5bBAIAJYZa9pV9l/R
+OUFgIvdJd1mvzJpRAXsRBBJc22WuOHp22Uj+lMKrJMTRQZvFBvk9s7Mb1/ACXrL4
+vIbsKqXNAlVFp9kF1tKV2ejZ1MrJaQ4819bIkyG0lJzjl6u9lzJopF7ie00YHKC6
+1rltLaevfFjUXq1DoYZBg42hT/SOj+3+2D0e9qcxeuxXbsjnvwtxxUkWcP/ftOSt
+HsAAbM1YtwGl9+fZLWG9+WIKNOE9kp+h2ywZtFA4v/Ms2op7oZGAL7C95k1EgLrH
+mOZ0B2oKOLctV1z9keWksPN/osyG7Mg8ljv8zF3XwQFqHOHRntDqSWoFBMvJBkNS
+vtm6u5WyKd8ABAsH/0RbeWVA+JqpZ24Rl57XoDRPRzno0m0EnkJMXr22uBq1lPg8
+VkadrGOshFXpM3Rho57f3U7fwKmShQXGEV7RHsWcxcfwOSKVJtI468sDuYXc2l1f
+5nFo+rCtVh3BBq+JtZFKX0x53BesCT/M7l33Dfm9MDi34tEdPTPjumBIH1dowYdv
+9/2HPlPp4NZte7gOO/VIAiS+jJ30aBn09t8duW5md7/rkOPIM5It05LGCLjb9hVm
+R9zTwzw30fIrkeyWZdAbk76lH8u8j6PX30U6RRzb33+XIFR4ab3nlyqOQOpoTqyG
+cs7B02sgBbyC+RG1EYfcelSEvLXkR8mjcqjs+MCISQQYEQIACQUCTFQ5bAIbDAAK
+CRBbjeFzoXeCtlpcAKDLh59svtq/Gn99O9ZZw0nBjWv6sACfffDxPhCP1F852Jab
+d8P1WGhr2Q8=
+=Z1Jj
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/rhel/6/clamav/clamd.conf b/install/rhel/6/clamav/clamd.conf
new file mode 100644
index 000000000..c215bcb98
--- /dev/null
+++ b/install/rhel/6/clamav/clamd.conf
@@ -0,0 +1,502 @@
+##
+## Example config file for the Clam AV daemon
+## Please read the clamd.conf(5) manual before editing this file.
+##
+
+
+# Comment or remove the line below.
+#Example
+
+# Uncomment this option to enable logging.
+# LogFile must be writable for the user running daemon.
+# A full path is required.
+# Default: disabled
+LogFile /var/log/clamav/clamd.log
+
+# By default the log file is locked for writing - the lock protects against
+# running clamd multiple times (if want to run another clamd, please
+# copy the configuration file, change the LogFile variable, and run
+# the daemon with --config-file option).
+# This option disables log file locking.
+# Default: no
+#LogFileUnlock yes
+
+# Maximum size of the log file.
+# Value of 0 disables the limit.
+# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
+# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
+# in bytes just don't use modifiers.
+# Default: 1M
+LogFileMaxSize 0
+
+# Log time with each message.
+# Default: no
+LogTime yes
+
+# Also log clean files. Useful in debugging but drastically increases the
+# log size.
+# Default: no
+#LogClean yes
+
+# Use system logger (can work together with LogFile).
+# Default: no
+LogSyslog yes
+
+# Specify the type of syslog messages - please refer to 'man syslog'
+# for facility names.
+# Default: LOG_LOCAL6
+#LogFacility LOG_MAIL
+
+# Enable verbose logging.
+# Default: no
+#LogVerbose yes
+
+# Log additional information about the infected file, such as its
+# size and hash, together with the virus name.
+#ExtendedDetectionInfo yes
+
+# This option allows you to save a process identifier of the listening
+# daemon (main thread).
+# Default: disabled
+PidFile /var/run/clamav/clamd.pid
+
+# Optional path to the global temporary directory.
+# Default: system specific (usually /tmp or /var/tmp).
+TemporaryDirectory /var/tmp
+
+# Path to the database directory.
+# Default: hardcoded (depends on installation options)
+DatabaseDirectory /var/lib/clamav
+
+# Only load the official signatures published by the ClamAV project.
+# Default: no
+#OfficialDatabaseOnly no
+
+# The daemon can work in local mode, network mode or both.
+# Due to security reasons we recommend the local mode.
+
+# Path to a local socket file the daemon will listen on.
+# Default: disabled (must be specified by a user)
+LocalSocket /var/run/clamav/clamd.sock
+
+# Sets the group ownership on the unix socket.
+# Default: disabled (the primary group of the user running clamd)
+#LocalSocketGroup virusgroup
+
+# Sets the permissions on the unix socket to the specified mode.
+# Default: disabled (socket is world accessible)
+#LocalSocketMode 660
+
+# Remove stale socket after unclean shutdown.
+# Default: yes
+FixStaleSocket yes
+
+# TCP port address.
+# Default: no
+TCPSocket 3310
+
+# TCP address.
+# By default we bind to INADDR_ANY, probably not wise.
+# Enable the following to provide some degree of protection
+# from the outside world.
+# Default: no
+TCPAddr 127.0.0.1
+
+# Maximum length the queue of pending connections may grow to.
+# Default: 200
+MaxConnectionQueueLength 30
+
+# Clamd uses FTP-like protocol to receive data from remote clients.
+# If you are using clamav-milter to balance load between remote clamd daemons
+# on firewall servers you may need to tune the options below.
+
+# Close the connection when the data size limit is exceeded.
+# The value should match your MTA's limit for a maximum attachment size.
+# Default: 25M
+#StreamMaxLength 10M
+
+# Limit port range.
+# Default: 1024
+#StreamMinPort 30000
+# Default: 2048
+#StreamMaxPort 32000
+
+# Maximum number of threads running at the same time.
+# Default: 10
+MaxThreads 50
+
+# Waiting for data from a client socket will timeout after this time (seconds).
+# Default: 120
+ReadTimeout 300
+
+# This option specifies the time (in seconds) after which clamd should
+# timeout if a client doesn't provide any initial command after connecting.
+# Default: 5
+#CommandReadTimeout 5
+
+# This option specifies how long to wait (in miliseconds) if the send buffer is full.
+# Keep this value low to prevent clamd hanging
+#
+# Default: 500
+#SendBufTimeout 200
+
+# Maximum number of queued items (including those being processed by MaxThreads threads)
+# It is recommended to have this value at least twice MaxThreads if possible.
+# WARNING: you shouldn't increase this too much to avoid running out of file descriptors,
+# the following condition should hold:
+# MaxThreads*MaxRecursion + (MaxQueue - MaxThreads) + 6< RLIMIT_NOFILE (usual max is 1024)
+#
+# Default: 100
+#MaxQueue 200
+
+# Waiting for a new job will timeout after this time (seconds).
+# Default: 30
+#IdleTimeout 60
+
+# Don't scan files and directories matching regex
+# This directive can be used multiple times
+# Default: scan all
+#ExcludePath ^/proc/
+#ExcludePath ^/sys/
+
+# Maximum depth directories are scanned at.
+# Default: 15
+#MaxDirectoryRecursion 20
+
+# Follow directory symlinks.
+# Default: no
+#FollowDirectorySymlinks yes
+
+# Follow regular file symlinks.
+# Default: no
+#FollowFileSymlinks yes
+
+# Scan files and directories on other filesystems.
+# Default: yes
+#CrossFilesystems yes
+
+# Perform a database check.
+# Default: 600 (10 min)
+#SelfCheck 600
+
+# Execute a command when virus is found. In the command string %v will
+# be replaced with the virus name.
+# Default: no
+#VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"
+
+# Run as another user (clamd must be started by root for this option to work)
+# Default: don't drop privileges
+User clam
+
+# Initialize supplementary group access (clamd must be started by root).
+# Default: no
+AllowSupplementaryGroups yes
+
+# Stop daemon when libclamav reports out of memory condition.
+#ExitOnOOM yes
+
+# Don't fork into background.
+# Default: no
+#Foreground yes
+
+# Enable debug messages in libclamav.
+# Default: no
+#Debug yes
+
+# Do not remove temporary files (for debug purposes).
+# Default: no
+#LeaveTemporaryFiles yes
+
+# Detect Possibly Unwanted Applications.
+# Default: no
+#DetectPUA yes
+
+# Exclude a specific PUA category. This directive can be used multiple times.
+# See http://www.clamav.net/support/pua for the complete list of PUA
+# categories.
+# Default: Load all categories (if DetectPUA is activated)
+#ExcludePUA NetTool
+#ExcludePUA PWTool
+
+# Only include a specific PUA category. This directive can be used multiple
+# times.
+# Default: Load all categories (if DetectPUA is activated)
+#IncludePUA Spy
+#IncludePUA Scanner
+#IncludePUA RAT
+
+# In some cases (eg. complex malware, exploits in graphic files, and others),
+# ClamAV uses special algorithms to provide accurate detection. This option
+# controls the algorithmic detection.
+# Default: yes
+#AlgorithmicDetection yes
+
+
+##
+## Executable files
+##
+
+# PE stands for Portable Executable - it's an executable file format used
+# in all 32 and 64-bit versions of Windows operating systems. This option allows
+# ClamAV to perform a deeper analysis of executable files and it's also
+# required for decompression of popular executable packers such as UPX, FSG,
+# and Petite. If you turn off this option, the original files will still be
+# scanned, but without additional processing.
+# Default: yes
+ScanPE yes
+
+# Executable and Linking Format is a standard format for UN*X executables.
+# This option allows you to control the scanning of ELF files.
+# If you turn off this option, the original files will still be scanned, but
+# without additional processing.
+# Default: yes
+ScanELF yes
+
+# With this option clamav will try to detect broken executables (both PE and
+# ELF) and mark them as Broken.Executable.
+# Default: no
+DetectBrokenExecutables yes
+
+
+##
+## Documents
+##
+
+# This option enables scanning of OLE2 files, such as Microsoft Office
+# documents and .msi files.
+# If you turn off this option, the original files will still be scanned, but
+# without additional processing.
+# Default: yes
+ScanOLE2 yes
+
+
+# With this option enabled OLE2 files with VBA macros, which were not
+# detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
+# Default: no
+#OLE2BlockMacros no
+
+# This option enables scanning within PDF files.
+# If you turn off this option, the original files will still be scanned, but
+# without decoding and additional processing.
+# Default: yes
+#ScanPDF yes
+
+
+##
+## Mail files
+##
+
+# Enable internal e-mail scanner.
+# If you turn off this option, the original files will still be scanned, but
+# without parsing individual messages/attachments.
+# Default: yes
+ScanMail yes
+
+# Scan RFC1341 messages split over many emails.
+# You will need to periodically clean up $TemporaryDirectory/clamav-partial directory.
+# WARNING: This option may open your system to a DoS attack.
+# Never use it on loaded servers.
+# Default: no
+#ScanPartialMessages yes
+
+
+# With this option enabled ClamAV will try to detect phishing attempts by using
+# signatures.
+# Default: yes
+#PhishingSignatures yes
+
+# Scan URLs found in mails for phishing attempts using heuristics.
+# Default: yes
+#PhishingScanURLs yes
+
+# Always block SSL mismatches in URLs, even if the URL isn't in the database.
+# This can lead to false positives.
+#
+# Default: no
+#PhishingAlwaysBlockSSLMismatch no
+
+# Always block cloaked URLs, even if URL isn't in database.
+# This can lead to false positives.
+#
+# Default: no
+#PhishingAlwaysBlockCloak no
+
+# Allow heuristic match to take precedence.
+# When enabled, if a heuristic scan (such as phishingScan) detects
+# a possible virus/phish it will stop scan immediately. Recommended, saves CPU
+# scan-time.
+# When disabled, virus/phish detected by heuristic scans will be reported only at
+# the end of a scan. If an archive contains both a heuristically detected
+# virus/phish, and a real malware, the real malware will be reported
+#
+# Keep this disabled if you intend to handle "*.Heuristics.*" viruses
+# differently from "real" malware.
+# If a non-heuristically-detected virus (signature-based) is found first,
+# the scan is interrupted immediately, regardless of this config option.
+#
+# Default: no
+#HeuristicScanPrecedence yes
+
+##
+## Data Loss Prevention (DLP)
+##
+
+# Enable the DLP module
+# Default: No
+#StructuredDataDetection yes
+
+# This option sets the lowest number of Credit Card numbers found in a file
+# to generate a detect.
+# Default: 3
+#StructuredMinCreditCardCount 5
+
+# This option sets the lowest number of Social Security Numbers found
+# in a file to generate a detect.
+# Default: 3
+#StructuredMinSSNCount 5
+
+# With this option enabled the DLP module will search for valid
+# SSNs formatted as xxx-yy-zzzz
+# Default: yes
+#StructuredSSNFormatNormal yes
+
+# With this option enabled the DLP module will search for valid
+# SSNs formatted as xxxyyzzzz
+# Default: no
+#StructuredSSNFormatStripped yes
+
+
+##
+## HTML
+##
+
+# Perform HTML normalisation and decryption of MS Script Encoder code.
+# Default: yes
+# If you turn off this option, the original files will still be scanned, but
+# without additional processing.
+#ScanHTML yes
+
+
+##
+## Archives
+##
+
+# ClamAV can scan within archives and compressed files.
+# If you turn off this option, the original files will still be scanned, but
+# without unpacking and additional processing.
+# Default: yes
+ScanArchive yes
+
+# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
+# Default: no
+ArchiveBlockEncrypted no
+
+
+##
+## Limits
+##
+
+# The options below protect your system against Denial of Service attacks
+# using archive bombs.
+
+# This option sets the maximum amount of data to be scanned for each input file.
+# Archives and other containers are recursively extracted and scanned up to this
+# value.
+# Value of 0 disables the limit
+# Note: disabling this limit or setting it too high may result in severe damage
+# to the system.
+# Default: 100M
+#MaxScanSize 150M
+
+# Files larger than this limit won't be scanned. Affects the input file itself
+# as well as files contained inside it (when the input file is an archive, a
+# document or some other kind of container).
+# Value of 0 disables the limit.
+# Note: disabling this limit or setting it too high may result in severe damage
+# to the system.
+# Default: 25M
+#MaxFileSize 30M
+
+# Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
+# file, all files within it will also be scanned. This options specifies how
+# deeply the process should be continued.
+# Note: setting this limit too high may result in severe damage to the system.
+# Default: 16
+#MaxRecursion 10
+
+# Number of files to be scanned within an archive, a document, or any other
+# container file.
+# Value of 0 disables the limit.
+# Note: disabling this limit or setting it too high may result in severe damage
+# to the system.
+# Default: 10000
+#MaxFiles 15000
+
+
+##
+## Clamuko settings
+##
+
+# Enable Clamuko. Dazuko must be configured and running. Clamuko supports
+# both Dazuko (/dev/dazuko) and DazukoFS (/dev/dazukofs.ctrl). DazukoFS
+# is the preferred option. For more information please visit www.dazuko.org
+# Default: no
+#ClamukoScanOnAccess yes
+
+# The number of scanner threads that will be started (DazukoFS only).
+# Having multiple scanner threads allows Clamuko to serve multiple
+# processes simultaneously. This is particularly beneficial on SMP machines.
+# Default: 3
+#ClamukoScannerCount 3
+
+# Don't scan files larger than ClamukoMaxFileSize
+# Value of 0 disables the limit.
+# Default: 5M
+#ClamukoMaxFileSize 10M
+
+# Set access mask for Clamuko (Dazuko only).
+# Default: no
+#ClamukoScanOnOpen yes
+#ClamukoScanOnClose yes
+#ClamukoScanOnExec yes
+
+# Set the include paths (all files inside them will be scanned). You can have
+# multiple ClamukoIncludePath directives but each directory must be added
+# in a seperate line. (Dazuko only)
+# Default: disabled
+#ClamukoIncludePath /home
+#ClamukoIncludePath /students
+
+# Set the exclude paths. All subdirectories are also excluded. (Dazuko only)
+# Default: disabled
+#ClamukoExcludePath /home/bofh
+
+# With this option you can whitelist specific UIDs. Processes with these UIDs
+# will be able to access all files.
+# This option can be used multiple times (one per line).
+# Default: disabled
+#ClamukoExcludeUID 0
+
+# With this option enabled ClamAV will load bytecode from the database.
+# It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.
+# Default: yes
+#Bytecode yes
+
+# Set bytecode security level.
+# Possible values:
+# None - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS
+# This value is only available if clamav was built with --enable-debug!
+# TrustSigned - trust bytecode loaded from signed .c[lv]d files,
+# insert runtime safety checks for bytecode loaded from other sources
+# Paranoid - don't trust any bytecode, insert runtime checks for all
+# Recommended: TrustSigned, because bytecode in .cvd files already has these checks
+# Note that by default only signed bytecode is loaded, currently you can only
+# load unsigned bytecode in --enable-debug mode.
+#
+# Default: TrustSigned
+#BytecodeSecurity TrustSigned
+
+# Set bytecode timeout in miliseconds.
+#
+# Default: 5000
+# BytecodeTimeout 1000
diff --git a/install/rhel/6/clamav/clamd.service b/install/rhel/6/clamav/clamd.service
new file mode 100644
index 000000000..fdb3af7fd
--- /dev/null
+++ b/install/rhel/6/clamav/clamd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description = clamd scanner (clamd) daemon
+After = syslog.target nss-lookup.target network.target
+
+[Service]
+Type = simple
+ExecStart = /usr/sbin/clamd -c /etc/clamd.conf --nofork=yes
+Restart = on-failure
+PrivateTmp = true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/install/rhel/6/clamav/freshclam.conf b/install/rhel/6/clamav/freshclam.conf
new file mode 100644
index 000000000..61fb36465
--- /dev/null
+++ b/install/rhel/6/clamav/freshclam.conf
@@ -0,0 +1,6 @@
+DatabaseDirectory /var/lib/clamav
+UpdateLogFile /var/log/clamav/freshclam.log
+LogSyslog yes
+DatabaseOwner clam
+DatabaseMirror db.ca.clamav.net
+DatabaseMirror db.local.clamav.net
diff --git a/install/ubuntu/dovecot/conf.d/10-auth.conf b/install/rhel/6/dovecot/conf.d/10-auth.conf
similarity index 100%
rename from install/ubuntu/dovecot/conf.d/10-auth.conf
rename to install/rhel/6/dovecot/conf.d/10-auth.conf
diff --git a/install/ubuntu/dovecot/conf.d/10-logging.conf b/install/rhel/6/dovecot/conf.d/10-logging.conf
similarity index 100%
rename from install/ubuntu/dovecot/conf.d/10-logging.conf
rename to install/rhel/6/dovecot/conf.d/10-logging.conf
diff --git a/install/ubuntu/dovecot/conf.d/10-mail.conf b/install/rhel/6/dovecot/conf.d/10-mail.conf
similarity index 100%
rename from install/ubuntu/dovecot/conf.d/10-mail.conf
rename to install/rhel/6/dovecot/conf.d/10-mail.conf
diff --git a/install/ubuntu/dovecot/conf.d/10-master.conf b/install/rhel/6/dovecot/conf.d/10-master.conf
similarity index 100%
rename from install/ubuntu/dovecot/conf.d/10-master.conf
rename to install/rhel/6/dovecot/conf.d/10-master.conf
diff --git a/install/rhel/6/dovecot/conf.d/10-ssl.conf b/install/rhel/6/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/rhel/6/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = : defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+login:
+ driver = plaintext
+ public_name = LOGIN
+ client_send = ": user@smartrelay.vestacp.com : p4sw0rd"
+ server_set_id = $auth1
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+smarthost:
+ driver = manualroute
+ domains = ! +local_domains
+ transport = remote_smtp_auth
+ route_list = * smartrelay.vestacp.com
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ require_files = /etc/exim/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+remote_smtp_auth:
+ driver = smtp
+ hosts = smartrelay.vestacp.com
+ hosts_require_auth = smartrelay.vestacp.com
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/rhel/6/exim/exim.conf b/install/rhel/6/exim/exim.conf
new file mode 100644
index 000000000..0f9830168
--- /dev/null
+++ b/install/rhel/6/exim/exim.conf
@@ -0,0 +1,376 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim/domains/
+domainlist relay_to_domains = dsearch;/etc/exim/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.sock
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ require_files = /etc/exim/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/rhel/6/exim/spam-blocks.conf b/install/rhel/6/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/rhel/fail2ban.action.conf b/install/rhel/6/fail2ban/fail2ban.action.conf
similarity index 100%
rename from install/rhel/fail2ban.action.conf
rename to install/rhel/6/fail2ban/fail2ban.action.conf
diff --git a/install/ubuntu/fail2ban.filter.conf b/install/rhel/6/fail2ban/fail2ban.filter.conf
similarity index 61%
rename from install/ubuntu/fail2ban.filter.conf
rename to install/rhel/6/fail2ban/fail2ban.filter.conf
index 69670a56e..36ec10019 100644
--- a/install/ubuntu/fail2ban.filter.conf
+++ b/install/rhel/6/fail2ban/fail2ban.filter.conf
@@ -1,4 +1,4 @@
-# Fail2Ban filter for unsuccesfull Vesta authentication attempts
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
#
[INCLUDES]
diff --git a/install/rhel/fail2ban.jail.conf b/install/rhel/6/fail2ban/fail2ban.jail.conf
similarity index 100%
rename from install/rhel/fail2ban.jail.conf
rename to install/rhel/6/fail2ban/fail2ban.jail.conf
diff --git a/install/rhel/6/firewall/ports.conf b/install/rhel/6/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/rhel/6/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/rhel/6/firewall/rules.conf b/install/rhel/6/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/rhel/6/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/rhel/6/httpd/httpd.conf b/install/rhel/6/httpd/httpd.conf
new file mode 100644
index 000000000..e4ca29eb5
--- /dev/null
+++ b/install/rhel/6/httpd/httpd.conf
@@ -0,0 +1,256 @@
+ServerTokens OS
+ServerRoot "/etc/httpd"
+PidFile run/httpd.pid
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MaxClients 200
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadsPerChild 25
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 256
+ MaxRequestsPerChild 4000
+
+
+LoadModule auth_basic_module modules/mod_auth_basic.so
+LoadModule auth_digest_module modules/mod_auth_digest.so
+LoadModule authn_file_module modules/mod_authn_file.so
+LoadModule authn_alias_module modules/mod_authn_alias.so
+LoadModule authn_anon_module modules/mod_authn_anon.so
+#LoadModule authn_dbm_module modules/mod_authn_dbm.so
+LoadModule authn_default_module modules/mod_authn_default.so
+LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule authz_user_module modules/mod_authz_user.so
+LoadModule authz_owner_module modules/mod_authz_owner.so
+LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
+#LoadModule authz_dbm_module modules/mod_authz_dbm.so
+LoadModule authz_default_module modules/mod_authz_default.so
+#LoadModule ldap_module modules/mod_ldap.so
+#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
+LoadModule include_module modules/mod_include.so
+LoadModule log_config_module modules/mod_log_config.so
+LoadModule logio_module modules/mod_logio.so
+LoadModule env_module modules/mod_env.so
+LoadModule ext_filter_module modules/mod_ext_filter.so
+LoadModule mime_magic_module modules/mod_mime_magic.so
+LoadModule expires_module modules/mod_expires.so
+LoadModule deflate_module modules/mod_deflate.so
+LoadModule headers_module modules/mod_headers.so
+LoadModule usertrack_module modules/mod_usertrack.so
+LoadModule setenvif_module modules/mod_setenvif.so
+LoadModule mime_module modules/mod_mime.so
+LoadModule dav_module modules/mod_dav.so
+LoadModule status_module modules/mod_status.so
+LoadModule autoindex_module modules/mod_autoindex.so
+#LoadModule info_module modules/mod_info.so
+#LoadModule dav_fs_module modules/mod_dav_fs.so
+LoadModule vhost_alias_module modules/mod_vhost_alias.so
+LoadModule negotiation_module modules/mod_negotiation.so
+LoadModule dir_module modules/mod_dir.so
+LoadModule actions_module modules/mod_actions.so
+#LoadModule speling_module modules/mod_speling.so
+#LoadModule userdir_module modules/mod_userdir.so
+LoadModule alias_module modules/mod_alias.so
+LoadModule rewrite_module modules/mod_rewrite.so
+LoadModule proxy_module modules/mod_proxy.so
+#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
+#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
+#LoadModule proxy_http_module modules/mod_proxy_http.so
+#LoadModule proxy_connect_module modules/mod_proxy_connect.so
+LoadModule cache_module modules/mod_cache.so
+LoadModule suexec_module modules/mod_suexec.so
+#LoadModule disk_cache_module modules/mod_disk_cache.so
+#LoadModule file_cache_module modules/mod_file_cache.so
+#LoadModule mem_cache_module modules/mod_mem_cache.so
+LoadModule cgi_module modules/mod_cgi.so
+LoadModule version_module modules/mod_version.so
+
+Include conf.d/*.conf
+
+ExtendedStatus On
+
+User apache
+Group apache
+
+ServerAdmin root@localhost
+UseCanonicalName Off
+DocumentRoot "/var/www/html"
+
+ Options SymLinksIfOwnerMatch
+ AllowOverride None
+
+
+
+ Options Indexes SymLinksIfOwnerMatch
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+
+
+ UserDir public_html
+
+
+DirectoryIndex index.php index.htm index.html
+
+AccessFileName .htaccess
+
+ Order allow,deny
+ Deny from all
+
+TypesConfig /etc/mime.types
+
+DefaultType text/plain
+
+
+ MIMEMagicFile conf/magic
+
+
+HostnameLookups Off
+
+ErrorLog logs/error_log
+LogLevel warn
+
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %b" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+CustomLog logs/access_log combined
+
+ServerSignature On
+
+Alias /icons/ "/var/www/icons/"
+
+
+ Options Indexes MultiViews
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+
+
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+
+ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
+
+
+ AllowOverride None
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+
+
+IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
+
+AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
+AddIconByType (TXT,/icons/text.gif) text/*
+AddIconByType (IMG,/icons/image2.gif) image/*
+AddIconByType (SND,/icons/sound2.gif) audio/*
+AddIconByType (VID,/icons/movie.gif) video/*
+AddIcon /icons/binary.gif .bin .exe
+AddIcon /icons/binhex.gif .hqx
+AddIcon /icons/tar.gif .tar
+AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
+AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
+AddIcon /icons/a.gif .ps .ai .eps
+AddIcon /icons/layout.gif .html .shtml .htm .pdf
+AddIcon /icons/text.gif .txt
+AddIcon /icons/c.gif .c
+AddIcon /icons/p.gif .pl .py
+AddIcon /icons/f.gif .for
+AddIcon /icons/dvi.gif .dvi
+AddIcon /icons/uuencoded.gif .uu
+AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
+AddIcon /icons/tex.gif .tex
+AddIcon /icons/bomb.gif core
+AddIcon /icons/back.gif ..
+AddIcon /icons/hand.right.gif README
+AddIcon /icons/folder.gif ^^DIRECTORY^^
+AddIcon /icons/blank.gif ^^BLANKICON^^
+DefaultIcon /icons/unknown.gif
+ReadmeName README.html
+HeaderName HEADER.html
+IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
+AddLanguage ca .ca
+AddLanguage cs .cz .cs
+AddLanguage da .dk
+AddLanguage de .de
+AddLanguage el .el
+AddLanguage en .en
+AddLanguage eo .eo
+AddLanguage es .es
+AddLanguage et .et
+AddLanguage fr .fr
+AddLanguage he .he
+AddLanguage hr .hr
+AddLanguage it .it
+AddLanguage ja .ja
+AddLanguage ko .ko
+AddLanguage ltz .ltz
+AddLanguage nl .nl
+AddLanguage nn .nn
+AddLanguage no .no
+AddLanguage pl .po
+AddLanguage pt .pt
+AddLanguage pt-BR .pt-br
+AddLanguage ru .ru
+AddLanguage sv .sv
+AddLanguage zh-CN .zh-cn
+AddLanguage zh-TW .zh-tw
+LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
+ForceLanguagePriority Prefer Fallback
+
+AddDefaultCharset UTF-8
+
+AddType application/x-compress .Z
+AddType application/x-gzip .gz .tgz
+AddType image/x-icon .ico
+
+AddType text/html .shtml
+AddOutputFilter INCLUDES .shtml
+
+ErrorDocument 403 /error/403.html
+ErrorDocument 404 /error/404.html
+ErrorDocument 500 /error/50x.html
+ErrorDocument 501 /error/50x.html
+ErrorDocument 502 /error/50x.html
+ErrorDocument 503 /error/50x.html
+ErrorDocument 506 /error/50x.html
+
+BrowserMatch "Mozilla/2" nokeepalive
+BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
+BrowserMatch "RealPlayer 4\.0" force-response-1.0
+BrowserMatch "Java/1\.0" force-response-1.0
+BrowserMatch "JDK/1\.0" force-response-1.0
+BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
+BrowserMatch "MS FrontPage" redirect-carefully
+BrowserMatch "^WebDrive" redirect-carefully
+BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
+BrowserMatch "^gnome-vfs/1.0" redirect-carefully
+BrowserMatch "^XML Spy" redirect-carefully
+BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
diff --git a/install/rhel/6/httpd/ruid2.conf b/install/rhel/6/httpd/ruid2.conf
new file mode 100644
index 000000000..42f908a85
--- /dev/null
+++ b/install/rhel/6/httpd/ruid2.conf
@@ -0,0 +1,8 @@
+LoadModule ruid2_module modules/mod_ruid2.so
+
+
+ RMode config
+ RDefaultUidGid apache apache
+ RUidGid apache apache
+ RGroups apache
+
diff --git a/install/rhel/6/httpd/ssl.conf b/install/rhel/6/httpd/ssl.conf
new file mode 100644
index 000000000..6835e420b
--- /dev/null
+++ b/install/rhel/6/httpd/ssl.conf
@@ -0,0 +1,12 @@
+LoadModule ssl_module modules/mod_ssl.so
+
+AddType application/x-x509-ca-cert .crt
+AddType application/x-pkcs7-crl .crl
+
+SSLPassPhraseDialog builtin
+SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
+SSLSessionCacheTimeout 300
+SSLMutex default
+SSLRandomSeed startup file:/dev/urandom 256
+SSLRandomSeed connect builtin
+SSLCryptoDevice builtin
diff --git a/install/rhel/6/httpd/status.conf b/install/rhel/6/httpd/status.conf
new file mode 100644
index 000000000..f68f293dc
--- /dev/null
+++ b/install/rhel/6/httpd/status.conf
@@ -0,0 +1,7 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+
diff --git a/install/rhel/6/logrotate/httpd b/install/rhel/6/logrotate/httpd
new file mode 100644
index 000000000..80dab8e29
--- /dev/null
+++ b/install/rhel/6/logrotate/httpd
@@ -0,0 +1,10 @@
+/var/log/httpd/*log /var/log/httpd/domains/*log {
+ missingok
+ notifempty
+ compress
+ sharedscripts
+ postrotate
+ /sbin/service httpd reload > /dev/null 2>/dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/rhel/6/logrotate/nginx b/install/rhel/6/logrotate/nginx
new file mode 100644
index 000000000..b1da1bf16
--- /dev/null
+++ b/install/rhel/6/logrotate/nginx
@@ -0,0 +1,12 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ create 0644 nginx nginx
+ daily
+ rotate 10
+ missingok
+ notifempty
+ compress
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/rhel/6/logrotate/vesta b/install/rhel/6/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/rhel/6/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/rhel/6/mariadb/my-large.cnf b/install/rhel/6/mariadb/my-large.cnf
new file mode 100644
index 000000000..4e6c2225c
--- /dev/null
+++ b/install/rhel/6/mariadb/my-large.cnf
@@ -0,0 +1,38 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/6/mariadb/my-medium.cnf b/install/rhel/6/mariadb/my-medium.cnf
new file mode 100644
index 000000000..fa255ec52
--- /dev/null
+++ b/install/rhel/6/mariadb/my-medium.cnf
@@ -0,0 +1,37 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/6/mariadb/my-small.cnf b/install/rhel/6/mariadb/my-small.cnf
new file mode 100644
index 000000000..7d2fdc1b3
--- /dev/null
+++ b/install/rhel/6/mariadb/my-small.cnf
@@ -0,0 +1,35 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 32K
+max_allowed_packet = 8M
+table_open_cache = 4
+sort_buffer_size = 128K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=50
+max_user_connections=25
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/6/mysqld/my-large.cnf b/install/rhel/6/mysqld/my-large.cnf
new file mode 100644
index 000000000..b548eeb87
--- /dev/null
+++ b/install/rhel/6/mysqld/my-large.cnf
@@ -0,0 +1,38 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/6/mysqld/my-medium.cnf b/install/rhel/6/mysqld/my-medium.cnf
new file mode 100644
index 000000000..e5f2677fc
--- /dev/null
+++ b/install/rhel/6/mysqld/my-medium.cnf
@@ -0,0 +1,37 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/6/mysqld/my-small.cnf b/install/rhel/6/mysqld/my-small.cnf
new file mode 100644
index 000000000..966c49c3a
--- /dev/null
+++ b/install/rhel/6/mysqld/my-small.cnf
@@ -0,0 +1,35 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=50
+max_user_connections=25
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/6/named/named.conf b/install/rhel/6/named/named.conf
new file mode 100644
index 000000000..472bd829b
--- /dev/null
+++ b/install/rhel/6/named/named.conf
@@ -0,0 +1,13 @@
+options {
+ directory "/var/named";
+ dump-file "/var/named/data/cache_dump.db";
+ pid-file "/var/run/named/named.pid";
+ statistics-file "/var/named/data/named_stats.txt";
+ version "get lost";
+ allow-transfer {"none";};
+ recursion no;
+
+};
+
+include "/etc/rndc.key";
+
diff --git a/install/rhel/6/nginx/nginx.conf b/install/rhel/6/nginx/nginx.conf
new file mode 100644
index 000000000..1b953c01a
--- /dev/null
+++ b/install/rhel/6/nginx/nginx.conf
@@ -0,0 +1,101 @@
+# Server globals
+user nginx;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/rhel/6/nginx/phpmyadmin.inc b/install/rhel/6/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..09da52076
--- /dev/null
+++ b/install/rhel/6/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpMyAdmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpMyAdmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/6/nginx/phppgadmin.inc b/install/rhel/6/nginx/phppgadmin.inc
new file mode 100644
index 000000000..333e560a2
--- /dev/null
+++ b/install/rhel/6/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phpPgAdmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phpPgAdmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/6/nginx/status.conf b/install/rhel/6/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/rhel/6/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/rhel/6/nginx/webmail.inc b/install/rhel/6/nginx/webmail.inc
new file mode 100644
index 000000000..2d0fbe293
--- /dev/null
+++ b/install/rhel/6/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /usr/share/roundcubemail/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /usr/share/roundcubemail/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/6/packages/default.pkg b/install/rhel/6/packages/default.pkg
new file mode 100644
index 000000000..3df21d3df
--- /dev/null
+++ b/install/rhel/6/packages/default.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2015-06-05'
diff --git a/install/rhel/6/packages/gainsboro.pkg b/install/rhel/6/packages/gainsboro.pkg
new file mode 100644
index 000000000..2b66b7d17
--- /dev/null
+++ b/install/rhel/6/packages/gainsboro.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2015-06-05'
diff --git a/install/rhel/6/packages/palegreen.pkg b/install/rhel/6/packages/palegreen.pkg
new file mode 100644
index 000000000..b17e5e1b2
--- /dev/null
+++ b/install/rhel/6/packages/palegreen.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='hosting'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2015-06-05'
diff --git a/install/rhel/6/packages/slategrey.pkg b/install/rhel/6/packages/slategrey.pkg
new file mode 100644
index 000000000..cc9ef423c
--- /dev/null
+++ b/install/rhel/6/packages/slategrey.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2015-06-05'
diff --git a/install/rhel/6/pga/config.inc.php b/install/rhel/6/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/rhel/6/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/rhel/6/pga/phpPgAdmin.conf b/install/rhel/6/pga/phpPgAdmin.conf
new file mode 100644
index 000000000..4f6ea1b53
--- /dev/null
+++ b/install/rhel/6/pga/phpPgAdmin.conf
@@ -0,0 +1,14 @@
+#
+# This configuration file maps the phpPgAdmin directory into the URL space.
+# By default this application is only accessible from the local host.
+#
+
+Alias /phpPgAdmin /usr/share/phpPgAdmin
+Alias /phppgadmin /usr/share/phpPgAdmin
+
+
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/rhel/6/php-fpm/www.conf b/install/rhel/6/php-fpm/www.conf
new file mode 100644
index 000000000..260109d8f
--- /dev/null
+++ b/install/rhel/6/php-fpm/www.conf
@@ -0,0 +1,10 @@
+[www]
+listen = 127.0.0.1:9000
+listen.allowed_clients = 127.0.0.1
+user = apache
+group = apache
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 5
+pm.min_spare_servers = 3
+pm.max_spare_servers = 35
diff --git a/install/rhel/6/pma/config.inc.conf b/install/rhel/6/pma/config.inc.conf
new file mode 100644
index 000000000..47ae207e4
--- /dev/null
+++ b/install/rhel/6/pma/config.inc.conf
@@ -0,0 +1,143 @@
+.
+ *
+ * @package phpMyAdmin
+ */
+
+/*
+ * This is needed for cookie based authentication to encrypt password in
+ * cookie
+ */
+$cfg['blowfish_secret'] = '%blowfish_secret%'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+
+/*
+ * Servers configuration
+ */
+$i = 0;
+
+/*
+ * First server
+ */
+$i++;
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'localhost';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/*
+ * phpMyAdmin configuration storage settings.
+ */
+
+/* User used to manipulate with storage */
+// $cfg['Servers'][$i]['controluser'] = 'pma';
+// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
+
+/* Storage database and tables */
+// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
+// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
+// $cfg['Servers'][$i]['relation'] = 'pma_relation';
+// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
+// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
+// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
+// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
+// $cfg['Servers'][$i]['history'] = 'pma_history';
+// $cfg['Servers'][$i]['tracking'] = 'pma_tracking';
+// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
+// $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
+/* Contrib / Swekey authentication */
+// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
+
+/*
+ * End of servers configuration
+ */
+
+/*
+ * Directories for saving/loading files from server
+ */
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+/**
+ * Defines whether a user should be displayed a "show all (records)"
+ * button in browse mode or not.
+ * default = false
+ */
+//$cfg['ShowAll'] = true;
+
+/**
+ * Number of rows displayed when browsing a result set. If the result
+ * set contains more rows, "Previous" and "Next".
+ * default = 30
+ */
+//$cfg['MaxRows'] = 50;
+
+/**
+ * Use graphically less intense menu tabs
+ * default = false
+ */
+//$cfg['LightTabs'] = true;
+
+/**
+ * disallow editing of binary fields
+ * valid values are:
+ * false allow editing
+ * 'blob' allow editing except for BLOB fields
+ * 'all' disallow editing
+ * default = blob
+ */
+//$cfg['ProtectBinary'] = 'false';
+
+/**
+ * Default language to use, if not browser-defined or user-defined
+ * (you find all languages in the locale folder)
+ * uncomment the desired line:
+ * default = 'en'
+ */
+//$cfg['DefaultLang'] = 'en';
+//$cfg['DefaultLang'] = 'de';
+
+/**
+ * default display direction (horizontal|vertical|horizontalflipped)
+ */
+//$cfg['DefaultDisplay'] = 'vertical';
+
+
+/**
+ * How many columns should be used for table display of a database?
+ * (a value larger than 1 results in some information being hidden)
+ * default = 1
+ */
+//$cfg['PropertiesNumColumns'] = 2;
+
+/**
+ * Set to true if you want DB-based query history.If false, this utilizes
+ * JS-routines to display query history (lost by window close)
+ *
+ * This requires configuration storage enabled, see above.
+ * default = false
+ */
+//$cfg['QueryHistoryDB'] = true;
+
+/**
+ * When using DB-based query history, how many entries should be kept?
+ *
+ * default = 25
+ */
+//$cfg['QueryHistoryMax'] = 100;
+
+/*
+ * You can find more configuration options in Documentation.html
+ * or here: http://wiki.phpmyadmin.net/pma/Config
+ */
+?>
diff --git a/install/rhel/6/pma/phpMyAdmin.conf b/install/rhel/6/pma/phpMyAdmin.conf
new file mode 100644
index 000000000..0049ef2b7
--- /dev/null
+++ b/install/rhel/6/pma/phpMyAdmin.conf
@@ -0,0 +1,39 @@
+# phpMyAdmin - Web based MySQL browser written in php
+#
+# Allows only localhost by default
+#
+# But allowing phpMyAdmin to anyone other than localhost should be considered
+# dangerous unless properly secured by SSL
+
+Alias /phpMyAdmin /usr/share/phpMyAdmin
+Alias /phpmyadmin /usr/share/phpMyAdmin
+
+
+ Order Deny,Allow
+ Deny from All
+ Allow from All
+
+
+
+ Order Deny,Allow
+ Deny from All
+ Allow from All
+
+
+# This directory does not require access over HTTP - taken from the original
+# phpMyAdmin upstream tarball
+#
+
+ Order Deny,Allow
+ Deny from All
+ Allow from None
+
+
+# This configuration prevents mod_security at phpMyAdmin directories from
+# filtering SQL etc. This may break your mod_security implementation.
+#
+#
+#
+# SecRuleInheritance Off
+#
+#
diff --git a/install/ubuntu/pg_hba.conf b/install/rhel/6/postgresql/pg_hba.conf
similarity index 100%
rename from install/ubuntu/pg_hba.conf
rename to install/rhel/6/postgresql/pg_hba.conf
diff --git a/install/debian/proftpd.conf b/install/rhel/6/proftpd/proftpd.conf
similarity index 84%
rename from install/debian/proftpd.conf
rename to install/rhel/6/proftpd/proftpd.conf
index e948e92a8..6b89d125e 100644
--- a/install/debian/proftpd.conf
+++ b/install/rhel/6/proftpd/proftpd.conf
@@ -1,15 +1,14 @@
-LoadModule mod_vroot.c
ServerName "FTP"
ServerIdent on "FTP Server ready."
ServerAdmin root@localhost
DefaultServer on
-VRootEngine off
+VRootEngine on
DefaultRoot ~ !adm
AuthPAMConfig proftpd
AuthOrder mod_auth_pam.c* mod_auth_unix.c
UseReverseDNS off
-User proftpd
-Group nogroup
+User nobody
+Group nobody
MaxInstances 20
UseSendfile off
LogFormat default "%h %l %u %t \"%r\" %s %b"
diff --git a/install/rhel/6/remi-release.rpm b/install/rhel/6/remi-release.rpm
new file mode 100644
index 000000000..555c7abeb
Binary files /dev/null and b/install/rhel/6/remi-release.rpm differ
diff --git a/install/rhel/6/roundcube/config.inc.php b/install/rhel/6/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/rhel/6/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/rhel/6/roundcube/main.inc.php b/install/rhel/6/roundcube/main.inc.php
new file mode 100644
index 000000000..a27c306eb
--- /dev/null
+++ b/install/rhel/6/roundcube/main.inc.php
@@ -0,0 +1,40 @@
+
+ Order Deny,Allow
+ Deny from all
+ Allow from all
+
diff --git a/install/rhel/6/roundcube/vesta.php b/install/rhel/6/roundcube/vesta.php
new file mode 100644
index 000000000..b8695bd17
--- /dev/null
+++ b/install/rhel/6/roundcube/vesta.php
@@ -0,0 +1,59 @@
+
+ */
+
+class rcube_vesta_password
+{
+ function save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
+}
diff --git a/install/rhel/6/sudo/admin b/install/rhel/6/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/rhel/6/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/rhel/6/templates/dns/child-ns.tpl b/install/rhel/6/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/rhel/6/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/templates/dns/default.tpl b/install/rhel/6/templates/dns/default.tpl
similarity index 100%
rename from install/ubuntu/templates/dns/default.tpl
rename to install/rhel/6/templates/dns/default.tpl
diff --git a/install/rhel/6/templates/dns/gmail.tpl b/install/rhel/6/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/rhel/6/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/rhel/6/templates/web/awstats/awstats.tpl b/install/rhel/6/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/rhel/6/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/rhel/6/templates/web/awstats/index.tpl b/install/rhel/6/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/rhel/6/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/rhel/6/templates/web/awstats/nav.tpl b/install/rhel/6/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/rhel/6/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/basedir.stpl b/install/rhel/6/templates/web/httpd/basedir.stpl
new file mode 100755
index 000000000..d568276df
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/basedir.tpl b/install/rhel/6/templates/web/httpd/basedir.tpl
new file mode 100755
index 000000000..41b77334a
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/default.stpl b/install/rhel/6/templates/web/httpd/default.stpl
new file mode 100755
index 000000000..ffb536c54
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/default.tpl b/install/rhel/6/templates/web/httpd/default.tpl
new file mode 100755
index 000000000..29de125f9
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/hosting.stpl b/install/rhel/6/templates/web/httpd/hosting.stpl
new file mode 100755
index 000000000..ee06dfce7
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/hosting.tpl b/install/rhel/6/templates/web/httpd/hosting.tpl
new file mode 100755
index 000000000..c3b839972
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/phpcgi.sh b/install/rhel/6/templates/web/httpd/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/rhel/6/templates/web/httpd/phpcgi.stpl b/install/rhel/6/templates/web/httpd/phpcgi.stpl
new file mode 100755
index 000000000..b3e6488a6
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ Include %home%/%user%/conf/web/shttpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/phpcgi.tpl b/install/rhel/6/templates/web/httpd/phpcgi.tpl
new file mode 100755
index 000000000..952d2b493
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ Include %home%/%user%/conf/web/httpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/phpfcgid.sh b/install/rhel/6/templates/web/httpd/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/rhel/6/templates/web/httpd/phpfcgid.stpl b/install/rhel/6/templates/web/httpd/phpfcgid.stpl
new file mode 100755
index 000000000..352d268b6
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ Include %home%/%user%/conf/web/shttpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/httpd/phpfcgid.tpl b/install/rhel/6/templates/web/httpd/phpfcgid.tpl
new file mode 100755
index 000000000..9826c9464
--- /dev/null
+++ b/install/rhel/6/templates/web/httpd/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ Include %home%/%user%/conf/web/httpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/templates/web/nginx/caching.sh b/install/rhel/6/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/rhel/6/templates/web/nginx/caching.stpl b/install/rhel/6/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..1109c924f
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache %domain%;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/caching.tpl b/install/rhel/6/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..6d727c67f
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache %domain%;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/default.stpl b/install/rhel/6/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..53ad8d1b8
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/6/templates/web/nginx/default.tpl b/install/rhel/6/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..c1fec114f
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/6/templates/web/nginx/hosting.sh b/install/rhel/6/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/rhel/6/templates/web/nginx/hosting.stpl b/install/rhel/6/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..aca458a4b
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/6/templates/web/nginx/hosting.tpl b/install/rhel/6/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..44d874962
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/cms_made_simple.stpl b/install/rhel/6/templates/web/nginx/php-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/cms_made_simple.tpl b/install/rhel/6/templates/web/nginx/php-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/codeigniter2.stpl b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/codeigniter2.tpl b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/codeigniter3.stpl b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/codeigniter3.tpl b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/datalife_engine.stpl b/install/rhel/6/templates/web/nginx/php-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/datalife_engine.tpl b/install/rhel/6/templates/web/nginx/php-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/default.stpl b/install/rhel/6/templates/web/nginx/php-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/default.tpl b/install/rhel/6/templates/web/nginx/php-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/joomla.stpl b/install/rhel/6/templates/web/nginx/php-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/joomla.tpl b/install/rhel/6/templates/web/nginx/php-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/piwik.stpl b/install/rhel/6/templates/web/nginx/php-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/piwik.tpl b/install/rhel/6/templates/web/nginx/php-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/wordpress.stpl b/install/rhel/6/templates/web/nginx/php-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/wordpress.tpl b/install/rhel/6/templates/web/nginx/php-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/wordpress2.stpl b/install/rhel/6/templates/web/nginx/php-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/wordpress2.tpl b/install/rhel/6/templates/web/nginx/php-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/php-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/6/templates/web/nginx/proxy_ip.tpl b/install/rhel/6/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/rhel/6/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/rhel/6/templates/web/php-fpm/default.tpl b/install/rhel/6/templates/web/php-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/rhel/6/templates/web/php-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/rhel/6/templates/web/php-fpm/no-php.tpl b/install/rhel/6/templates/web/php-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/rhel/6/templates/web/php-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/rhel/6/templates/web/php-fpm/socket.tpl b/install/rhel/6/templates/web/php-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/rhel/6/templates/web/php-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/rhel/templates/web/skel/document_errors/403.html b/install/rhel/6/templates/web/skel/document_errors/403.html
similarity index 100%
rename from install/rhel/templates/web/skel/document_errors/403.html
rename to install/rhel/6/templates/web/skel/document_errors/403.html
diff --git a/install/rhel/templates/web/skel/document_errors/404.html b/install/rhel/6/templates/web/skel/document_errors/404.html
similarity index 100%
rename from install/rhel/templates/web/skel/document_errors/404.html
rename to install/rhel/6/templates/web/skel/document_errors/404.html
diff --git a/install/rhel/templates/web/skel/document_errors/50x.html b/install/rhel/6/templates/web/skel/document_errors/50x.html
similarity index 100%
rename from install/rhel/templates/web/skel/document_errors/50x.html
rename to install/rhel/6/templates/web/skel/document_errors/50x.html
diff --git a/install/rhel/6/templates/web/skel/public_html/index.html b/install/rhel/6/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/rhel/6/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/rhel/6/templates/web/skel/public_html/robots.txt b/install/rhel/6/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/rhel/6/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/rhel/6/templates/web/skel/public_shtml/index.html b/install/rhel/6/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/rhel/6/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/rhel/6/templates/web/skel/public_shtml/robots.txt b/install/rhel/6/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/rhel/6/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/rhel/6/templates/web/suspend/.htaccess b/install/rhel/6/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/rhel/6/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/rhel/6/templates/web/suspend/index.html b/install/rhel/6/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/rhel/6/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/rhel/6/templates/web/webalizer/webalizer.tpl b/install/rhel/6/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/rhel/6/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/rhel/6/vsftpd/vsftpd.conf b/install/rhel/6/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..7a986aff0
--- /dev/null
+++ b/install/rhel/6/vsftpd/vsftpd.conf
@@ -0,0 +1,21 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+dual_log_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=YES
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/rhel/6/wsgi/httpd/wsgi.sh b/install/rhel/6/wsgi/httpd/wsgi.sh
new file mode 100755
index 000000000..cb98116cb
--- /dev/null
+++ b/install/rhel/6/wsgi/httpd/wsgi.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+echo "# Wsgi template
+AddHandler wsgi-script .wsgi
+
+RewriteEngine On
+
+RewriteCond %{HTTP_HOST} ^www.$2\.ru\$ [NC]
+RewriteRule ^(.*)\$ http://$2/\$1 [R=301,L]
+
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)\$ /django.wsgi/\$1 [QSA,PT,L]
+" > $docroot/.htaccess
+chown $user:$user $docroot/.htaccess
+
+
+echo "import os, sys
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/env/lib/python2.6/site-packages')
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/project/src/shared/')
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/project/src/')
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'main.settings'
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()" > $docroot/django.wsgi
+chown $user:$user $docroot/django.wsgi
+
+exit 0
diff --git a/install/rhel/6/wsgi/httpd/wsgi.stpl b/install/rhel/6/wsgi/httpd/wsgi.stpl
new file mode 100755
index 000000000..e2fdd3f40
--- /dev/null
+++ b/install/rhel/6/wsgi/httpd/wsgi.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ WSGIDaemonProcess apx-idea user=%user% group=%user% processes=1 threads=5 display-name=%{GROUP} python-path=%home%/%user%/web/%domain%/private/django/%domain%/env/lib/python2.6/site-packages
+ WSGIProcessGroup apx-idea
+ WSGIApplicationGroup %{GLOBAL}
+
+
+
+ AllowOverride FileInfo
+ Options ExecCGI Indexes
+ MultiviewsMatch Handlers
+ Options +FollowSymLinks
+ Order allow,deny
+ Allow from all
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/6/wsgi/httpd/wsgi.tpl b/install/rhel/6/wsgi/httpd/wsgi.tpl
new file mode 100644
index 000000000..ad5d8a076
--- /dev/null
+++ b/install/rhel/6/wsgi/httpd/wsgi.tpl
@@ -0,0 +1,44 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ WSGIDaemonProcess apx-idea user=%user% group=%user% processes=1 threads=5 display-name=%{GROUP} python-path=%home%/%user%/web/%domain%/private/django/%domain%/env/lib/python2.6/site-packages
+ WSGIProcessGroup apx-idea
+ WSGIApplicationGroup %{GLOBAL}
+
+
+
+ AllowOverride FileInfo
+ Options ExecCGI Indexes
+ MultiviewsMatch Handlers
+ Options +FollowSymLinks
+ Order allow,deny
+ Allow from all
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/GPG.txt b/install/rhel/7/GPG.txt
new file mode 100644
index 000000000..33bb1ff26
--- /dev/null
+++ b/install/rhel/7/GPG.txt
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQGiBExUOVkRBACPJeB3bdrAggHlFpkaB1aRDXDz7clRg6jyEzdMYHhrniSyjhAH
++b53zE4iapCHFIamEG2Fa7zS2lSx7068AmqHsZK5jwmyhTVVYuTtbebj1C4Y5ToW
+icHhy4ullB7qeDmAod6EY4YSx2kYO3dR/QLk5QM4lWuV/OLdXWTeoKiiYwCg0UAP
+yUkBXgNcKXrFqoJelmG3JEMEAIYM7CGwVd47FsM1UCu56HNQPErxLoUPBUlAQFtx
+OMOFDMEm7qH7ve8FgGGRL9oHF7mSJ3y7HgM1BF5MHkKz6FjDrT1U5+Lub6oI2e90
+gfCMGlQAzUm9o+fijfbhKoEQ/xQRkUoqWEaf9zlFx1/4+NH+Qz/L8ZDTHvSLvUgt
+HyZlA/916St5suAUugXu9PeLRVqboiHjhz0JWKneQEQ2QcTu8lhHsu/mZTWL9FYn
+XwtiCJLZT8bpBSfl8Oeqhof1+sPgnv7t/LuKQ6JJmyJ46Sa453wfrs+xs32hKAe+
+ZN0VGBmHe7NhuhW/LdM0KMMr/LHuJJJAgmt+XVHi2RFwsZvdMbQkVmVzdGEgUGFj
+a2FnZXMgPGJ1aWxkZXJAdmVzdGFjcC5jb20+iGAEExECACAFAkxUOVkCGwMGCwkI
+BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRBbjeFzoXeCtp6dAKDQfeTPHi6hCgg4L+sx
+LEjXvVdLOwCfe9yfr+en+uz6qst0QBT2cAwB+q+5Ag0ETFQ5bBAIAJYZa9pV9l/R
+OUFgIvdJd1mvzJpRAXsRBBJc22WuOHp22Uj+lMKrJMTRQZvFBvk9s7Mb1/ACXrL4
+vIbsKqXNAlVFp9kF1tKV2ejZ1MrJaQ4819bIkyG0lJzjl6u9lzJopF7ie00YHKC6
+1rltLaevfFjUXq1DoYZBg42hT/SOj+3+2D0e9qcxeuxXbsjnvwtxxUkWcP/ftOSt
+HsAAbM1YtwGl9+fZLWG9+WIKNOE9kp+h2ywZtFA4v/Ms2op7oZGAL7C95k1EgLrH
+mOZ0B2oKOLctV1z9keWksPN/osyG7Mg8ljv8zF3XwQFqHOHRntDqSWoFBMvJBkNS
+vtm6u5WyKd8ABAsH/0RbeWVA+JqpZ24Rl57XoDRPRzno0m0EnkJMXr22uBq1lPg8
+VkadrGOshFXpM3Rho57f3U7fwKmShQXGEV7RHsWcxcfwOSKVJtI468sDuYXc2l1f
+5nFo+rCtVh3BBq+JtZFKX0x53BesCT/M7l33Dfm9MDi34tEdPTPjumBIH1dowYdv
+9/2HPlPp4NZte7gOO/VIAiS+jJ30aBn09t8duW5md7/rkOPIM5It05LGCLjb9hVm
+R9zTwzw30fIrkeyWZdAbk76lH8u8j6PX30U6RRzb33+XIFR4ab3nlyqOQOpoTqyG
+cs7B02sgBbyC+RG1EYfcelSEvLXkR8mjcqjs+MCISQQYEQIACQUCTFQ5bAIbDAAK
+CRBbjeFzoXeCtlpcAKDLh59svtq/Gn99O9ZZw0nBjWv6sACfffDxPhCP1F852Jab
+d8P1WGhr2Q8=
+=Z1Jj
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/rhel/7/clamav/clamd.conf b/install/rhel/7/clamav/clamd.conf
new file mode 100644
index 000000000..c215bcb98
--- /dev/null
+++ b/install/rhel/7/clamav/clamd.conf
@@ -0,0 +1,502 @@
+##
+## Example config file for the Clam AV daemon
+## Please read the clamd.conf(5) manual before editing this file.
+##
+
+
+# Comment or remove the line below.
+#Example
+
+# Uncomment this option to enable logging.
+# LogFile must be writable for the user running daemon.
+# A full path is required.
+# Default: disabled
+LogFile /var/log/clamav/clamd.log
+
+# By default the log file is locked for writing - the lock protects against
+# running clamd multiple times (if want to run another clamd, please
+# copy the configuration file, change the LogFile variable, and run
+# the daemon with --config-file option).
+# This option disables log file locking.
+# Default: no
+#LogFileUnlock yes
+
+# Maximum size of the log file.
+# Value of 0 disables the limit.
+# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
+# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
+# in bytes just don't use modifiers.
+# Default: 1M
+LogFileMaxSize 0
+
+# Log time with each message.
+# Default: no
+LogTime yes
+
+# Also log clean files. Useful in debugging but drastically increases the
+# log size.
+# Default: no
+#LogClean yes
+
+# Use system logger (can work together with LogFile).
+# Default: no
+LogSyslog yes
+
+# Specify the type of syslog messages - please refer to 'man syslog'
+# for facility names.
+# Default: LOG_LOCAL6
+#LogFacility LOG_MAIL
+
+# Enable verbose logging.
+# Default: no
+#LogVerbose yes
+
+# Log additional information about the infected file, such as its
+# size and hash, together with the virus name.
+#ExtendedDetectionInfo yes
+
+# This option allows you to save a process identifier of the listening
+# daemon (main thread).
+# Default: disabled
+PidFile /var/run/clamav/clamd.pid
+
+# Optional path to the global temporary directory.
+# Default: system specific (usually /tmp or /var/tmp).
+TemporaryDirectory /var/tmp
+
+# Path to the database directory.
+# Default: hardcoded (depends on installation options)
+DatabaseDirectory /var/lib/clamav
+
+# Only load the official signatures published by the ClamAV project.
+# Default: no
+#OfficialDatabaseOnly no
+
+# The daemon can work in local mode, network mode or both.
+# Due to security reasons we recommend the local mode.
+
+# Path to a local socket file the daemon will listen on.
+# Default: disabled (must be specified by a user)
+LocalSocket /var/run/clamav/clamd.sock
+
+# Sets the group ownership on the unix socket.
+# Default: disabled (the primary group of the user running clamd)
+#LocalSocketGroup virusgroup
+
+# Sets the permissions on the unix socket to the specified mode.
+# Default: disabled (socket is world accessible)
+#LocalSocketMode 660
+
+# Remove stale socket after unclean shutdown.
+# Default: yes
+FixStaleSocket yes
+
+# TCP port address.
+# Default: no
+TCPSocket 3310
+
+# TCP address.
+# By default we bind to INADDR_ANY, probably not wise.
+# Enable the following to provide some degree of protection
+# from the outside world.
+# Default: no
+TCPAddr 127.0.0.1
+
+# Maximum length the queue of pending connections may grow to.
+# Default: 200
+MaxConnectionQueueLength 30
+
+# Clamd uses FTP-like protocol to receive data from remote clients.
+# If you are using clamav-milter to balance load between remote clamd daemons
+# on firewall servers you may need to tune the options below.
+
+# Close the connection when the data size limit is exceeded.
+# The value should match your MTA's limit for a maximum attachment size.
+# Default: 25M
+#StreamMaxLength 10M
+
+# Limit port range.
+# Default: 1024
+#StreamMinPort 30000
+# Default: 2048
+#StreamMaxPort 32000
+
+# Maximum number of threads running at the same time.
+# Default: 10
+MaxThreads 50
+
+# Waiting for data from a client socket will timeout after this time (seconds).
+# Default: 120
+ReadTimeout 300
+
+# This option specifies the time (in seconds) after which clamd should
+# timeout if a client doesn't provide any initial command after connecting.
+# Default: 5
+#CommandReadTimeout 5
+
+# This option specifies how long to wait (in miliseconds) if the send buffer is full.
+# Keep this value low to prevent clamd hanging
+#
+# Default: 500
+#SendBufTimeout 200
+
+# Maximum number of queued items (including those being processed by MaxThreads threads)
+# It is recommended to have this value at least twice MaxThreads if possible.
+# WARNING: you shouldn't increase this too much to avoid running out of file descriptors,
+# the following condition should hold:
+# MaxThreads*MaxRecursion + (MaxQueue - MaxThreads) + 6< RLIMIT_NOFILE (usual max is 1024)
+#
+# Default: 100
+#MaxQueue 200
+
+# Waiting for a new job will timeout after this time (seconds).
+# Default: 30
+#IdleTimeout 60
+
+# Don't scan files and directories matching regex
+# This directive can be used multiple times
+# Default: scan all
+#ExcludePath ^/proc/
+#ExcludePath ^/sys/
+
+# Maximum depth directories are scanned at.
+# Default: 15
+#MaxDirectoryRecursion 20
+
+# Follow directory symlinks.
+# Default: no
+#FollowDirectorySymlinks yes
+
+# Follow regular file symlinks.
+# Default: no
+#FollowFileSymlinks yes
+
+# Scan files and directories on other filesystems.
+# Default: yes
+#CrossFilesystems yes
+
+# Perform a database check.
+# Default: 600 (10 min)
+#SelfCheck 600
+
+# Execute a command when virus is found. In the command string %v will
+# be replaced with the virus name.
+# Default: no
+#VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"
+
+# Run as another user (clamd must be started by root for this option to work)
+# Default: don't drop privileges
+User clam
+
+# Initialize supplementary group access (clamd must be started by root).
+# Default: no
+AllowSupplementaryGroups yes
+
+# Stop daemon when libclamav reports out of memory condition.
+#ExitOnOOM yes
+
+# Don't fork into background.
+# Default: no
+#Foreground yes
+
+# Enable debug messages in libclamav.
+# Default: no
+#Debug yes
+
+# Do not remove temporary files (for debug purposes).
+# Default: no
+#LeaveTemporaryFiles yes
+
+# Detect Possibly Unwanted Applications.
+# Default: no
+#DetectPUA yes
+
+# Exclude a specific PUA category. This directive can be used multiple times.
+# See http://www.clamav.net/support/pua for the complete list of PUA
+# categories.
+# Default: Load all categories (if DetectPUA is activated)
+#ExcludePUA NetTool
+#ExcludePUA PWTool
+
+# Only include a specific PUA category. This directive can be used multiple
+# times.
+# Default: Load all categories (if DetectPUA is activated)
+#IncludePUA Spy
+#IncludePUA Scanner
+#IncludePUA RAT
+
+# In some cases (eg. complex malware, exploits in graphic files, and others),
+# ClamAV uses special algorithms to provide accurate detection. This option
+# controls the algorithmic detection.
+# Default: yes
+#AlgorithmicDetection yes
+
+
+##
+## Executable files
+##
+
+# PE stands for Portable Executable - it's an executable file format used
+# in all 32 and 64-bit versions of Windows operating systems. This option allows
+# ClamAV to perform a deeper analysis of executable files and it's also
+# required for decompression of popular executable packers such as UPX, FSG,
+# and Petite. If you turn off this option, the original files will still be
+# scanned, but without additional processing.
+# Default: yes
+ScanPE yes
+
+# Executable and Linking Format is a standard format for UN*X executables.
+# This option allows you to control the scanning of ELF files.
+# If you turn off this option, the original files will still be scanned, but
+# without additional processing.
+# Default: yes
+ScanELF yes
+
+# With this option clamav will try to detect broken executables (both PE and
+# ELF) and mark them as Broken.Executable.
+# Default: no
+DetectBrokenExecutables yes
+
+
+##
+## Documents
+##
+
+# This option enables scanning of OLE2 files, such as Microsoft Office
+# documents and .msi files.
+# If you turn off this option, the original files will still be scanned, but
+# without additional processing.
+# Default: yes
+ScanOLE2 yes
+
+
+# With this option enabled OLE2 files with VBA macros, which were not
+# detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
+# Default: no
+#OLE2BlockMacros no
+
+# This option enables scanning within PDF files.
+# If you turn off this option, the original files will still be scanned, but
+# without decoding and additional processing.
+# Default: yes
+#ScanPDF yes
+
+
+##
+## Mail files
+##
+
+# Enable internal e-mail scanner.
+# If you turn off this option, the original files will still be scanned, but
+# without parsing individual messages/attachments.
+# Default: yes
+ScanMail yes
+
+# Scan RFC1341 messages split over many emails.
+# You will need to periodically clean up $TemporaryDirectory/clamav-partial directory.
+# WARNING: This option may open your system to a DoS attack.
+# Never use it on loaded servers.
+# Default: no
+#ScanPartialMessages yes
+
+
+# With this option enabled ClamAV will try to detect phishing attempts by using
+# signatures.
+# Default: yes
+#PhishingSignatures yes
+
+# Scan URLs found in mails for phishing attempts using heuristics.
+# Default: yes
+#PhishingScanURLs yes
+
+# Always block SSL mismatches in URLs, even if the URL isn't in the database.
+# This can lead to false positives.
+#
+# Default: no
+#PhishingAlwaysBlockSSLMismatch no
+
+# Always block cloaked URLs, even if URL isn't in database.
+# This can lead to false positives.
+#
+# Default: no
+#PhishingAlwaysBlockCloak no
+
+# Allow heuristic match to take precedence.
+# When enabled, if a heuristic scan (such as phishingScan) detects
+# a possible virus/phish it will stop scan immediately. Recommended, saves CPU
+# scan-time.
+# When disabled, virus/phish detected by heuristic scans will be reported only at
+# the end of a scan. If an archive contains both a heuristically detected
+# virus/phish, and a real malware, the real malware will be reported
+#
+# Keep this disabled if you intend to handle "*.Heuristics.*" viruses
+# differently from "real" malware.
+# If a non-heuristically-detected virus (signature-based) is found first,
+# the scan is interrupted immediately, regardless of this config option.
+#
+# Default: no
+#HeuristicScanPrecedence yes
+
+##
+## Data Loss Prevention (DLP)
+##
+
+# Enable the DLP module
+# Default: No
+#StructuredDataDetection yes
+
+# This option sets the lowest number of Credit Card numbers found in a file
+# to generate a detect.
+# Default: 3
+#StructuredMinCreditCardCount 5
+
+# This option sets the lowest number of Social Security Numbers found
+# in a file to generate a detect.
+# Default: 3
+#StructuredMinSSNCount 5
+
+# With this option enabled the DLP module will search for valid
+# SSNs formatted as xxx-yy-zzzz
+# Default: yes
+#StructuredSSNFormatNormal yes
+
+# With this option enabled the DLP module will search for valid
+# SSNs formatted as xxxyyzzzz
+# Default: no
+#StructuredSSNFormatStripped yes
+
+
+##
+## HTML
+##
+
+# Perform HTML normalisation and decryption of MS Script Encoder code.
+# Default: yes
+# If you turn off this option, the original files will still be scanned, but
+# without additional processing.
+#ScanHTML yes
+
+
+##
+## Archives
+##
+
+# ClamAV can scan within archives and compressed files.
+# If you turn off this option, the original files will still be scanned, but
+# without unpacking and additional processing.
+# Default: yes
+ScanArchive yes
+
+# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
+# Default: no
+ArchiveBlockEncrypted no
+
+
+##
+## Limits
+##
+
+# The options below protect your system against Denial of Service attacks
+# using archive bombs.
+
+# This option sets the maximum amount of data to be scanned for each input file.
+# Archives and other containers are recursively extracted and scanned up to this
+# value.
+# Value of 0 disables the limit
+# Note: disabling this limit or setting it too high may result in severe damage
+# to the system.
+# Default: 100M
+#MaxScanSize 150M
+
+# Files larger than this limit won't be scanned. Affects the input file itself
+# as well as files contained inside it (when the input file is an archive, a
+# document or some other kind of container).
+# Value of 0 disables the limit.
+# Note: disabling this limit or setting it too high may result in severe damage
+# to the system.
+# Default: 25M
+#MaxFileSize 30M
+
+# Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
+# file, all files within it will also be scanned. This options specifies how
+# deeply the process should be continued.
+# Note: setting this limit too high may result in severe damage to the system.
+# Default: 16
+#MaxRecursion 10
+
+# Number of files to be scanned within an archive, a document, or any other
+# container file.
+# Value of 0 disables the limit.
+# Note: disabling this limit or setting it too high may result in severe damage
+# to the system.
+# Default: 10000
+#MaxFiles 15000
+
+
+##
+## Clamuko settings
+##
+
+# Enable Clamuko. Dazuko must be configured and running. Clamuko supports
+# both Dazuko (/dev/dazuko) and DazukoFS (/dev/dazukofs.ctrl). DazukoFS
+# is the preferred option. For more information please visit www.dazuko.org
+# Default: no
+#ClamukoScanOnAccess yes
+
+# The number of scanner threads that will be started (DazukoFS only).
+# Having multiple scanner threads allows Clamuko to serve multiple
+# processes simultaneously. This is particularly beneficial on SMP machines.
+# Default: 3
+#ClamukoScannerCount 3
+
+# Don't scan files larger than ClamukoMaxFileSize
+# Value of 0 disables the limit.
+# Default: 5M
+#ClamukoMaxFileSize 10M
+
+# Set access mask for Clamuko (Dazuko only).
+# Default: no
+#ClamukoScanOnOpen yes
+#ClamukoScanOnClose yes
+#ClamukoScanOnExec yes
+
+# Set the include paths (all files inside them will be scanned). You can have
+# multiple ClamukoIncludePath directives but each directory must be added
+# in a seperate line. (Dazuko only)
+# Default: disabled
+#ClamukoIncludePath /home
+#ClamukoIncludePath /students
+
+# Set the exclude paths. All subdirectories are also excluded. (Dazuko only)
+# Default: disabled
+#ClamukoExcludePath /home/bofh
+
+# With this option you can whitelist specific UIDs. Processes with these UIDs
+# will be able to access all files.
+# This option can be used multiple times (one per line).
+# Default: disabled
+#ClamukoExcludeUID 0
+
+# With this option enabled ClamAV will load bytecode from the database.
+# It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.
+# Default: yes
+#Bytecode yes
+
+# Set bytecode security level.
+# Possible values:
+# None - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS
+# This value is only available if clamav was built with --enable-debug!
+# TrustSigned - trust bytecode loaded from signed .c[lv]d files,
+# insert runtime safety checks for bytecode loaded from other sources
+# Paranoid - don't trust any bytecode, insert runtime checks for all
+# Recommended: TrustSigned, because bytecode in .cvd files already has these checks
+# Note that by default only signed bytecode is loaded, currently you can only
+# load unsigned bytecode in --enable-debug mode.
+#
+# Default: TrustSigned
+#BytecodeSecurity TrustSigned
+
+# Set bytecode timeout in miliseconds.
+#
+# Default: 5000
+# BytecodeTimeout 1000
diff --git a/install/rhel/7/clamav/clamd.service b/install/rhel/7/clamav/clamd.service
new file mode 100644
index 000000000..fdb3af7fd
--- /dev/null
+++ b/install/rhel/7/clamav/clamd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description = clamd scanner (clamd) daemon
+After = syslog.target nss-lookup.target network.target
+
+[Service]
+Type = simple
+ExecStart = /usr/sbin/clamd -c /etc/clamd.conf --nofork=yes
+Restart = on-failure
+PrivateTmp = true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/install/rhel/7/clamav/freshclam.conf b/install/rhel/7/clamav/freshclam.conf
new file mode 100644
index 000000000..61fb36465
--- /dev/null
+++ b/install/rhel/7/clamav/freshclam.conf
@@ -0,0 +1,6 @@
+DatabaseDirectory /var/lib/clamav
+UpdateLogFile /var/log/clamav/freshclam.log
+LogSyslog yes
+DatabaseOwner clam
+DatabaseMirror db.ca.clamav.net
+DatabaseMirror db.local.clamav.net
diff --git a/install/rhel/7/dovecot/conf.d/10-auth.conf b/install/rhel/7/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/rhel/7/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/rhel/7/dovecot/conf.d/10-logging.conf b/install/rhel/7/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/rhel/7/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/rhel/7/dovecot/conf.d/10-mail.conf b/install/rhel/7/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/rhel/7/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/rhel/7/dovecot/conf.d/10-master.conf b/install/rhel/7/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/rhel/7/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/rhel/7/dovecot/conf.d/10-ssl.conf b/install/rhel/7/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/rhel/7/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 3
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/rhel/7/dovecot/conf.d/auth-passwdfile.conf.ext b/install/rhel/7/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..69ab3a5d9
--- /dev/null
+++ b/install/rhel/7/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim/domains/%d/passwd
+}
diff --git a/install/rhel/7/dovecot/dovecot.conf b/install/rhel/7/dovecot/dovecot.conf
new file mode 100644
index 000000000..b44bd6a82
--- /dev/null
+++ b/install/rhel/7/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/rhel/7/epel-release.rpm b/install/rhel/7/epel-release.rpm
new file mode 100644
index 000000000..6c2a040be
Binary files /dev/null and b/install/rhel/7/epel-release.rpm differ
diff --git a/install/rhel/7/exim/dnsbl.conf b/install/rhel/7/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/rhel/7/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/rhel/7/exim/exim-smarthost.conf b/install/rhel/7/exim/exim-smarthost.conf
new file mode 100644
index 000000000..086ca6507
--- /dev/null
+++ b/install/rhel/7/exim/exim-smarthost.conf
@@ -0,0 +1,384 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim/domains/
+domainlist relay_to_domains = dsearch;/etc/exim/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.sock
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /etc/pki/tls/certs/exim.pem
+tls_privatekey = /etc/pki/tls/private/exim.pem
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+login:
+ driver = plaintext
+ public_name = LOGIN
+ client_send = ": user@smartrelay.vestacp.com : p4sw0rd"
+ server_set_id = $auth1
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+smarthost:
+ driver = manualroute
+ domains = ! +local_domains
+ transport = remote_smtp_auth
+ route_list = * smartrelay.vestacp.com
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ require_files = /etc/exim/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+remote_smtp_auth:
+ driver = smtp
+ hosts = smartrelay.vestacp.com
+ hosts_require_auth = smartrelay.vestacp.com
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/rhel/7/exim/exim.conf b/install/rhel/7/exim/exim.conf
new file mode 100644
index 000000000..0f9830168
--- /dev/null
+++ b/install/rhel/7/exim/exim.conf
@@ -0,0 +1,376 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim/domains/
+domainlist relay_to_domains = dsearch;/etc/exim/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.sock
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ require_files = /etc/exim/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/rhel/7/exim/spam-blocks.conf b/install/rhel/7/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/fail2ban.action.conf b/install/rhel/7/fail2ban/fail2ban.action.conf
similarity index 100%
rename from install/ubuntu/fail2ban.action.conf
rename to install/rhel/7/fail2ban/fail2ban.action.conf
diff --git a/install/rhel/7/fail2ban/fail2ban.filter.conf b/install/rhel/7/fail2ban/fail2ban.filter.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/rhel/7/fail2ban/fail2ban.filter.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/fail2ban.jail.conf b/install/rhel/7/fail2ban/fail2ban.jail.conf
similarity index 100%
rename from install/ubuntu/fail2ban.jail.conf
rename to install/rhel/7/fail2ban/fail2ban.jail.conf
diff --git a/install/rhel/7/firewall/ports.conf b/install/rhel/7/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/rhel/7/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/rhel/7/firewall/rules.conf b/install/rhel/7/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/rhel/7/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/rhel/7/httpd/httpd.conf b/install/rhel/7/httpd/httpd.conf
new file mode 100644
index 000000000..40b034885
--- /dev/null
+++ b/install/rhel/7/httpd/httpd.conf
@@ -0,0 +1,58 @@
+ServerRoot "/etc/httpd"
+Include conf.modules.d/*.conf
+User apache
+Group apache
+ServerAdmin root@localhost
+
+
+ AllowOverride none
+
+
+DocumentRoot "/var/www/html"
+
+ AllowOverride None
+ Require all granted
+
+
+
+ Options Indexes FollowSymLinks
+ AllowOverride None
+ Require all granted
+
+
+DirectoryIndex index.php index.html
+
+
+ Require all denied
+
+
+ErrorLog "logs/error_log"
+LogLevel warn
+
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %b" common
+LogFormat "%b" bytes
+CustomLog "logs/access_log" combined
+
+TypesConfig /etc/mime.types
+AddType application/x-compress .Z
+AddType application/x-gzip .gz .tgz
+AddType text/html .shtml
+AddOutputFilter INCLUDES .shtml
+#AddHandler cgi-script .cgi
+
+AddDefaultCharset UTF-8
+
+
+ MIMEMagicFile conf/magic
+
+
+EnableSendfile on
+
+
+ RemoteIPHeader X-Real-IP
+ LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+ LogFormat "%a %l %u %t \"%r\" %>s %b" common
+
+
+IncludeOptional conf.d/*.conf
diff --git a/install/rhel/7/httpd/ruid2.conf b/install/rhel/7/httpd/ruid2.conf
new file mode 100644
index 000000000..42f908a85
--- /dev/null
+++ b/install/rhel/7/httpd/ruid2.conf
@@ -0,0 +1,8 @@
+LoadModule ruid2_module modules/mod_ruid2.so
+
+
+ RMode config
+ RDefaultUidGid apache apache
+ RUidGid apache apache
+ RGroups apache
+
diff --git a/install/rhel/7/httpd/ssl.conf b/install/rhel/7/httpd/ssl.conf
new file mode 100644
index 000000000..ccc067c19
--- /dev/null
+++ b/install/rhel/7/httpd/ssl.conf
@@ -0,0 +1,6 @@
+SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
+SSLSessionCache shmcb:/run/httpd/sslcache(512000)
+SSLSessionCacheTimeout 300
+SSLRandomSeed startup file:/dev/urandom 256
+SSLRandomSeed connect builtin
+SSLCryptoDevice builtin
diff --git a/install/rhel/7/httpd/status.conf b/install/rhel/7/httpd/status.conf
new file mode 100644
index 000000000..f68f293dc
--- /dev/null
+++ b/install/rhel/7/httpd/status.conf
@@ -0,0 +1,7 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+
diff --git a/install/rhel/7/logrotate/httpd b/install/rhel/7/logrotate/httpd
new file mode 100644
index 000000000..80dab8e29
--- /dev/null
+++ b/install/rhel/7/logrotate/httpd
@@ -0,0 +1,10 @@
+/var/log/httpd/*log /var/log/httpd/domains/*log {
+ missingok
+ notifempty
+ compress
+ sharedscripts
+ postrotate
+ /sbin/service httpd reload > /dev/null 2>/dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/rhel/7/logrotate/nginx b/install/rhel/7/logrotate/nginx
new file mode 100644
index 000000000..b1da1bf16
--- /dev/null
+++ b/install/rhel/7/logrotate/nginx
@@ -0,0 +1,12 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ create 0644 nginx nginx
+ daily
+ rotate 10
+ missingok
+ notifempty
+ compress
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/rhel/7/logrotate/vesta b/install/rhel/7/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/rhel/7/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/rhel/7/mariadb/my-large.cnf b/install/rhel/7/mariadb/my-large.cnf
new file mode 100644
index 000000000..4e6c2225c
--- /dev/null
+++ b/install/rhel/7/mariadb/my-large.cnf
@@ -0,0 +1,38 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/7/mariadb/my-medium.cnf b/install/rhel/7/mariadb/my-medium.cnf
new file mode 100644
index 000000000..fa255ec52
--- /dev/null
+++ b/install/rhel/7/mariadb/my-medium.cnf
@@ -0,0 +1,37 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/7/mariadb/my-small.cnf b/install/rhel/7/mariadb/my-small.cnf
new file mode 100644
index 000000000..933d4ae0b
--- /dev/null
+++ b/install/rhel/7/mariadb/my-small.cnf
@@ -0,0 +1,35 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=50
+max_user_connections=25
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+[mysqld_safe]
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/7/monit/clamd.conf b/install/rhel/7/monit/clamd.conf
new file mode 100644
index 000000000..a360b1097
--- /dev/null
+++ b/install/rhel/7/monit/clamd.conf
@@ -0,0 +1,3 @@
+check process clamd with pidfile /var/run/clamav/clamd.pid
+ start program = "/etc/init.d/clamd start"
+ stop program = "/etc/init.d/clamd stop"
diff --git a/install/rhel/7/monit/dovecot.conf b/install/rhel/7/monit/dovecot.conf
new file mode 100644
index 000000000..c78216565
--- /dev/null
+++ b/install/rhel/7/monit/dovecot.conf
@@ -0,0 +1,3 @@
+check process dovecot with pidfile /var/run/dovecot/master.pid
+ start program = "/etc/init.d/dovecot start"
+ stop program = "/etc/init.d/dovecot stop"
diff --git a/install/rhel/7/monit/exim.conf b/install/rhel/7/monit/exim.conf
new file mode 100644
index 000000000..e7988e47d
--- /dev/null
+++ b/install/rhel/7/monit/exim.conf
@@ -0,0 +1,3 @@
+check process exim with pidfile /var/run/exim.pid
+ start program = "/etc/init.d/exim start"
+ stop program = "/etc/init.d/exim stop"
diff --git a/install/rhel/7/monit/httpd.conf b/install/rhel/7/monit/httpd.conf
new file mode 100644
index 000000000..1ce1a594d
--- /dev/null
+++ b/install/rhel/7/monit/httpd.conf
@@ -0,0 +1,3 @@
+check process httpd with pidfile /var/run/httpd/httpd.pid
+ start program = "/etc/init.d/httpd start"
+ stop program = "/etc/init.d/httpd stop"
diff --git a/install/rhel/7/monit/mysql.conf b/install/rhel/7/monit/mysql.conf
new file mode 100644
index 000000000..aa413c438
--- /dev/null
+++ b/install/rhel/7/monit/mysql.conf
@@ -0,0 +1,3 @@
+check process mysql with pidfile /var/run/mysqld/mysqld.pid
+ start program = "/etc/init.d/mysqld start"
+ stop program = "/etc/init.d/mysqld stop"
diff --git a/install/rhel/7/monit/nginx.conf b/install/rhel/7/monit/nginx.conf
new file mode 100644
index 000000000..d29af043c
--- /dev/null
+++ b/install/rhel/7/monit/nginx.conf
@@ -0,0 +1,3 @@
+check process nginx with pidfile /var/run/nginx.pid
+ start program = "/etc/init.d/nginx start"
+ stop program = "/etc/init.d/nginx stop"
diff --git a/install/rhel/7/monit/spamassassin.conf b/install/rhel/7/monit/spamassassin.conf
new file mode 100644
index 000000000..0c9729d51
--- /dev/null
+++ b/install/rhel/7/monit/spamassassin.conf
@@ -0,0 +1,3 @@
+check process spamassassin with pidfile /var/run/spamd.pid
+ start program = "/etc/init.d/spamassassin start"
+ stop program = "/etc/init.d/spamassassin stop"
diff --git a/install/rhel/7/monit/sshd.conf b/install/rhel/7/monit/sshd.conf
new file mode 100644
index 000000000..b28123129
--- /dev/null
+++ b/install/rhel/7/monit/sshd.conf
@@ -0,0 +1,3 @@
+check process sshd with pidfile /var/run/sshd.pid
+ start program = "/etc/init.d/sshd start"
+ stop program = "/etc/init.d/sshd stop"
diff --git a/install/rhel/7/monit/vesta-nginx.conf b/install/rhel/7/monit/vesta-nginx.conf
new file mode 100644
index 000000000..1a85cac3a
--- /dev/null
+++ b/install/rhel/7/monit/vesta-nginx.conf
@@ -0,0 +1,3 @@
+check process vesta-nginx with pidfile /var/run/vesta-nginx.pid
+ start program = "/etc/init.d/vesta start"
+ stop program = "/etc/init.d/vesta stop"
diff --git a/install/rhel/7/monit/vesta-php.conf b/install/rhel/7/monit/vesta-php.conf
new file mode 100644
index 000000000..80731189f
--- /dev/null
+++ b/install/rhel/7/monit/vesta-php.conf
@@ -0,0 +1,3 @@
+check process vesta-php with pidfile /var/run/vesta-php.pid
+ start program = "/etc/init.d/vesta start"
+ stop program = "/etc/init.d/vesta stop"
diff --git a/install/rhel/7/mysqld/my-large.cnf b/install/rhel/7/mysqld/my-large.cnf
new file mode 100644
index 000000000..b548eeb87
--- /dev/null
+++ b/install/rhel/7/mysqld/my-large.cnf
@@ -0,0 +1,38 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/7/mysqld/my-medium.cnf b/install/rhel/7/mysqld/my-medium.cnf
new file mode 100644
index 000000000..e5f2677fc
--- /dev/null
+++ b/install/rhel/7/mysqld/my-medium.cnf
@@ -0,0 +1,37 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/7/mysqld/my-small.cnf b/install/rhel/7/mysqld/my-small.cnf
new file mode 100644
index 000000000..adc7cd1fb
--- /dev/null
+++ b/install/rhel/7/mysqld/my-small.cnf
@@ -0,0 +1,35 @@
+[mysqld]
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+#slow_query_log=1
+#slow_query_log_file=/var/log/mysql-slow-queries.log
+
+[mysqld_safe]
+log-error=/var/log/mysqld.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+#
+# include all files from the config directory
+#
+!includedir /etc/my.cnf.d
diff --git a/install/rhel/7/named/named.conf b/install/rhel/7/named/named.conf
new file mode 100644
index 000000000..472bd829b
--- /dev/null
+++ b/install/rhel/7/named/named.conf
@@ -0,0 +1,13 @@
+options {
+ directory "/var/named";
+ dump-file "/var/named/data/cache_dump.db";
+ pid-file "/var/run/named/named.pid";
+ statistics-file "/var/named/data/named_stats.txt";
+ version "get lost";
+ allow-transfer {"none";};
+ recursion no;
+
+};
+
+include "/etc/rndc.key";
+
diff --git a/install/rhel/7/nginx/nginx.conf b/install/rhel/7/nginx/nginx.conf
new file mode 100644
index 000000000..1b953c01a
--- /dev/null
+++ b/install/rhel/7/nginx/nginx.conf
@@ -0,0 +1,101 @@
+# Server globals
+user nginx;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/rhel/7/nginx/phpmyadmin.inc b/install/rhel/7/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..09da52076
--- /dev/null
+++ b/install/rhel/7/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpMyAdmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpMyAdmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/7/nginx/phppgadmin.inc b/install/rhel/7/nginx/phppgadmin.inc
new file mode 100644
index 000000000..333e560a2
--- /dev/null
+++ b/install/rhel/7/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phpPgAdmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phpPgAdmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/7/nginx/status.conf b/install/rhel/7/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/rhel/7/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/rhel/7/nginx/webmail.inc b/install/rhel/7/nginx/webmail.inc
new file mode 100644
index 000000000..2d0fbe293
--- /dev/null
+++ b/install/rhel/7/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /usr/share/roundcubemail/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /usr/share/roundcubemail/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/rhel/7/packages/default.pkg b/install/rhel/7/packages/default.pkg
new file mode 100644
index 000000000..3df21d3df
--- /dev/null
+++ b/install/rhel/7/packages/default.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2015-06-05'
diff --git a/install/rhel/7/packages/gainsboro.pkg b/install/rhel/7/packages/gainsboro.pkg
new file mode 100644
index 000000000..2b66b7d17
--- /dev/null
+++ b/install/rhel/7/packages/gainsboro.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2015-06-05'
diff --git a/install/rhel/7/packages/palegreen.pkg b/install/rhel/7/packages/palegreen.pkg
new file mode 100644
index 000000000..b17e5e1b2
--- /dev/null
+++ b/install/rhel/7/packages/palegreen.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='hosting'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2015-06-05'
diff --git a/install/rhel/7/packages/slategrey.pkg b/install/rhel/7/packages/slategrey.pkg
new file mode 100644
index 000000000..cc9ef423c
--- /dev/null
+++ b/install/rhel/7/packages/slategrey.pkg
@@ -0,0 +1,19 @@
+WEB_TEMPLATE='default'
+BACKEND_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2015-06-05'
diff --git a/install/rhel/7/pga/config.inc.php b/install/rhel/7/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/rhel/7/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/rhel/7/pga/phpPgAdmin.conf b/install/rhel/7/pga/phpPgAdmin.conf
new file mode 100644
index 000000000..4f6ea1b53
--- /dev/null
+++ b/install/rhel/7/pga/phpPgAdmin.conf
@@ -0,0 +1,14 @@
+#
+# This configuration file maps the phpPgAdmin directory into the URL space.
+# By default this application is only accessible from the local host.
+#
+
+Alias /phpPgAdmin /usr/share/phpPgAdmin
+Alias /phppgadmin /usr/share/phpPgAdmin
+
+
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/rhel/7/php-fpm/www.conf b/install/rhel/7/php-fpm/www.conf
new file mode 100644
index 000000000..260109d8f
--- /dev/null
+++ b/install/rhel/7/php-fpm/www.conf
@@ -0,0 +1,10 @@
+[www]
+listen = 127.0.0.1:9000
+listen.allowed_clients = 127.0.0.1
+user = apache
+group = apache
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 5
+pm.min_spare_servers = 3
+pm.max_spare_servers = 35
diff --git a/install/rhel/7/pma/config.inc.conf b/install/rhel/7/pma/config.inc.conf
new file mode 100644
index 000000000..47ae207e4
--- /dev/null
+++ b/install/rhel/7/pma/config.inc.conf
@@ -0,0 +1,143 @@
+.
+ *
+ * @package phpMyAdmin
+ */
+
+/*
+ * This is needed for cookie based authentication to encrypt password in
+ * cookie
+ */
+$cfg['blowfish_secret'] = '%blowfish_secret%'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+
+/*
+ * Servers configuration
+ */
+$i = 0;
+
+/*
+ * First server
+ */
+$i++;
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'localhost';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/*
+ * phpMyAdmin configuration storage settings.
+ */
+
+/* User used to manipulate with storage */
+// $cfg['Servers'][$i]['controluser'] = 'pma';
+// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
+
+/* Storage database and tables */
+// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
+// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
+// $cfg['Servers'][$i]['relation'] = 'pma_relation';
+// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
+// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
+// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
+// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
+// $cfg['Servers'][$i]['history'] = 'pma_history';
+// $cfg['Servers'][$i]['tracking'] = 'pma_tracking';
+// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
+// $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
+/* Contrib / Swekey authentication */
+// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
+
+/*
+ * End of servers configuration
+ */
+
+/*
+ * Directories for saving/loading files from server
+ */
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+/**
+ * Defines whether a user should be displayed a "show all (records)"
+ * button in browse mode or not.
+ * default = false
+ */
+//$cfg['ShowAll'] = true;
+
+/**
+ * Number of rows displayed when browsing a result set. If the result
+ * set contains more rows, "Previous" and "Next".
+ * default = 30
+ */
+//$cfg['MaxRows'] = 50;
+
+/**
+ * Use graphically less intense menu tabs
+ * default = false
+ */
+//$cfg['LightTabs'] = true;
+
+/**
+ * disallow editing of binary fields
+ * valid values are:
+ * false allow editing
+ * 'blob' allow editing except for BLOB fields
+ * 'all' disallow editing
+ * default = blob
+ */
+//$cfg['ProtectBinary'] = 'false';
+
+/**
+ * Default language to use, if not browser-defined or user-defined
+ * (you find all languages in the locale folder)
+ * uncomment the desired line:
+ * default = 'en'
+ */
+//$cfg['DefaultLang'] = 'en';
+//$cfg['DefaultLang'] = 'de';
+
+/**
+ * default display direction (horizontal|vertical|horizontalflipped)
+ */
+//$cfg['DefaultDisplay'] = 'vertical';
+
+
+/**
+ * How many columns should be used for table display of a database?
+ * (a value larger than 1 results in some information being hidden)
+ * default = 1
+ */
+//$cfg['PropertiesNumColumns'] = 2;
+
+/**
+ * Set to true if you want DB-based query history.If false, this utilizes
+ * JS-routines to display query history (lost by window close)
+ *
+ * This requires configuration storage enabled, see above.
+ * default = false
+ */
+//$cfg['QueryHistoryDB'] = true;
+
+/**
+ * When using DB-based query history, how many entries should be kept?
+ *
+ * default = 25
+ */
+//$cfg['QueryHistoryMax'] = 100;
+
+/*
+ * You can find more configuration options in Documentation.html
+ * or here: http://wiki.phpmyadmin.net/pma/Config
+ */
+?>
diff --git a/install/rhel/7/pma/phpMyAdmin.conf b/install/rhel/7/pma/phpMyAdmin.conf
new file mode 100644
index 000000000..0049ef2b7
--- /dev/null
+++ b/install/rhel/7/pma/phpMyAdmin.conf
@@ -0,0 +1,39 @@
+# phpMyAdmin - Web based MySQL browser written in php
+#
+# Allows only localhost by default
+#
+# But allowing phpMyAdmin to anyone other than localhost should be considered
+# dangerous unless properly secured by SSL
+
+Alias /phpMyAdmin /usr/share/phpMyAdmin
+Alias /phpmyadmin /usr/share/phpMyAdmin
+
+
+ Order Deny,Allow
+ Deny from All
+ Allow from All
+
+
+
+ Order Deny,Allow
+ Deny from All
+ Allow from All
+
+
+# This directory does not require access over HTTP - taken from the original
+# phpMyAdmin upstream tarball
+#
+
+ Order Deny,Allow
+ Deny from All
+ Allow from None
+
+
+# This configuration prevents mod_security at phpMyAdmin directories from
+# filtering SQL etc. This may break your mod_security implementation.
+#
+#
+#
+# SecRuleInheritance Off
+#
+#
diff --git a/install/rhel/7/postgresql/pg_hba.conf b/install/rhel/7/postgresql/pg_hba.conf
new file mode 100644
index 000000000..1ba43941b
--- /dev/null
+++ b/install/rhel/7/postgresql/pg_hba.conf
@@ -0,0 +1,11 @@
+# "local" is for Unix domain socket connections only
+local all all ident
+
+# IPv4 local connections:
+host all all 127.0.0.1/32 md5
+
+# IPv6 local connections:
+host all all ::1/128 md5
+
+# Others
+host all all 0.0.0.0/0 md5
diff --git a/install/rhel/7/proftpd/proftpd.conf b/install/rhel/7/proftpd/proftpd.conf
new file mode 100644
index 000000000..a889ec82b
--- /dev/null
+++ b/install/rhel/7/proftpd/proftpd.conf
@@ -0,0 +1,32 @@
+ServerName "FTP"
+ServerIdent on "FTP Server ready."
+ServerAdmin root@localhost
+DefaultServer on
+DefaultRoot ~ !adm
+
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User nobody
+Group nobody
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/rhel/7/remi-release.rpm b/install/rhel/7/remi-release.rpm
new file mode 100644
index 000000000..7eea9560b
Binary files /dev/null and b/install/rhel/7/remi-release.rpm differ
diff --git a/install/rhel/7/roundcube/config.inc.php b/install/rhel/7/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/rhel/7/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/rhel/7/roundcube/main.inc.php b/install/rhel/7/roundcube/main.inc.php
new file mode 100644
index 000000000..a27c306eb
--- /dev/null
+++ b/install/rhel/7/roundcube/main.inc.php
@@ -0,0 +1,40 @@
+
+ Order Deny,Allow
+ Deny from all
+ Allow from all
+
diff --git a/install/rhel/7/roundcube/vesta.php b/install/rhel/7/roundcube/vesta.php
new file mode 100644
index 000000000..b8695bd17
--- /dev/null
+++ b/install/rhel/7/roundcube/vesta.php
@@ -0,0 +1,59 @@
+
+ */
+
+class rcube_vesta_password
+{
+ function save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
+}
diff --git a/install/rhel/7/sudo/admin b/install/rhel/7/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/rhel/7/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/rhel/7/templates/dns/child-ns.tpl b/install/rhel/7/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/rhel/7/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/rhel/7/templates/dns/default.tpl b/install/rhel/7/templates/dns/default.tpl
new file mode 100755
index 000000000..942c15bc8
--- /dev/null
+++ b/install/rhel/7/templates/dns/default.tpl
@@ -0,0 +1,15 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns3%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns4%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns5%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns6%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns7%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns8%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/rhel/7/templates/dns/gmail.tpl b/install/rhel/7/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/rhel/7/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/rhel/7/templates/web/awstats/awstats.tpl b/install/rhel/7/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/rhel/7/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/rhel/7/templates/web/awstats/index.tpl b/install/rhel/7/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/rhel/7/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/rhel/7/templates/web/awstats/nav.tpl b/install/rhel/7/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/rhel/7/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/basedir.stpl b/install/rhel/7/templates/web/httpd/basedir.stpl
new file mode 100755
index 000000000..b90818f14
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/basedir.tpl b/install/rhel/7/templates/web/httpd/basedir.tpl
new file mode 100755
index 000000000..53188221e
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/default.stpl b/install/rhel/7/templates/web/httpd/default.stpl
new file mode 100755
index 000000000..1134f39a8
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/default.tpl b/install/rhel/7/templates/web/httpd/default.tpl
new file mode 100755
index 000000000..78caf0b8c
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/hosting.stpl b/install/rhel/7/templates/web/httpd/hosting.stpl
new file mode 100755
index 000000000..28ba49d59
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/hosting.tpl b/install/rhel/7/templates/web/httpd/hosting.tpl
new file mode 100755
index 000000000..3a9249701
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/phpcgi.sh b/install/rhel/7/templates/web/httpd/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/rhel/7/templates/web/httpd/phpcgi.stpl b/install/rhel/7/templates/web/httpd/phpcgi.stpl
new file mode 100755
index 000000000..924e869ec
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/shttpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/phpcgi.tpl b/install/rhel/7/templates/web/httpd/phpcgi.tpl
new file mode 100755
index 000000000..bcefbfc4a
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/httpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/phpfcgid.sh b/install/rhel/7/templates/web/httpd/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/rhel/7/templates/web/httpd/phpfcgid.stpl b/install/rhel/7/templates/web/httpd/phpfcgid.stpl
new file mode 100755
index 000000000..64bdb1b07
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/shttpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/httpd/phpfcgid.tpl b/install/rhel/7/templates/web/httpd/phpfcgid.tpl
new file mode 100755
index 000000000..d48da5eef
--- /dev/null
+++ b/install/rhel/7/templates/web/httpd/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/httpd/domains/%domain%.bytes bytes
+ CustomLog /var/log/httpd/domains/%domain%.log combined
+ ErrorLog /var/log/httpd/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/httpd.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/templates/web/nginx/caching.sh b/install/rhel/7/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/rhel/7/templates/web/nginx/caching.stpl b/install/rhel/7/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..1109c924f
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache %domain%;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/caching.tpl b/install/rhel/7/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..6d727c67f
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache %domain%;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/default.stpl b/install/rhel/7/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..53ad8d1b8
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/7/templates/web/nginx/default.tpl b/install/rhel/7/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..c1fec114f
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/7/templates/web/nginx/hosting.sh b/install/rhel/7/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/rhel/7/templates/web/nginx/hosting.stpl b/install/rhel/7/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..aca458a4b
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/7/templates/web/nginx/hosting.tpl b/install/rhel/7/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..44d874962
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/httpd/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/httpd/domains/%domain%.log combined;
+ access_log /var/log/httpd/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/cms_made_simple.stpl b/install/rhel/7/templates/web/nginx/php-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/cms_made_simple.tpl b/install/rhel/7/templates/web/nginx/php-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/codeigniter2.stpl b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/codeigniter2.tpl b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/codeigniter3.stpl b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/codeigniter3.tpl b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/datalife_engine.stpl b/install/rhel/7/templates/web/nginx/php-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/datalife_engine.tpl b/install/rhel/7/templates/web/nginx/php-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/default.stpl b/install/rhel/7/templates/web/nginx/php-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/default.tpl b/install/rhel/7/templates/web/nginx/php-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/joomla.stpl b/install/rhel/7/templates/web/nginx/php-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/joomla.tpl b/install/rhel/7/templates/web/nginx/php-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/no-php.stpl b/install/rhel/7/templates/web/nginx/php-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/no-php.tpl b/install/rhel/7/templates/web/nginx/php-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/piwik.stpl b/install/rhel/7/templates/web/nginx/php-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/piwik.tpl b/install/rhel/7/templates/web/nginx/php-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/wordpress.stpl b/install/rhel/7/templates/web/nginx/php-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/wordpress.tpl b/install/rhel/7/templates/web/nginx/php-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/wordpress2.stpl b/install/rhel/7/templates/web/nginx/php-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/wordpress2.tpl b/install/rhel/7/templates/web/nginx/php-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/php-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/rhel/7/templates/web/nginx/proxy_ip.tpl b/install/rhel/7/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/rhel/7/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/rhel/7/templates/web/php-fpm/default.tpl b/install/rhel/7/templates/web/php-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/rhel/7/templates/web/php-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/rhel/7/templates/web/php-fpm/no-php.tpl b/install/rhel/7/templates/web/php-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/rhel/7/templates/web/php-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/rhel/7/templates/web/php-fpm/socket.tpl b/install/rhel/7/templates/web/php-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/rhel/7/templates/web/php-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/templates/web/skel/document_errors/403.html b/install/rhel/7/templates/web/skel/document_errors/403.html
similarity index 100%
rename from install/ubuntu/templates/web/skel/document_errors/403.html
rename to install/rhel/7/templates/web/skel/document_errors/403.html
diff --git a/install/ubuntu/templates/web/skel/document_errors/404.html b/install/rhel/7/templates/web/skel/document_errors/404.html
similarity index 100%
rename from install/ubuntu/templates/web/skel/document_errors/404.html
rename to install/rhel/7/templates/web/skel/document_errors/404.html
diff --git a/install/ubuntu/templates/web/skel/document_errors/50x.html b/install/rhel/7/templates/web/skel/document_errors/50x.html
similarity index 100%
rename from install/ubuntu/templates/web/skel/document_errors/50x.html
rename to install/rhel/7/templates/web/skel/document_errors/50x.html
diff --git a/install/rhel/7/templates/web/skel/public_html/index.html b/install/rhel/7/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/rhel/7/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/rhel/7/templates/web/skel/public_html/robots.txt b/install/rhel/7/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/rhel/7/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/rhel/7/templates/web/skel/public_shtml/index.html b/install/rhel/7/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/rhel/7/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/rhel/7/templates/web/skel/public_shtml/robots.txt b/install/rhel/7/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/rhel/7/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/rhel/7/templates/web/suspend/.htaccess b/install/rhel/7/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/rhel/7/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/rhel/7/templates/web/suspend/index.html b/install/rhel/7/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/rhel/7/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/rhel/7/templates/web/webalizer/webalizer.tpl b/install/rhel/7/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/rhel/7/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/rhel/7/vsftpd/vsftpd.conf b/install/rhel/7/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..4673c838d
--- /dev/null
+++ b/install/rhel/7/vsftpd/vsftpd.conf
@@ -0,0 +1,22 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+dual_log_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+chroot_local_user=YES
+allow_writeable_chroot=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=YES
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/rhel/7/wsgi/httpd/wsgi.sh b/install/rhel/7/wsgi/httpd/wsgi.sh
new file mode 100755
index 000000000..cb98116cb
--- /dev/null
+++ b/install/rhel/7/wsgi/httpd/wsgi.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+echo "# Wsgi template
+AddHandler wsgi-script .wsgi
+
+RewriteEngine On
+
+RewriteCond %{HTTP_HOST} ^www.$2\.ru\$ [NC]
+RewriteRule ^(.*)\$ http://$2/\$1 [R=301,L]
+
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)\$ /django.wsgi/\$1 [QSA,PT,L]
+" > $docroot/.htaccess
+chown $user:$user $docroot/.htaccess
+
+
+echo "import os, sys
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/env/lib/python2.6/site-packages')
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/project/src/shared/')
+sys.path.insert(0, '$home_dir/$user/web/$domain/private/django/$domain/project/src/')
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'main.settings'
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()" > $docroot/django.wsgi
+chown $user:$user $docroot/django.wsgi
+
+exit 0
diff --git a/install/rhel/7/wsgi/httpd/wsgi.stpl b/install/rhel/7/wsgi/httpd/wsgi.stpl
new file mode 100755
index 000000000..e2fdd3f40
--- /dev/null
+++ b/install/rhel/7/wsgi/httpd/wsgi.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ WSGIDaemonProcess apx-idea user=%user% group=%user% processes=1 threads=5 display-name=%{GROUP} python-path=%home%/%user%/web/%domain%/private/django/%domain%/env/lib/python2.6/site-packages
+ WSGIProcessGroup apx-idea
+ WSGIApplicationGroup %{GLOBAL}
+
+
+
+ AllowOverride FileInfo
+ Options ExecCGI Indexes
+ MultiviewsMatch Handlers
+ Options +FollowSymLinks
+ Order allow,deny
+ Allow from all
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/7/wsgi/httpd/wsgi.tpl b/install/rhel/7/wsgi/httpd/wsgi.tpl
new file mode 100644
index 000000000..ad5d8a076
--- /dev/null
+++ b/install/rhel/7/wsgi/httpd/wsgi.tpl
@@ -0,0 +1,44 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups apache
+
+
+ AssignUserID %user% %group%
+
+
+ WSGIDaemonProcess apx-idea user=%user% group=%user% processes=1 threads=5 display-name=%{GROUP} python-path=%home%/%user%/web/%domain%/private/django/%domain%/env/lib/python2.6/site-packages
+ WSGIProcessGroup apx-idea
+ WSGIApplicationGroup %{GLOBAL}
+
+
+
+ AllowOverride FileInfo
+ Options ExecCGI Indexes
+ MultiviewsMatch Handlers
+ Options +FollowSymLinks
+ Order allow,deny
+ Allow from all
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/rhel/apc.ini b/install/rhel/apc.ini
deleted file mode 100644
index b4e2d3493..000000000
--- a/install/rhel/apc.ini
+++ /dev/null
@@ -1,70 +0,0 @@
-; Enable apc extension module
-extension = apc.so
-
-; Options for the APC module version >= 3.1.3
-; See http://www.php.net/manual/en/apc.configuration.php
-
-; This can be set to 0 to disable APC.
-apc.enabled=1
-; The number of shared memory segments to allocate for the compiler cache.
-apc.shm_segments=1
-; The size of each shared memory segment, with M/G suffix
-apc.shm_size=128M
-; A "hint" about the number of distinct source files that will be included or
-; requested on your web server. Set to zero or omit if you are not sure;
-apc.num_files_hint=1024
-; Just like num_files_hint, a "hint" about the number of distinct user cache
-; variables to store. Set to zero or omit if you are not sure;
-apc.user_entries_hint=4096
-; The number of seconds a cache entry is allowed to idle in a slot in case this
-; cache entry slot is needed by another entry.
-apc.ttl=0
-; use the SAPI request start time for TTL
-apc.use_request_time=1
-; The number of seconds a user cache entry is allowed to idle in a slot in case
-; this cache entry slot is needed by another entry.
-apc.user_ttl=7200
-; The number of seconds that a cache entry may remain on the garbage-collection list.
-apc.gc_ttl=3600
-; On by default, but can be set to off and used in conjunction with positive
-; apc.filters so that files are only cached if matched by a positive filter.
-apc.cache_by_default=1
-; A comma-separated list of POSIX extended regular expressions.
-apc.filters
-; The mktemp-style file_mask to pass to the mmap module
-apc.mmap_file_mask=/tmp/apc.XXXXXX
-; This file_update_protection setting puts a delay on caching brand new files.
-apc.file_update_protection=2
-; Setting this enables APC for the CLI version of PHP (Mostly for testing and debugging).
-apc.enable_cli=0
-; Prevents large files from being cached
-apc.max_file_size=1M
-; Whether to stat the main script file and the fullpath includes.
-apc.stat=1
-; Vertification with ctime will avoid problems caused by programs such as svn or rsync by making
-; sure inodes have not changed since the last stat. APC will normally only check mtime.
-apc.stat_ctime=0
-; Whether to canonicalize paths in stat=0 mode or fall back to stat behaviour
-apc.canonicalize=0
-; With write_lock enabled, only one process at a time will try to compile an
-; uncached script while the other processes will run uncached
-apc.write_lock=1
-; Logs any scripts that were automatically excluded from being cached due to early/late binding issues.
-apc.report_autofilter=0
-; RFC1867 File Upload Progress hook handler
-apc.rfc1867=0
-apc.rfc1867_prefix =upload_
-apc.rfc1867_name=APC_UPLOAD_PROGRESS
-apc.rfc1867_freq=0
-apc.rfc1867_ttl=3600
-; Optimize include_once and require_once calls and avoid the expensive system calls used.
-apc.include_once_override=0
-apc.lazy_classes=0
-apc.lazy_functions=0
-; Enables APC handling of signals, such as SIGSEGV, that write core files when signaled.
-; APC will attempt to unmap the shared memory segment in order to exclude it from the core file
-apc.coredump_unmap=0
-; Records a md5 hash of files.
-apc.file_md5=0
-; not documented
-apc.preload_path
diff --git a/install/rhel/dovecot/conf.d/10-ssl.conf b/install/rhel/dovecot/conf.d/10-ssl.conf
deleted file mode 100644
index aaf63255b..000000000
--- a/install/rhel/dovecot/conf.d/10-ssl.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-ssl = yes
-ssl_cert = ", because it will show the password in clear.
-# You have to run "ssh -t hostname sudo ".
-#
-#Defaults requiretty
-
-Defaults env_reset
-Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
- LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
- LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
- LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
- _XKB_CHARSET XAUTHORITY VESTA"
-
-
-# Disable syslog loggging
-Defaults !syslog
-
-## Next comes the main part: which users can run what software on
-## which machines (the sudoers file can be shared between multiple
-## systems).
-## Syntax:
-##
-## user MACHINE=COMMANDS
-##
-## The COMMANDS section may have other options added to it.
-##
-## Allow root to run any commands anywhere
-root ALL=(ALL) ALL
-
-## Allows members of the 'sys' group to run networking, software,
-## service management apps and more.
-# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
-
-## Allows people in group wheel to run all commands
-# %wheel ALL=(ALL) ALL
-
-## Same thing without a password
-# %wheel ALL=(ALL) NOPASSWD: ALL
-
-## Allows members of the users group to mount and unmount the
-## cdrom as root
-# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
-
-## Allows members of the users group to shutdown this system
-# %users localhost=/sbin/shutdown -h now
-
-#includedir /etc/sudoers.d
diff --git a/install/rhel/vesta.conf b/install/rhel/vesta.conf
deleted file mode 100644
index eb2ae13fa..000000000
--- a/install/rhel/vesta.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-WEB_SYSTEM='httpd'
-WEB_RGROUPS='apache'
-WEB_PORT='8080'
-WEB_SSL='mod_ssl'
-WEB_SSL_PORT='8443'
-PROXY_SYSTEM='nginx'
-PROXY_PORT='80'
-PROXY_SSL_PORT='443'
-FTP_SYSTEM='vsftpd'
-MAIL_SYSTEM='exim'
-IMAP_SYSTEM='dovecot'
-ANTIVIRUS_SYSTEM='clamav'
-ANTISPAM_SYSTEM='spamassassin'
-DB_SYSTEM='mysql'
-DNS_SYSTEM='named'
-STATS_SYSTEM='webalizer,awstats'
-BACKUP_SYSTEM='local'
-CRON_SYSTEM='crond'
-DISK_QUOTA='no'
-FIREWALL_SYSTEM='iptables'
-FIREWALL_EXTENSION='fail2ban'
-REPOSITORY='cmmnt'
-VERSION='0.9.8'
-LANGUAGE='en'
diff --git a/install/rhel/whmcs-module.php b/install/rhel/whmcs-module.php
deleted file mode 100644
index 1cb250611..000000000
--- a/install/rhel/whmcs-module.php
+++ /dev/null
@@ -1,359 +0,0 @@
- array( "Type" => "text", "Default" => "default"),
- "SSH Access" => array( "Type" => "yesno", "Description" => "Tick to grant access", ),
- "IP Address (optional)" => array( "Type" => "text" ),
- );
- return $configarray;
-
-}
-
-function vesta_CreateAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-add-user',
- 'arg1' => $params["username"],
- 'arg2' => $params["password"],
- 'arg3' => $params["clientsdetails"]["email"],
- 'arg4' => $params["configoption1"],
- 'arg5' => $params["clientsdetails"]["firstname"],
- 'arg6' => $params["clientsdetails"]["lastname"],
- );
- $postdata = http_build_query($postvars);
-
- // Create user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- // Enable ssh access
- if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-shell',
- 'arg1' => $params["username"],
- 'arg2' => 'bash'
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
- }
-
- // Add domain
- if(($answer == 'OK') && (!empty($params["domain"]))) {
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-add-domain',
- 'arg1' => $params["username"],
- 'arg2' => $params["domain"],
- 'arg3' => $params["configoption3"],
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
- }
- }
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_TerminateAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-delete-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Delete user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_SuspendAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-suspend-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Susupend user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_UnsuspendAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-unsuspend-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Unsusupend user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ChangePassword($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-password',
- 'arg1' => $params["username"],
- 'arg2' => $params["password"]
- );
- $postdata = http_build_query($postvars);
-
- // Change user package
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ChangePackage($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-package',
- 'arg1' => $params["username"],
- 'arg2' => $params["configoption1"]
- );
- $postdata = http_build_query($postvars);
-
- // Change user package
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ClientArea($params) {
-
- $code = '';
- return $code;
-
-}
-
-function vesta_AdminLink($params) {
-
- $code = '';
- return $code;
-
-}
-
-function vesta_LoginLink($params) {
-
- echo "control panel ";
-
-}
-
-function vesta_UsageUpdate($params) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-list-users',
- 'arg1' => 'json'
- );
- $postdata = http_build_query($postvars);
-
- // Get user stats
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- // Decode json data
- $results = json_decode($answer, true);
-
- // Loop through results and update DB
- foreach ($results AS $user=>$values) {
- update_query("tblhosting",array(
- "diskusage"=>$values['U_DISK'],
- "disklimit"=>$values['DISK_QUOTA'],
- "bwusage"=>$values['U_BANDWIDTH'],
- "bwlimit"=>$values['BANDWIDTH'],
- "lastupdate"=>"now()",
- ),array("server"=>$params['serverid'], "username"=>$user));
- }
-
-}
-
-?>
diff --git a/install/ubuntu/12.04/apache2/apache2.conf b/install/ubuntu/12.04/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/12.04/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/12.04/apache2/status.conf b/install/ubuntu/12.04/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/12.04/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/12.04/bind/named.conf b/install/ubuntu/12.04/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/12.04/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/12.04/clamav/clamd.conf b/install/ubuntu/12.04/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/12.04/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/12.04/deb_signing.key b/install/ubuntu/12.04/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/12.04/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/12.04/dovecot/conf.d/10-auth.conf b/install/ubuntu/12.04/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/12.04/dovecot/conf.d/10-logging.conf b/install/ubuntu/12.04/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/12.04/dovecot/conf.d/10-mail.conf b/install/ubuntu/12.04/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/12.04/dovecot/conf.d/10-master.conf b/install/ubuntu/12.04/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/12.04/dovecot/conf.d/10-ssl.conf b/install/ubuntu/12.04/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/12.04/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/12.04/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/12.04/dovecot/dovecot.conf b/install/ubuntu/12.04/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/12.04/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/12.04/exim/dnsbl.conf b/install/ubuntu/12.04/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/12.04/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/12.04/exim/exim4.conf.template b/install/ubuntu/12.04/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/12.04/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/12.04/exim/spam-blocks.conf b/install/ubuntu/12.04/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/12.04/fail2ban/action.d/vesta.conf b/install/ubuntu/12.04/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/12.04/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/12.04/fail2ban/filter.d/vesta.conf b/install/ubuntu/12.04/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/12.04/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/12.04/fail2ban/jail.local b/install/ubuntu/12.04/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/12.04/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/12.04/firewall/ports.conf b/install/ubuntu/12.04/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/12.04/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/12.04/firewall/rules.conf b/install/ubuntu/12.04/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/12.04/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/12.04/logrotate/apache2 b/install/ubuntu/12.04/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/12.04/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/12.04/logrotate/nginx b/install/ubuntu/12.04/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/12.04/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/12.04/logrotate/vesta b/install/ubuntu/12.04/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/12.04/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/12.04/mysql/my-large.cnf b/install/ubuntu/12.04/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/12.04/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/12.04/mysql/my-medium.cnf b/install/ubuntu/12.04/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/12.04/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/12.04/mysql/my-small.cnf b/install/ubuntu/12.04/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/12.04/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/rhel/nginx.conf b/install/ubuntu/12.04/nginx/nginx.conf
similarity index 96%
rename from install/rhel/nginx.conf
rename to install/ubuntu/12.04/nginx/nginx.conf
index f7a77b52d..1e29f1fce 100644
--- a/install/rhel/nginx.conf
+++ b/install/ubuntu/12.04/nginx/nginx.conf
@@ -1,5 +1,5 @@
# Server globals
-user nginx;
+user www-data;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
@@ -21,7 +21,7 @@ http {
client_body_timeout 1m;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
- client_max_body_size 100m;
+ client_max_body_size 256m;
large_client_header_buffers 4 8k;
send_timeout 30;
keepalive_timeout 60 60;
@@ -52,7 +52,7 @@ http {
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/plain text/css text/javascript
- application/x-javascript;
+ application/x-javascript application/javascript;
gzip_proxied any;
@@ -106,8 +106,8 @@ http {
# Cache
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
- proxy_temp_path /var/cache/nginx/temp;
proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 3d;
diff --git a/install/ubuntu/12.04/nginx/phpmyadmin.inc b/install/ubuntu/12.04/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/12.04/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/12.04/nginx/phppgadmin.inc b/install/ubuntu/12.04/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/12.04/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/12.04/nginx/status.conf b/install/ubuntu/12.04/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/12.04/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/12.04/nginx/webmail.inc b/install/ubuntu/12.04/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/12.04/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/packages/default.pkg b/install/ubuntu/12.04/packages/default.pkg
similarity index 100%
rename from install/ubuntu/packages/default.pkg
rename to install/ubuntu/12.04/packages/default.pkg
diff --git a/install/ubuntu/packages/gainsboro.pkg b/install/ubuntu/12.04/packages/gainsboro.pkg
similarity index 100%
rename from install/ubuntu/packages/gainsboro.pkg
rename to install/ubuntu/12.04/packages/gainsboro.pkg
diff --git a/install/ubuntu/packages/palegreen.pkg b/install/ubuntu/12.04/packages/palegreen.pkg
similarity index 100%
rename from install/ubuntu/packages/palegreen.pkg
rename to install/ubuntu/12.04/packages/palegreen.pkg
diff --git a/install/ubuntu/packages/slategrey.pkg b/install/ubuntu/12.04/packages/slategrey.pkg
similarity index 100%
rename from install/ubuntu/packages/slategrey.pkg
rename to install/ubuntu/12.04/packages/slategrey.pkg
diff --git a/install/ubuntu/12.04/pga/config.inc.php b/install/ubuntu/12.04/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/12.04/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/12.04/pga/phppgadmin.conf b/install/ubuntu/12.04/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/12.04/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/12.04/php5-fpm/www.conf b/install/ubuntu/12.04/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/12.04/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/12.04/pma/apache.conf b/install/ubuntu/12.04/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/12.04/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/12.04/pma/config.inc.php b/install/ubuntu/12.04/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/12.04/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/12.04/roundcube/apache.conf b/install/ubuntu/12.04/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/12.04/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/12.04/roundcube/config.inc.php b/install/ubuntu/12.04/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/12.04/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/roundcube-main.conf b/install/ubuntu/12.04/roundcube/main.inc.php
similarity index 99%
rename from install/ubuntu/roundcube-main.conf
rename to install/ubuntu/12.04/roundcube/main.inc.php
index a6e1fc2ee..97cdbf2df 100644
--- a/install/ubuntu/roundcube-main.conf
+++ b/install/ubuntu/12.04/roundcube/main.inc.php
@@ -175,6 +175,8 @@ $rcmail_config['smtp_timeout'] = 0;
// ----------------------------------
// SYSTEM
// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
@@ -437,6 +439,7 @@ $rcmail_config['trash_mbox'] = 'Trash';
// these folders will also be displayed with localized names
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
// automatically create the above listed default folders on first login
$rcmail_config['create_default_folders'] = true;
diff --git a/install/ubuntu/12.04/roundcube/vesta.php b/install/ubuntu/12.04/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/12.04/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/12.04/sudo/admin b/install/ubuntu/12.04/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/12.04/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/12.04/templates/dns/child-ns.tpl b/install/ubuntu/12.04/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/12.04/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/12.04/templates/dns/default.tpl b/install/ubuntu/12.04/templates/dns/default.tpl
new file mode 100755
index 000000000..38f963006
--- /dev/null
+++ b/install/ubuntu/12.04/templates/dns/default.tpl
@@ -0,0 +1,9 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/12.04/templates/dns/gmail.tpl b/install/ubuntu/12.04/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/12.04/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/templates/web/apache2/basedir.stpl b/install/ubuntu/12.04/templates/web/apache2/basedir.stpl
similarity index 86%
rename from install/ubuntu/templates/web/apache2/basedir.stpl
rename to install/ubuntu/12.04/templates/web/apache2/basedir.stpl
index 269c09711..96de57af7 100755
--- a/install/ubuntu/templates/web/apache2/basedir.stpl
+++ b/install/ubuntu/12.04/templates/web/apache2/basedir.stpl
@@ -15,9 +15,7 @@
AllowOverride All
SSLRequireSSL
Options +Includes -Indexes +ExecCGI
- php_admin_value open_basedir %docroot%:%home%/%user%/tmp
- php_admin_value upload_tmp_dir %home%/%user%/tmp
- php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value open_basedir %docroot%
AllowOverride All
diff --git a/install/debian/templates/web/apache2/basedir.tpl b/install/ubuntu/12.04/templates/web/apache2/basedir.tpl
similarity index 84%
rename from install/debian/templates/web/apache2/basedir.tpl
rename to install/ubuntu/12.04/templates/web/apache2/basedir.tpl
index c24b12796..07ec38c98 100755
--- a/install/debian/templates/web/apache2/basedir.tpl
+++ b/install/ubuntu/12.04/templates/web/apache2/basedir.tpl
@@ -14,9 +14,7 @@
AllowOverride All
Options +Includes -Indexes +ExecCGI
- php_admin_value open_basedir %docroot%:%home%/%user%/tmp
- php_admin_value upload_tmp_dir %home%/%user%/tmp
- php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value open_basedir %docroot%
AllowOverride All
diff --git a/install/ubuntu/templates/web/apache2/default.stpl b/install/ubuntu/12.04/templates/web/apache2/default.stpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/default.stpl
rename to install/ubuntu/12.04/templates/web/apache2/default.stpl
diff --git a/install/ubuntu/templates/web/apache2/default.tpl b/install/ubuntu/12.04/templates/web/apache2/default.tpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/default.tpl
rename to install/ubuntu/12.04/templates/web/apache2/default.tpl
diff --git a/install/ubuntu/templates/web/apache2/hosting.stpl b/install/ubuntu/12.04/templates/web/apache2/hosting.stpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/hosting.stpl
rename to install/ubuntu/12.04/templates/web/apache2/hosting.stpl
diff --git a/install/ubuntu/templates/web/apache2/hosting.tpl b/install/ubuntu/12.04/templates/web/apache2/hosting.tpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/hosting.tpl
rename to install/ubuntu/12.04/templates/web/apache2/hosting.tpl
diff --git a/install/ubuntu/12.04/templates/web/apache2/phpcgi.sh b/install/ubuntu/12.04/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/templates/web/apache2/phpcgi.stpl b/install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/phpcgi.stpl
rename to install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl
diff --git a/install/ubuntu/templates/web/apache2/phpcgi.tpl b/install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/phpcgi.tpl
rename to install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl
diff --git a/install/ubuntu/12.04/templates/web/apache2/phpfcgid.sh b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/phpfcgid.stpl
rename to install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl
diff --git a/install/ubuntu/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl
similarity index 100%
rename from install/ubuntu/templates/web/apache2/phpfcgid.tpl
rename to install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl
diff --git a/install/ubuntu/12.04/templates/web/awstats/awstats.tpl b/install/ubuntu/12.04/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/12.04/templates/web/awstats/index.tpl b/install/ubuntu/12.04/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/awstats/nav.tpl b/install/ubuntu/12.04/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/nginx/caching.sh b/install/ubuntu/12.04/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/templates/web/nginx/caching.stpl b/install/ubuntu/12.04/templates/web/nginx/caching.stpl
similarity index 100%
rename from install/ubuntu/templates/web/nginx/caching.stpl
rename to install/ubuntu/12.04/templates/web/nginx/caching.stpl
diff --git a/install/ubuntu/templates/web/nginx/caching.tpl b/install/ubuntu/12.04/templates/web/nginx/caching.tpl
similarity index 95%
rename from install/ubuntu/templates/web/nginx/caching.tpl
rename to install/ubuntu/12.04/templates/web/nginx/caching.tpl
index 1462f9e1f..36761b65c 100755
--- a/install/ubuntu/templates/web/nginx/caching.tpl
+++ b/install/ubuntu/12.04/templates/web/nginx/caching.tpl
@@ -37,5 +37,5 @@ server {
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
- include %home%/%user%/web/conf/nginx.%domain%.conf*;
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
}
diff --git a/install/ubuntu/12.04/templates/web/nginx/default.stpl b/install/ubuntu/12.04/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.04/templates/web/nginx/default.tpl b/install/ubuntu/12.04/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.04/templates/web/nginx/hosting.sh b/install/ubuntu/12.04/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/12.04/templates/web/nginx/hosting.stpl b/install/ubuntu/12.04/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.04/templates/web/nginx/hosting.tpl b/install/ubuntu/12.04/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.04/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/12.04/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/12.04/templates/web/php5-fpm/default.tpl b/install/ubuntu/12.04/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/12.04/templates/web/php5-fpm/socket.tpl b/install/ubuntu/12.04/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/12.04/templates/web/skel/document_errors/403.html b/install/ubuntu/12.04/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/skel/document_errors/404.html b/install/ubuntu/12.04/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/skel/document_errors/50x.html b/install/ubuntu/12.04/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/skel/public_html/index.html b/install/ubuntu/12.04/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/skel/public_html/robots.txt b/install/ubuntu/12.04/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/12.04/templates/web/skel/public_shtml/index.html b/install/ubuntu/12.04/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/12.04/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/12.04/templates/web/suspend/.htaccess b/install/ubuntu/12.04/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/12.04/templates/web/suspend/index.html b/install/ubuntu/12.04/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/12.04/templates/web/webalizer/webalizer.tpl b/install/ubuntu/12.04/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/12.04/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/12.04/vsftpd/vsftpd.conf b/install/ubuntu/12.04/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/12.04/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/12.10/apache2/apache2.conf b/install/ubuntu/12.10/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/12.10/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/12.10/apache2/status.conf b/install/ubuntu/12.10/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/12.10/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/12.10/bind/named.conf b/install/ubuntu/12.10/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/12.10/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/12.10/clamav/clamd.conf b/install/ubuntu/12.10/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/12.10/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/12.10/deb_signing.key b/install/ubuntu/12.10/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/12.10/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/12.10/dovecot/conf.d/10-auth.conf b/install/ubuntu/12.10/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/12.10/dovecot/conf.d/10-logging.conf b/install/ubuntu/12.10/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/12.10/dovecot/conf.d/10-mail.conf b/install/ubuntu/12.10/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/12.10/dovecot/conf.d/10-master.conf b/install/ubuntu/12.10/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/12.10/dovecot/conf.d/10-ssl.conf b/install/ubuntu/12.10/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/12.10/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/12.10/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/12.10/dovecot/dovecot.conf b/install/ubuntu/12.10/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/12.10/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/12.10/exim/dnsbl.conf b/install/ubuntu/12.10/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/12.10/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/12.10/exim/exim4.conf.template b/install/ubuntu/12.10/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/12.10/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/12.10/exim/spam-blocks.conf b/install/ubuntu/12.10/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/12.10/fail2ban/action.d/vesta.conf b/install/ubuntu/12.10/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/12.10/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/12.10/fail2ban/filter.d/vesta.conf b/install/ubuntu/12.10/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/12.10/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/12.10/fail2ban/jail.local b/install/ubuntu/12.10/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/12.10/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/12.10/firewall/ports.conf b/install/ubuntu/12.10/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/12.10/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/12.10/firewall/rules.conf b/install/ubuntu/12.10/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/12.10/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/12.10/logrotate/apache2 b/install/ubuntu/12.10/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/12.10/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/12.10/logrotate/nginx b/install/ubuntu/12.10/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/12.10/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/12.10/logrotate/vesta b/install/ubuntu/12.10/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/12.10/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/12.10/mysql/my-large.cnf b/install/ubuntu/12.10/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/12.10/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/12.10/mysql/my-medium.cnf b/install/ubuntu/12.10/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/12.10/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/12.10/mysql/my-small.cnf b/install/ubuntu/12.10/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/12.10/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/12.10/nginx/nginx.conf b/install/ubuntu/12.10/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/12.10/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/12.10/nginx/phpmyadmin.inc b/install/ubuntu/12.10/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/12.10/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/12.10/nginx/phppgadmin.inc b/install/ubuntu/12.10/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/12.10/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/12.10/nginx/status.conf b/install/ubuntu/12.10/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/12.10/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/12.10/nginx/webmail.inc b/install/ubuntu/12.10/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/12.10/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/12.10/packages/default.pkg b/install/ubuntu/12.10/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/12.10/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/12.10/packages/gainsboro.pkg b/install/ubuntu/12.10/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/12.10/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/12.10/packages/palegreen.pkg b/install/ubuntu/12.10/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/12.10/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/12.10/packages/slategrey.pkg b/install/ubuntu/12.10/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/12.10/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/12.10/pga/config.inc.php b/install/ubuntu/12.10/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/12.10/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/12.10/pga/phppgadmin.conf b/install/ubuntu/12.10/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/12.10/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/12.10/php5-fpm/www.conf b/install/ubuntu/12.10/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/12.10/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/12.10/pma/apache.conf b/install/ubuntu/12.10/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/12.10/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/12.10/pma/config.inc.php b/install/ubuntu/12.10/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/12.10/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/12.10/roundcube/apache.conf b/install/ubuntu/12.10/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/12.10/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/12.10/roundcube/config.inc.php b/install/ubuntu/12.10/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/12.10/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/12.10/roundcube/main.inc.php b/install/ubuntu/12.10/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/12.10/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/12.10/roundcube/vesta.php b/install/ubuntu/12.10/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/12.10/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/12.10/sudo/admin b/install/ubuntu/12.10/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/12.10/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/12.10/templates/dns/child-ns.tpl b/install/ubuntu/12.10/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/12.10/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/12.10/templates/dns/default.tpl b/install/ubuntu/12.10/templates/dns/default.tpl
new file mode 100755
index 000000000..38f963006
--- /dev/null
+++ b/install/ubuntu/12.10/templates/dns/default.tpl
@@ -0,0 +1,9 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/12.10/templates/dns/gmail.tpl b/install/ubuntu/12.10/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/12.10/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/12.10/templates/web/apache2/basedir.stpl b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..96de57af7
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/basedir.tpl b/install/ubuntu/12.10/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..07ec38c98
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/default.stpl b/install/ubuntu/12.10/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..da523c138
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/default.tpl b/install/ubuntu/12.10/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..b95c1ee38
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/hosting.stpl b/install/ubuntu/12.10/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..c1c91e22e
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/hosting.tpl b/install/ubuntu/12.10/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..8f3ec012a
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/phpcgi.sh b/install/ubuntu/12.10/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..58c4baf90
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..21be2cdd7
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.sh b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..20a580093
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..72e7d8d44
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/awstats/awstats.tpl b/install/ubuntu/12.10/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/12.10/templates/web/awstats/index.tpl b/install/ubuntu/12.10/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/awstats/nav.tpl b/install/ubuntu/12.10/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/nginx/caching.sh b/install/ubuntu/12.10/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/12.10/templates/web/nginx/caching.stpl b/install/ubuntu/12.10/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/caching.tpl b/install/ubuntu/12.10/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/default.stpl b/install/ubuntu/12.10/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.10/templates/web/nginx/default.tpl b/install/ubuntu/12.10/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.10/templates/web/nginx/hosting.sh b/install/ubuntu/12.10/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/12.10/templates/web/nginx/hosting.stpl b/install/ubuntu/12.10/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.10/templates/web/nginx/hosting.tpl b/install/ubuntu/12.10/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/12.10/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/12.10/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/12.10/templates/web/php5-fpm/default.tpl b/install/ubuntu/12.10/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/12.10/templates/web/php5-fpm/socket.tpl b/install/ubuntu/12.10/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/12.10/templates/web/skel/document_errors/403.html b/install/ubuntu/12.10/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/skel/document_errors/404.html b/install/ubuntu/12.10/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/skel/document_errors/50x.html b/install/ubuntu/12.10/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/skel/public_html/index.html b/install/ubuntu/12.10/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/skel/public_html/robots.txt b/install/ubuntu/12.10/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/12.10/templates/web/skel/public_shtml/index.html b/install/ubuntu/12.10/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/12.10/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/12.10/templates/web/suspend/.htaccess b/install/ubuntu/12.10/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/12.10/templates/web/suspend/index.html b/install/ubuntu/12.10/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/12.10/templates/web/webalizer/webalizer.tpl b/install/ubuntu/12.10/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/12.10/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/12.10/vsftpd/vsftpd.conf b/install/ubuntu/12.10/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/12.10/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/13.04/apache2/apache2.conf b/install/ubuntu/13.04/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/13.04/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/13.04/apache2/status.conf b/install/ubuntu/13.04/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/13.04/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/13.04/bind/named.conf b/install/ubuntu/13.04/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/13.04/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/13.04/clamav/clamd.conf b/install/ubuntu/13.04/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/13.04/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/13.04/deb_signing.key b/install/ubuntu/13.04/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/13.04/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/13.04/dovecot/conf.d/10-auth.conf b/install/ubuntu/13.04/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/13.04/dovecot/conf.d/10-logging.conf b/install/ubuntu/13.04/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/13.04/dovecot/conf.d/10-mail.conf b/install/ubuntu/13.04/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/13.04/dovecot/conf.d/10-master.conf b/install/ubuntu/13.04/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/13.04/dovecot/conf.d/10-ssl.conf b/install/ubuntu/13.04/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/13.04/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/13.04/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/13.04/dovecot/dovecot.conf b/install/ubuntu/13.04/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/13.04/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/13.04/exim/dnsbl.conf b/install/ubuntu/13.04/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/13.04/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/13.04/exim/exim4.conf.template b/install/ubuntu/13.04/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/13.04/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/13.04/exim/spam-blocks.conf b/install/ubuntu/13.04/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/13.04/fail2ban/action.d/vesta.conf b/install/ubuntu/13.04/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/13.04/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/13.04/fail2ban/filter.d/vesta.conf b/install/ubuntu/13.04/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/13.04/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/13.04/fail2ban/jail.local b/install/ubuntu/13.04/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/13.04/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/13.04/firewall/ports.conf b/install/ubuntu/13.04/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/13.04/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/13.04/firewall/rules.conf b/install/ubuntu/13.04/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/13.04/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/13.04/logrotate/apache2 b/install/ubuntu/13.04/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/13.04/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/13.04/logrotate/nginx b/install/ubuntu/13.04/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/13.04/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/13.04/logrotate/vesta b/install/ubuntu/13.04/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/13.04/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/13.04/mysql/my-large.cnf b/install/ubuntu/13.04/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/13.04/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/13.04/mysql/my-medium.cnf b/install/ubuntu/13.04/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/13.04/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/13.04/mysql/my-small.cnf b/install/ubuntu/13.04/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/13.04/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/13.04/nginx/nginx.conf b/install/ubuntu/13.04/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/13.04/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/13.04/nginx/phpmyadmin.inc b/install/ubuntu/13.04/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/13.04/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/13.04/nginx/phppgadmin.inc b/install/ubuntu/13.04/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/13.04/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/13.04/nginx/status.conf b/install/ubuntu/13.04/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/13.04/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/13.04/nginx/webmail.inc b/install/ubuntu/13.04/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/13.04/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/13.04/packages/default.pkg b/install/ubuntu/13.04/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/13.04/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/13.04/packages/gainsboro.pkg b/install/ubuntu/13.04/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/13.04/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/13.04/packages/palegreen.pkg b/install/ubuntu/13.04/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/13.04/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/13.04/packages/slategrey.pkg b/install/ubuntu/13.04/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/13.04/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/13.04/pga/config.inc.php b/install/ubuntu/13.04/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/13.04/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/13.04/pga/phppgadmin.conf b/install/ubuntu/13.04/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/13.04/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/13.04/php5-fpm/www.conf b/install/ubuntu/13.04/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/13.04/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/13.04/pma/apache.conf b/install/ubuntu/13.04/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/13.04/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/13.04/pma/config.inc.php b/install/ubuntu/13.04/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/13.04/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/13.04/roundcube/apache.conf b/install/ubuntu/13.04/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/13.04/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/13.04/roundcube/config.inc.php b/install/ubuntu/13.04/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/13.04/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/13.04/roundcube/main.inc.php b/install/ubuntu/13.04/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/13.04/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/13.04/roundcube/vesta.php b/install/ubuntu/13.04/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/13.04/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/13.04/sudo/admin b/install/ubuntu/13.04/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/13.04/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/13.04/templates/dns/child-ns.tpl b/install/ubuntu/13.04/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/13.04/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/13.04/templates/dns/default.tpl b/install/ubuntu/13.04/templates/dns/default.tpl
new file mode 100755
index 000000000..38f963006
--- /dev/null
+++ b/install/ubuntu/13.04/templates/dns/default.tpl
@@ -0,0 +1,9 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/13.04/templates/dns/gmail.tpl b/install/ubuntu/13.04/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/13.04/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/13.04/templates/web/apache2/basedir.stpl b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..96de57af7
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/basedir.tpl b/install/ubuntu/13.04/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..07ec38c98
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/default.stpl b/install/ubuntu/13.04/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..da523c138
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/default.tpl b/install/ubuntu/13.04/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..b95c1ee38
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/hosting.stpl b/install/ubuntu/13.04/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..c1c91e22e
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/hosting.tpl b/install/ubuntu/13.04/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..8f3ec012a
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/phpcgi.sh b/install/ubuntu/13.04/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..58c4baf90
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..21be2cdd7
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.sh b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..20a580093
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..72e7d8d44
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ Include %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/awstats/awstats.tpl b/install/ubuntu/13.04/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/13.04/templates/web/awstats/index.tpl b/install/ubuntu/13.04/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/awstats/nav.tpl b/install/ubuntu/13.04/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/nginx/caching.sh b/install/ubuntu/13.04/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/13.04/templates/web/nginx/caching.stpl b/install/ubuntu/13.04/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/caching.tpl b/install/ubuntu/13.04/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/default.stpl b/install/ubuntu/13.04/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.04/templates/web/nginx/default.tpl b/install/ubuntu/13.04/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.04/templates/web/nginx/hosting.sh b/install/ubuntu/13.04/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/13.04/templates/web/nginx/hosting.stpl b/install/ubuntu/13.04/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.04/templates/web/nginx/hosting.tpl b/install/ubuntu/13.04/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.04/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/13.04/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/13.04/templates/web/php5-fpm/default.tpl b/install/ubuntu/13.04/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/13.04/templates/web/php5-fpm/socket.tpl b/install/ubuntu/13.04/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/13.04/templates/web/skel/document_errors/403.html b/install/ubuntu/13.04/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/skel/document_errors/404.html b/install/ubuntu/13.04/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/skel/document_errors/50x.html b/install/ubuntu/13.04/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/skel/public_html/index.html b/install/ubuntu/13.04/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/skel/public_html/robots.txt b/install/ubuntu/13.04/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/13.04/templates/web/skel/public_shtml/index.html b/install/ubuntu/13.04/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/13.04/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/13.04/templates/web/suspend/.htaccess b/install/ubuntu/13.04/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/13.04/templates/web/suspend/index.html b/install/ubuntu/13.04/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/13.04/templates/web/webalizer/webalizer.tpl b/install/ubuntu/13.04/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/13.04/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/13.04/vsftpd/vsftpd.conf b/install/ubuntu/13.04/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/13.04/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/13.10/apache2/apache2.conf b/install/ubuntu/13.10/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/13.10/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/13.10/apache2/status.conf b/install/ubuntu/13.10/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/13.10/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/13.10/bind/named.conf b/install/ubuntu/13.10/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/13.10/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/13.10/clamav/clamd.conf b/install/ubuntu/13.10/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/13.10/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/13.10/deb_signing.key b/install/ubuntu/13.10/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/13.10/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/13.10/dovecot/conf.d/10-auth.conf b/install/ubuntu/13.10/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/13.10/dovecot/conf.d/10-logging.conf b/install/ubuntu/13.10/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/13.10/dovecot/conf.d/10-mail.conf b/install/ubuntu/13.10/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/13.10/dovecot/conf.d/10-master.conf b/install/ubuntu/13.10/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/13.10/dovecot/conf.d/10-ssl.conf b/install/ubuntu/13.10/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/13.10/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/13.10/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/13.10/dovecot/dovecot.conf b/install/ubuntu/13.10/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/13.10/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/13.10/exim/dnsbl.conf b/install/ubuntu/13.10/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/13.10/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/13.10/exim/exim4.conf.template b/install/ubuntu/13.10/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/13.10/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/13.10/exim/spam-blocks.conf b/install/ubuntu/13.10/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/13.10/fail2ban/action.d/vesta.conf b/install/ubuntu/13.10/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/13.10/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/13.10/fail2ban/filter.d/vesta.conf b/install/ubuntu/13.10/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/13.10/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/13.10/fail2ban/jail.local b/install/ubuntu/13.10/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/13.10/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/13.10/firewall/ports.conf b/install/ubuntu/13.10/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/13.10/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/13.10/firewall/rules.conf b/install/ubuntu/13.10/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/13.10/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/13.10/logrotate/apache2 b/install/ubuntu/13.10/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/13.10/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/13.10/logrotate/nginx b/install/ubuntu/13.10/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/13.10/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/13.10/logrotate/vesta b/install/ubuntu/13.10/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/13.10/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/13.10/mysql/my-large.cnf b/install/ubuntu/13.10/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/13.10/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/13.10/mysql/my-medium.cnf b/install/ubuntu/13.10/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/13.10/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/13.10/mysql/my-small.cnf b/install/ubuntu/13.10/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/13.10/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/13.10/nginx/nginx.conf b/install/ubuntu/13.10/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/13.10/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/13.10/nginx/phpmyadmin.inc b/install/ubuntu/13.10/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/13.10/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/13.10/nginx/phppgadmin.inc b/install/ubuntu/13.10/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/13.10/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/13.10/nginx/status.conf b/install/ubuntu/13.10/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/13.10/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/13.10/nginx/webmail.inc b/install/ubuntu/13.10/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/13.10/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/13.10/packages/default.pkg b/install/ubuntu/13.10/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/13.10/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/13.10/packages/gainsboro.pkg b/install/ubuntu/13.10/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/13.10/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/13.10/packages/palegreen.pkg b/install/ubuntu/13.10/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/13.10/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/13.10/packages/slategrey.pkg b/install/ubuntu/13.10/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/13.10/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/13.10/pga/config.inc.php b/install/ubuntu/13.10/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/13.10/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/13.10/pga/phppgadmin.conf b/install/ubuntu/13.10/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/13.10/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/13.10/php5-fpm/www.conf b/install/ubuntu/13.10/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/13.10/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/13.10/pma/apache.conf b/install/ubuntu/13.10/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/13.10/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/13.10/pma/config.inc.php b/install/ubuntu/13.10/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/13.10/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/13.10/roundcube/apache.conf b/install/ubuntu/13.10/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/13.10/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/13.10/roundcube/config.inc.php b/install/ubuntu/13.10/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/13.10/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/13.10/roundcube/main.inc.php b/install/ubuntu/13.10/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/13.10/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/13.10/roundcube/vesta.php b/install/ubuntu/13.10/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/13.10/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/13.10/sudo/admin b/install/ubuntu/13.10/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/13.10/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/13.10/templates/dns/child-ns.tpl b/install/ubuntu/13.10/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/13.10/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/13.10/templates/dns/default.tpl b/install/ubuntu/13.10/templates/dns/default.tpl
new file mode 100755
index 000000000..38f963006
--- /dev/null
+++ b/install/ubuntu/13.10/templates/dns/default.tpl
@@ -0,0 +1,9 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/13.10/templates/dns/gmail.tpl b/install/ubuntu/13.10/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/13.10/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/13.10/templates/web/apache2/basedir.stpl b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..3f71e6999
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/basedir.tpl b/install/ubuntu/13.10/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..75daf0e10
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/default.stpl b/install/ubuntu/13.10/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..e884a95b9
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/default.tpl b/install/ubuntu/13.10/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..073724ce0
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/hosting.stpl b/install/ubuntu/13.10/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..7a5d7787f
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/hosting.tpl b/install/ubuntu/13.10/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..ab844dc74
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/phpcgi.sh b/install/ubuntu/13.10/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..aa5137308
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..a05ff252d
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.sh b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..622495756
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..5c1f16e20
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/awstats/awstats.tpl b/install/ubuntu/13.10/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/13.10/templates/web/awstats/index.tpl b/install/ubuntu/13.10/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/awstats/nav.tpl b/install/ubuntu/13.10/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/nginx/caching.sh b/install/ubuntu/13.10/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/13.10/templates/web/nginx/caching.stpl b/install/ubuntu/13.10/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/caching.tpl b/install/ubuntu/13.10/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/default.stpl b/install/ubuntu/13.10/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.10/templates/web/nginx/default.tpl b/install/ubuntu/13.10/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.10/templates/web/nginx/hosting.sh b/install/ubuntu/13.10/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/13.10/templates/web/nginx/hosting.stpl b/install/ubuntu/13.10/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.10/templates/web/nginx/hosting.tpl b/install/ubuntu/13.10/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/13.10/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/13.10/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/13.10/templates/web/php5-fpm/default.tpl b/install/ubuntu/13.10/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/13.10/templates/web/php5-fpm/socket.tpl b/install/ubuntu/13.10/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/13.10/templates/web/skel/document_errors/403.html b/install/ubuntu/13.10/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/skel/document_errors/404.html b/install/ubuntu/13.10/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/skel/document_errors/50x.html b/install/ubuntu/13.10/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/skel/public_html/index.html b/install/ubuntu/13.10/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/skel/public_html/robots.txt b/install/ubuntu/13.10/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/13.10/templates/web/skel/public_shtml/index.html b/install/ubuntu/13.10/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/13.10/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/13.10/templates/web/suspend/.htaccess b/install/ubuntu/13.10/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/13.10/templates/web/suspend/index.html b/install/ubuntu/13.10/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/13.10/templates/web/webalizer/webalizer.tpl b/install/ubuntu/13.10/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/13.10/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/13.10/vsftpd/vsftpd.conf b/install/ubuntu/13.10/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/13.10/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/14.04/apache2/apache2.conf b/install/ubuntu/14.04/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/14.04/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/14.04/apache2/status.conf b/install/ubuntu/14.04/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/14.04/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/14.04/bind/named.conf b/install/ubuntu/14.04/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/14.04/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/14.04/clamav/clamd.conf b/install/ubuntu/14.04/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/14.04/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/14.04/deb_signing.key b/install/ubuntu/14.04/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/14.04/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/14.04/dovecot/conf.d/10-auth.conf b/install/ubuntu/14.04/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/14.04/dovecot/conf.d/10-logging.conf b/install/ubuntu/14.04/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/14.04/dovecot/conf.d/10-mail.conf b/install/ubuntu/14.04/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/14.04/dovecot/conf.d/10-master.conf b/install/ubuntu/14.04/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/14.04/dovecot/conf.d/10-ssl.conf b/install/ubuntu/14.04/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/14.04/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/14.04/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/14.04/dovecot/dovecot.conf b/install/ubuntu/14.04/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/14.04/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/14.04/exim/dnsbl.conf b/install/ubuntu/14.04/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/14.04/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/14.04/exim/exim4.conf.template b/install/ubuntu/14.04/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/14.04/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/14.04/exim/spam-blocks.conf b/install/ubuntu/14.04/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/14.04/fail2ban/action.d/vesta.conf b/install/ubuntu/14.04/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/14.04/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/14.04/fail2ban/filter.d/vesta.conf b/install/ubuntu/14.04/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/14.04/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/14.04/fail2ban/jail.local b/install/ubuntu/14.04/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/14.04/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/14.04/firewall/ports.conf b/install/ubuntu/14.04/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/14.04/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/14.04/firewall/rules.conf b/install/ubuntu/14.04/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/14.04/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/14.04/logrotate/apache2 b/install/ubuntu/14.04/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/14.04/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/14.04/logrotate/nginx b/install/ubuntu/14.04/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/14.04/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/14.04/logrotate/vesta b/install/ubuntu/14.04/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/14.04/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/14.04/mysql/my-large.cnf b/install/ubuntu/14.04/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/14.04/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/14.04/mysql/my-medium.cnf b/install/ubuntu/14.04/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/14.04/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/14.04/mysql/my-small.cnf b/install/ubuntu/14.04/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/14.04/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/14.04/nginx/nginx.conf b/install/ubuntu/14.04/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/14.04/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/14.04/nginx/phpmyadmin.inc b/install/ubuntu/14.04/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/14.04/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/14.04/nginx/phppgadmin.inc b/install/ubuntu/14.04/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/14.04/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/14.04/nginx/status.conf b/install/ubuntu/14.04/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/14.04/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/14.04/nginx/webmail.inc b/install/ubuntu/14.04/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/14.04/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/14.04/packages/default.pkg b/install/ubuntu/14.04/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/14.04/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/14.04/packages/gainsboro.pkg b/install/ubuntu/14.04/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/14.04/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/14.04/packages/palegreen.pkg b/install/ubuntu/14.04/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/14.04/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/14.04/packages/slategrey.pkg b/install/ubuntu/14.04/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/14.04/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/14.04/pga/config.inc.php b/install/ubuntu/14.04/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/14.04/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/14.04/pga/phppgadmin.conf b/install/ubuntu/14.04/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/14.04/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/14.04/php5-fpm/www.conf b/install/ubuntu/14.04/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/14.04/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/14.04/pma/apache.conf b/install/ubuntu/14.04/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/14.04/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/14.04/pma/config.inc.php b/install/ubuntu/14.04/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/14.04/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/14.04/roundcube/apache.conf b/install/ubuntu/14.04/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/14.04/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/14.04/roundcube/config.inc.php b/install/ubuntu/14.04/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/14.04/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/14.04/roundcube/main.inc.php b/install/ubuntu/14.04/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/14.04/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/14.04/roundcube/vesta.php b/install/ubuntu/14.04/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/14.04/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/14.04/sudo/admin b/install/ubuntu/14.04/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/14.04/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/14.04/templates/dns/child-ns.tpl b/install/ubuntu/14.04/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/14.04/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/14.04/templates/dns/default.tpl b/install/ubuntu/14.04/templates/dns/default.tpl
new file mode 100755
index 000000000..38f963006
--- /dev/null
+++ b/install/ubuntu/14.04/templates/dns/default.tpl
@@ -0,0 +1,9 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/14.04/templates/dns/gmail.tpl b/install/ubuntu/14.04/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/14.04/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/14.04/templates/web/apache2/basedir.stpl b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..3f71e6999
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/basedir.tpl b/install/ubuntu/14.04/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..75daf0e10
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/default.stpl b/install/ubuntu/14.04/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..e884a95b9
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/default.tpl b/install/ubuntu/14.04/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..073724ce0
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/hosting.stpl b/install/ubuntu/14.04/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..7a5d7787f
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/hosting.tpl b/install/ubuntu/14.04/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..ab844dc74
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/phpcgi.sh b/install/ubuntu/14.04/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..aa5137308
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..a05ff252d
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.sh b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..622495756
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..5c1f16e20
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/awstats/awstats.tpl b/install/ubuntu/14.04/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/14.04/templates/web/awstats/index.tpl b/install/ubuntu/14.04/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/awstats/nav.tpl b/install/ubuntu/14.04/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/nginx/caching.sh b/install/ubuntu/14.04/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/14.04/templates/web/nginx/caching.stpl b/install/ubuntu/14.04/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/caching.tpl b/install/ubuntu/14.04/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/default.stpl b/install/ubuntu/14.04/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.04/templates/web/nginx/default.tpl b/install/ubuntu/14.04/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.04/templates/web/nginx/hosting.sh b/install/ubuntu/14.04/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/14.04/templates/web/nginx/hosting.stpl b/install/ubuntu/14.04/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.04/templates/web/nginx/hosting.tpl b/install/ubuntu/14.04/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.04/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/14.04/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/14.04/templates/web/php5-fpm/default.tpl b/install/ubuntu/14.04/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/14.04/templates/web/php5-fpm/socket.tpl b/install/ubuntu/14.04/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/14.04/templates/web/skel/document_errors/403.html b/install/ubuntu/14.04/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/skel/document_errors/404.html b/install/ubuntu/14.04/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/skel/document_errors/50x.html b/install/ubuntu/14.04/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/skel/public_html/index.html b/install/ubuntu/14.04/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/skel/public_html/robots.txt b/install/ubuntu/14.04/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/14.04/templates/web/skel/public_shtml/index.html b/install/ubuntu/14.04/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/14.04/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/14.04/templates/web/suspend/.htaccess b/install/ubuntu/14.04/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/14.04/templates/web/suspend/index.html b/install/ubuntu/14.04/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/14.04/templates/web/webalizer/webalizer.tpl b/install/ubuntu/14.04/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/14.04/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/14.04/vsftpd/vsftpd.conf b/install/ubuntu/14.04/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/14.04/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/14.10/apache2/apache2.conf b/install/ubuntu/14.10/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/14.10/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/14.10/apache2/status.conf b/install/ubuntu/14.10/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/14.10/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/14.10/bind/named.conf b/install/ubuntu/14.10/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/14.10/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/14.10/clamav/clamd.conf b/install/ubuntu/14.10/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/14.10/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/14.10/deb_signing.key b/install/ubuntu/14.10/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/14.10/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/14.10/dovecot/conf.d/10-auth.conf b/install/ubuntu/14.10/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/14.10/dovecot/conf.d/10-logging.conf b/install/ubuntu/14.10/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/14.10/dovecot/conf.d/10-mail.conf b/install/ubuntu/14.10/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/14.10/dovecot/conf.d/10-master.conf b/install/ubuntu/14.10/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/14.10/dovecot/conf.d/10-ssl.conf b/install/ubuntu/14.10/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/14.10/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/14.10/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/14.10/dovecot/dovecot.conf b/install/ubuntu/14.10/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/14.10/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/14.10/exim/dnsbl.conf b/install/ubuntu/14.10/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/14.10/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/14.10/exim/exim4.conf.template b/install/ubuntu/14.10/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/14.10/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/14.10/exim/spam-blocks.conf b/install/ubuntu/14.10/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/14.10/fail2ban/action.d/vesta.conf b/install/ubuntu/14.10/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/14.10/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/14.10/fail2ban/filter.d/vesta.conf b/install/ubuntu/14.10/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/14.10/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/14.10/fail2ban/jail.local b/install/ubuntu/14.10/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/14.10/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/14.10/firewall/ports.conf b/install/ubuntu/14.10/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/14.10/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/14.10/firewall/rules.conf b/install/ubuntu/14.10/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/14.10/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/14.10/logrotate/apache2 b/install/ubuntu/14.10/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/14.10/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/14.10/logrotate/nginx b/install/ubuntu/14.10/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/14.10/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/14.10/logrotate/vesta b/install/ubuntu/14.10/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/14.10/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/14.10/mysql/my-large.cnf b/install/ubuntu/14.10/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/14.10/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/14.10/mysql/my-medium.cnf b/install/ubuntu/14.10/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/14.10/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/14.10/mysql/my-small.cnf b/install/ubuntu/14.10/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/14.10/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/14.10/nginx/nginx.conf b/install/ubuntu/14.10/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/14.10/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/14.10/nginx/phpmyadmin.inc b/install/ubuntu/14.10/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/14.10/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/14.10/nginx/phppgadmin.inc b/install/ubuntu/14.10/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/14.10/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/14.10/nginx/status.conf b/install/ubuntu/14.10/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/14.10/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/14.10/nginx/webmail.inc b/install/ubuntu/14.10/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/14.10/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/14.10/packages/default.pkg b/install/ubuntu/14.10/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/14.10/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/14.10/packages/gainsboro.pkg b/install/ubuntu/14.10/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/14.10/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/14.10/packages/palegreen.pkg b/install/ubuntu/14.10/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/14.10/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/14.10/packages/slategrey.pkg b/install/ubuntu/14.10/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/14.10/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/14.10/pga/config.inc.php b/install/ubuntu/14.10/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/14.10/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/14.10/pga/phppgadmin.conf b/install/ubuntu/14.10/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/14.10/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/14.10/php5-fpm/www.conf b/install/ubuntu/14.10/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/14.10/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/14.10/pma/apache.conf b/install/ubuntu/14.10/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/14.10/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/14.10/pma/config.inc.php b/install/ubuntu/14.10/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/14.10/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/14.10/roundcube/apache.conf b/install/ubuntu/14.10/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/14.10/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/14.10/roundcube/config.inc.php b/install/ubuntu/14.10/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/14.10/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/14.10/roundcube/main.inc.php b/install/ubuntu/14.10/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/14.10/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/14.10/roundcube/vesta.php b/install/ubuntu/14.10/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/14.10/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/14.10/sudo/admin b/install/ubuntu/14.10/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/14.10/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/14.10/templates/dns/child-ns.tpl b/install/ubuntu/14.10/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/14.10/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/14.10/templates/dns/default.tpl b/install/ubuntu/14.10/templates/dns/default.tpl
new file mode 100755
index 000000000..38f963006
--- /dev/null
+++ b/install/ubuntu/14.10/templates/dns/default.tpl
@@ -0,0 +1,9 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/14.10/templates/dns/gmail.tpl b/install/ubuntu/14.10/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/14.10/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/14.10/templates/web/apache2/basedir.stpl b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..3f71e6999
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/basedir.tpl b/install/ubuntu/14.10/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..75daf0e10
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/default.stpl b/install/ubuntu/14.10/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..e884a95b9
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/default.tpl b/install/ubuntu/14.10/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..073724ce0
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/hosting.stpl b/install/ubuntu/14.10/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..7a5d7787f
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/hosting.tpl b/install/ubuntu/14.10/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..ab844dc74
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/phpcgi.sh b/install/ubuntu/14.10/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..aa5137308
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..a05ff252d
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.sh b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..622495756
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..5c1f16e20
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/awstats/awstats.tpl b/install/ubuntu/14.10/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/14.10/templates/web/awstats/index.tpl b/install/ubuntu/14.10/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/awstats/nav.tpl b/install/ubuntu/14.10/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/nginx/caching.sh b/install/ubuntu/14.10/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/14.10/templates/web/nginx/caching.stpl b/install/ubuntu/14.10/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/caching.tpl b/install/ubuntu/14.10/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/default.stpl b/install/ubuntu/14.10/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.10/templates/web/nginx/default.tpl b/install/ubuntu/14.10/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.10/templates/web/nginx/hosting.sh b/install/ubuntu/14.10/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/14.10/templates/web/nginx/hosting.stpl b/install/ubuntu/14.10/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.10/templates/web/nginx/hosting.tpl b/install/ubuntu/14.10/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/14.10/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/14.10/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/14.10/templates/web/php5-fpm/default.tpl b/install/ubuntu/14.10/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/14.10/templates/web/php5-fpm/socket.tpl b/install/ubuntu/14.10/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/14.10/templates/web/skel/document_errors/403.html b/install/ubuntu/14.10/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/skel/document_errors/404.html b/install/ubuntu/14.10/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/skel/document_errors/50x.html b/install/ubuntu/14.10/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/skel/public_html/index.html b/install/ubuntu/14.10/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/skel/public_html/robots.txt b/install/ubuntu/14.10/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/14.10/templates/web/skel/public_shtml/index.html b/install/ubuntu/14.10/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/14.10/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/14.10/templates/web/suspend/.htaccess b/install/ubuntu/14.10/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/14.10/templates/web/suspend/index.html b/install/ubuntu/14.10/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/14.10/templates/web/webalizer/webalizer.tpl b/install/ubuntu/14.10/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/14.10/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/14.10/vsftpd/vsftpd.conf b/install/ubuntu/14.10/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/14.10/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/15.04/apache2/apache2.conf b/install/ubuntu/15.04/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/15.04/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/15.04/apache2/status.conf b/install/ubuntu/15.04/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/15.04/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/15.04/bind/named.conf b/install/ubuntu/15.04/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/15.04/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/15.04/clamav/clamd.conf b/install/ubuntu/15.04/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/15.04/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/15.04/deb_signing.key b/install/ubuntu/15.04/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/15.04/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/15.04/dovecot/conf.d/10-auth.conf b/install/ubuntu/15.04/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/15.04/dovecot/conf.d/10-logging.conf b/install/ubuntu/15.04/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/15.04/dovecot/conf.d/10-mail.conf b/install/ubuntu/15.04/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/15.04/dovecot/conf.d/10-master.conf b/install/ubuntu/15.04/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/15.04/dovecot/conf.d/10-ssl.conf b/install/ubuntu/15.04/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/15.04/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/15.04/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/15.04/dovecot/dovecot.conf b/install/ubuntu/15.04/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/15.04/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/15.04/exim/dnsbl.conf b/install/ubuntu/15.04/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/15.04/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/15.04/exim/exim4.conf.template b/install/ubuntu/15.04/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/15.04/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/15.04/exim/spam-blocks.conf b/install/ubuntu/15.04/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/15.04/fail2ban/action.d/vesta.conf b/install/ubuntu/15.04/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/15.04/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/ubuntu/15.04/fail2ban/filter.d/vesta.conf b/install/ubuntu/15.04/fail2ban/filter.d/vesta.conf
new file mode 100644
index 000000000..36ec10019
--- /dev/null
+++ b/install/ubuntu/15.04/fail2ban/filter.d/vesta.conf
@@ -0,0 +1,10 @@
+# Fail2Ban filter for unsuccessful Vesta authentication attempts
+#
+
+[INCLUDES]
+before = common.conf
+
+[Definition]
+failregex = .* failed to login
+ignoreregex =
+
diff --git a/install/ubuntu/15.04/fail2ban/jail.local b/install/ubuntu/15.04/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/15.04/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/15.04/firewall/ports.conf b/install/ubuntu/15.04/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/15.04/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/15.04/firewall/rules.conf b/install/ubuntu/15.04/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/15.04/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/15.04/logrotate/apache2 b/install/ubuntu/15.04/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/15.04/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/15.04/logrotate/nginx b/install/ubuntu/15.04/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/15.04/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/15.04/logrotate/vesta b/install/ubuntu/15.04/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/15.04/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/15.04/mysql/my-large.cnf b/install/ubuntu/15.04/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/15.04/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/15.04/mysql/my-medium.cnf b/install/ubuntu/15.04/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/15.04/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/15.04/mysql/my-small.cnf b/install/ubuntu/15.04/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/15.04/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/15.04/nginx/nginx.conf b/install/ubuntu/15.04/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/15.04/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/15.04/nginx/phpmyadmin.inc b/install/ubuntu/15.04/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/15.04/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/15.04/nginx/phppgadmin.inc b/install/ubuntu/15.04/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/15.04/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/15.04/nginx/status.conf b/install/ubuntu/15.04/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/15.04/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/15.04/nginx/webmail.inc b/install/ubuntu/15.04/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/15.04/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/15.04/packages/default.pkg b/install/ubuntu/15.04/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/15.04/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/15.04/packages/gainsboro.pkg b/install/ubuntu/15.04/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/15.04/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/15.04/packages/palegreen.pkg b/install/ubuntu/15.04/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/15.04/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/15.04/packages/slategrey.pkg b/install/ubuntu/15.04/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/15.04/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/15.04/pga/config.inc.php b/install/ubuntu/15.04/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/15.04/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/15.04/pga/phppgadmin.conf b/install/ubuntu/15.04/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/15.04/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/15.04/php5-fpm/www.conf b/install/ubuntu/15.04/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/15.04/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/15.04/pma/apache.conf b/install/ubuntu/15.04/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/15.04/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/15.04/pma/config.inc.php b/install/ubuntu/15.04/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/15.04/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/15.04/roundcube/apache.conf b/install/ubuntu/15.04/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/15.04/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/15.04/roundcube/config.inc.php b/install/ubuntu/15.04/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/15.04/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/15.04/roundcube/main.inc.php b/install/ubuntu/15.04/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/15.04/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/15.04/roundcube/vesta.php b/install/ubuntu/15.04/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/15.04/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/15.04/sudo/admin b/install/ubuntu/15.04/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/15.04/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/15.04/templates/dns/child-ns.tpl b/install/ubuntu/15.04/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/15.04/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/15.04/templates/dns/default.tpl b/install/ubuntu/15.04/templates/dns/default.tpl
new file mode 100755
index 000000000..942c15bc8
--- /dev/null
+++ b/install/ubuntu/15.04/templates/dns/default.tpl
@@ -0,0 +1,15 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns3%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns4%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns5%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns6%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns7%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns8%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/15.04/templates/dns/gmail.tpl b/install/ubuntu/15.04/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/15.04/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/15.04/templates/web/apache2/basedir.stpl b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..3f71e6999
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/basedir.tpl b/install/ubuntu/15.04/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..75daf0e10
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/default.stpl b/install/ubuntu/15.04/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..e884a95b9
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/default.tpl b/install/ubuntu/15.04/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..073724ce0
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/hosting.stpl b/install/ubuntu/15.04/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..7a5d7787f
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/hosting.tpl b/install/ubuntu/15.04/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..ab844dc74
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/phpcgi.sh b/install/ubuntu/15.04/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..aa5137308
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..a05ff252d
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.sh b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..622495756
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..5c1f16e20
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/awstats/awstats.tpl b/install/ubuntu/15.04/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/15.04/templates/web/awstats/index.tpl b/install/ubuntu/15.04/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/awstats/nav.tpl b/install/ubuntu/15.04/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/nginx/caching.sh b/install/ubuntu/15.04/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/15.04/templates/web/nginx/caching.stpl b/install/ubuntu/15.04/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/caching.tpl b/install/ubuntu/15.04/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/default.stpl b/install/ubuntu/15.04/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.04/templates/web/nginx/default.tpl b/install/ubuntu/15.04/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.04/templates/web/nginx/hosting.sh b/install/ubuntu/15.04/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/15.04/templates/web/nginx/hosting.stpl b/install/ubuntu/15.04/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.04/templates/web/nginx/hosting.tpl b/install/ubuntu/15.04/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.04/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/15.04/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/15.04/templates/web/php5-fpm/default.tpl b/install/ubuntu/15.04/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/15.04/templates/web/php5-fpm/socket.tpl b/install/ubuntu/15.04/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/15.04/templates/web/skel/document_errors/403.html b/install/ubuntu/15.04/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/skel/document_errors/404.html b/install/ubuntu/15.04/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/skel/document_errors/50x.html b/install/ubuntu/15.04/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/skel/public_html/index.html b/install/ubuntu/15.04/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/skel/public_html/robots.txt b/install/ubuntu/15.04/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/15.04/templates/web/skel/public_shtml/index.html b/install/ubuntu/15.04/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/15.04/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/15.04/templates/web/suspend/.htaccess b/install/ubuntu/15.04/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/15.04/templates/web/suspend/index.html b/install/ubuntu/15.04/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/15.04/templates/web/webalizer/webalizer.tpl b/install/ubuntu/15.04/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/15.04/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/15.04/vsftpd/vsftpd.conf b/install/ubuntu/15.04/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/15.04/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/15.10/apache2/apache2.conf b/install/ubuntu/15.10/apache2/apache2.conf
new file mode 100644
index 000000000..221780117
--- /dev/null
+++ b/install/ubuntu/15.10/apache2/apache2.conf
@@ -0,0 +1,86 @@
+# It is split into several files forming the configuration hierarchy outlined
+# below, all located in the /etc/apache2/ directory:
+#
+# /etc/apache2/
+# |-- apache2.conf
+# | `-- ports.conf
+# |-- mods-enabled
+# | |-- *.load
+# | `-- *.conf
+# |-- conf.d
+# | `-- *
+
+# Global configuration
+PidFile ${APACHE_PID_FILE}
+Timeout 30
+KeepAlive Off
+MaxKeepAliveRequests 100
+KeepAliveTimeout 10
+
+
+ StartServers 8
+ MinSpareServers 5
+ MaxSpareServers 20
+ ServerLimit 256
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 200
+ MaxRequestsPerChild 4000
+
+
+# These need to be set in /etc/apache2/envvars
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+#User www-data
+#Group www-data
+
+AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+DefaultType None
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+# Include module configuration:
+Include mods-enabled/*.load
+Include mods-enabled/*.conf
+
+# Include list of ports to listen on and which to use for name based vhosts
+Include ports.conf
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+LogFormat "%b" bytes
+
+Include conf.d/
+
+# Include the virtual host configurations:
+#Include sites-enabled/
diff --git a/install/ubuntu/15.10/apache2/status.conf b/install/ubuntu/15.10/apache2/status.conf
new file mode 100644
index 000000000..da9d96333
--- /dev/null
+++ b/install/ubuntu/15.10/apache2/status.conf
@@ -0,0 +1,8 @@
+Listen 127.0.0.1:8081
+
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from all
+
diff --git a/install/ubuntu/15.10/bind/named.conf b/install/ubuntu/15.10/bind/named.conf
new file mode 100644
index 000000000..ed6ece885
--- /dev/null
+++ b/install/ubuntu/15.10/bind/named.conf
@@ -0,0 +1,12 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
+
diff --git a/install/ubuntu/15.10/clamav/clamd.conf b/install/ubuntu/15.10/clamav/clamd.conf
new file mode 100644
index 000000000..ea982697a
--- /dev/null
+++ b/install/ubuntu/15.10/clamav/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose true
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 60000
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/install/ubuntu/15.10/deb_signing.key b/install/ubuntu/15.10/deb_signing.key
new file mode 100644
index 000000000..2ad2db8bc
--- /dev/null
+++ b/install/ubuntu/15.10/deb_signing.key
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQENBFJIGbEBCAC8SHOOFo7iDTbnC2GhNZ+uBGCh226Dn1QPoFZNFM/DNakHZ6rD
+G3wzr8++eKz4fJual/VLllE2N9XDPuxbozb3LLkcyY1WzJqtIXbXhFGQ/SuIeT+x
+QY90XU6t2Ckze2c+zUniAWmJ8GSyVmXOoc9JxAQ1u47wvGXLzrjWXc8u8PNRYXuf
+fZplTL+dFu9P0d6lP8FGsV+r9wXvvazpRTz3+H8PKrGCYT55ZQIEdG9Jgamylto2
+oVPFXkwGML+TLw6oeCIBuz2y2vtivphW4MJ3ifQjDj7k3n+DTIxfDFs8lB6VRhhY
+2nMHCrcZC6U2mhmXmr6O4s1fu6irBVx05ejPABEBAAG0IFNlcmdoZXkgUm9kaW4g
+PHNraWRAdmVzdGFjcC5jb20+iQE4BBMBAgAiBQJSSBmxAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRBCxbITCh93FPdqB/93GjV9g+wBfeZYLHQK9MDU2wBb
+VloYOJJae6IvYKYQVAJayD3PbHdpxrF8s9e23vdnmb9jKu6jX6oV54EIyqP2HPiN
+QYc8wcea+eSHerznBixCtoQh8mtdWGFeN71zU/ig7L5qlOVF/EmxDVZTFUeivFxh
+IV6qyBnktQKktE45585yKZyyLtfGoXA54DGK69OtJFh+wdkKEMmUXocMl7wUrxW6
+Cx2CuKeEXEgvwu8mRHQi3S3T9XP456qWEn5dWyMVcP660IzEuZfSJApZusNK7zG3
+WMy0/EuX7xHNY3mcNxTOUN1LsO7iHnhHD9+iKWJo9parGkMZzc92MpjDK/g7uQEN
+BFJIGbEBCAC7k5QEA9WQM7E3ceNaeLMrA9lXfuzaNCcySq7ONdVAa5PxzbSKdHvz
+QFoL1VFqBTYQ038lbil1XqnoM0zvIfAI3LcpS8sq92El/vPxp6jZh2Ari9Uw7x95
+k2cZMgI67g+zQMGdjVRA155nFQRCgg000xU4F7JA6+WsuLlVUmccsDv7YWJExMtC
+YPxiuz5DFu8RALnw4Ckts+dbwsrcvUHhkm9b6RAsdCKjjRpUZjLgdltjH83gUVvt
+i1YmdjjsVpt95dtsaG+ad852g/Rk8EdxNMkjPF6HLA67CLADP9wYaj80yPcPtylS
+ycvPtcclVeHkFBRVM8xZpQd4iD19MWI1ABEBAAGJAR8EGAECAAkFAlJIGbECGwwA
+CgkQQsWyEwofdxQ7tQgAhB0FwTs7L8Qr63DHC2yAnXVxgtTAY1/36CccNXVculyR
++EkLcwahms9AKhz7eQb+Mud+5vH0GRohLp2npgO38CjVUfIP5d+Y6dsthmrkF6p8
+XdV1dVK9vWX+i/YZSw/Mded30Cq4P2Yhq9EaemMT0rtli8lz2NnkZ9dFJZk1lzJC
+CZmRpbjSNWqRU4f7qyh21lYk/OC/0XE8fh8CaO23TZ+6gBionoCztwb7NyC9OArN
+qYlNnbmh9iNqdblykPS3bkjf34n2xyMgnIehNrM89tk8PY4UfNPhgT1TMD9W3Svq
+ynNZvLuF/FIDwDeC1qcfjGbfDn9fXO/lMIIRooQYKQ==
+=J2HJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/install/ubuntu/15.10/dovecot/conf.d/10-auth.conf b/install/ubuntu/15.10/dovecot/conf.d/10-auth.conf
new file mode 100644
index 000000000..dfcc83110
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/conf.d/10-auth.conf
@@ -0,0 +1,4 @@
+disable_plaintext_auth = no
+auth_verbose = yes
+auth_mechanisms = plain login
+!include auth-passwdfile.conf.ext
diff --git a/install/ubuntu/15.10/dovecot/conf.d/10-logging.conf b/install/ubuntu/15.10/dovecot/conf.d/10-logging.conf
new file mode 100644
index 000000000..a5f207d51
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/conf.d/10-logging.conf
@@ -0,0 +1 @@
+log_path = /var/log/dovecot.log
diff --git a/install/ubuntu/15.10/dovecot/conf.d/10-mail.conf b/install/ubuntu/15.10/dovecot/conf.d/10-mail.conf
new file mode 100644
index 000000000..55313419e
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/conf.d/10-mail.conf
@@ -0,0 +1,4 @@
+mail_privileged_group = mail
+mail_access_groups = mail
+mail_location = maildir:%h/mail/%d/%n
+pop3_uidl_format = %08Xu%08Xv
diff --git a/install/ubuntu/15.10/dovecot/conf.d/10-master.conf b/install/ubuntu/15.10/dovecot/conf.d/10-master.conf
new file mode 100644
index 000000000..a75a9aaa4
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/conf.d/10-master.conf
@@ -0,0 +1,29 @@
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+
+
+service imap {
+}
+
+service pop3 {
+}
+
+service auth {
+ unix_listener auth-client {
+ group = mail
+ mode = 0660
+ user = dovecot
+ }
+ user = dovecot
+}
diff --git a/install/ubuntu/15.10/dovecot/conf.d/10-ssl.conf b/install/ubuntu/15.10/dovecot/conf.d/10-ssl.conf
new file mode 100644
index 000000000..3aaff6eec
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/conf.d/10-ssl.conf
@@ -0,0 +1,3 @@
+ssl = yes
+ssl_cert = = 2.1.4) : %v.%u
+ # Dovecot v0.99.x : %v.%u
+ # tpop3d : %Mf
+ #
+ # Note that Outlook 2003 seems to have problems with %v.%u format which was
+ # Dovecot's default, so if you're building a new server it would be a good
+ # idea to change this. %08Xu%08Xv should be pretty fail-safe.
+ #
+ #pop3_uidl_format = %08Xu%08Xv
+
+ # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
+ # won't change those UIDLs. Currently this works only with Maildir.
+ #pop3_save_uidl = no
+
+ # What to do about duplicate UIDLs if they exist?
+ # allow: Show duplicates to clients.
+ # rename: Append a temporary -2, -3, etc. counter after the UIDL.
+ #pop3_uidl_duplicates = allow
+
+ # POP3 logout format string:
+ # %i - total number of bytes read from client
+ # %o - total number of bytes sent to client
+ # %t - number of TOP commands
+ # %p - number of bytes sent to client as a result of TOP command
+ # %r - number of RETR commands
+ # %b - number of bytes sent to client as a result of RETR command
+ # %d - number of deleted messages
+ # %m - number of messages (before deletion)
+ # %s - mailbox size in bytes (before deletion)
+ # %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
+ #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
+
+ # Maximum number of POP3 connections allowed for a user from each IP address.
+ # NOTE: The username is compared case-sensitively.
+ #mail_max_userip_connections = 10
+
+ # Space separated list of plugins to load (default is global mail_plugins).
+ #mail_plugins = $mail_plugins
+
+ # Workarounds for various client bugs:
+ # outlook-no-nuls:
+ # Outlook and Outlook Express hang if mails contain NUL characters.
+ # This setting replaces them with 0x80 character.
+ # oe-ns-eoh:
+ # Outlook Express and Netscape Mail breaks if end of headers-line is
+ # missing. This option simply sends it if it's missing.
+ # The list is space-separated.
+ #pop3_client_workarounds =
+}
diff --git a/install/ubuntu/15.10/dovecot/conf.d/auth-passwdfile.conf.ext b/install/ubuntu/15.10/dovecot/conf.d/auth-passwdfile.conf.ext
new file mode 100644
index 000000000..75e6e1152
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/conf.d/auth-passwdfile.conf.ext
@@ -0,0 +1,9 @@
+passdb {
+ driver = passwd-file
+ args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+}
+
+userdb {
+ driver = passwd-file
+ args = username_format=%n /etc/exim4/domains/%d/passwd
+}
diff --git a/install/ubuntu/15.10/dovecot/dovecot.conf b/install/ubuntu/15.10/dovecot/dovecot.conf
new file mode 100644
index 000000000..0a8553510
--- /dev/null
+++ b/install/ubuntu/15.10/dovecot/dovecot.conf
@@ -0,0 +1,4 @@
+protocols = imap pop3
+listen = *, ::
+base_dir = /var/run/dovecot/
+!include conf.d/*.conf
diff --git a/install/ubuntu/15.10/exim/dnsbl.conf b/install/ubuntu/15.10/exim/dnsbl.conf
new file mode 100644
index 000000000..5166b255e
--- /dev/null
+++ b/install/ubuntu/15.10/exim/dnsbl.conf
@@ -0,0 +1,2 @@
+bl.spamcop.net
+zen.spamhaus.org
diff --git a/install/ubuntu/15.10/exim/exim4.conf.template b/install/ubuntu/15.10/exim/exim4.conf.template
new file mode 100644
index 000000000..742f0409e
--- /dev/null
+++ b/install/ubuntu/15.10/exim/exim4.conf.template
@@ -0,0 +1,377 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/certificate.crt
+tls_privatekey = /usr/local/vesta/ssl/certificate.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 5s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+begin acl
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = *
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{100K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}}
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{yes}{no_such_user}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/$domain/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #helo_data = $sender_address_domain
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/$domain/autoreply.${local_part}.msg
+ from = "${local_part}@${domain}"
+ subject = "${if def:h_Subject: {Autoreply: ${quote:${escape:$h_Subject:}}} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
diff --git a/install/ubuntu/15.10/exim/spam-blocks.conf b/install/ubuntu/15.10/exim/spam-blocks.conf
new file mode 100644
index 000000000..e69de29bb
diff --git a/install/ubuntu/15.10/fail2ban/action.d/vesta.conf b/install/ubuntu/15.10/fail2ban/action.d/vesta.conf
new file mode 100644
index 000000000..0edfc3491
--- /dev/null
+++ b/install/ubuntu/15.10/fail2ban/action.d/vesta.conf
@@ -0,0 +1,9 @@
+# Fail2Ban configuration file for vesta
+
+[Definition]
+
+actionstart = /usr/local/vesta/bin/v-add-firewall-chain
+actionstop = /usr/local/vesta/bin/v-delete-firewall-chain
+actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-[ \t]'
+actionban = /usr/local/vesta/bin/v-add-firewall-ban
+actionunban = /usr/local/vesta/bin/v-delete-firewall-ban
diff --git a/install/debian/fail2ban.filter.conf b/install/ubuntu/15.10/fail2ban/filter.d/vesta.conf
similarity index 100%
rename from install/debian/fail2ban.filter.conf
rename to install/ubuntu/15.10/fail2ban/filter.d/vesta.conf
diff --git a/install/ubuntu/15.10/fail2ban/jail.local b/install/ubuntu/15.10/fail2ban/jail.local
new file mode 100644
index 000000000..eccea0685
--- /dev/null
+++ b/install/ubuntu/15.10/fail2ban/jail.local
@@ -0,0 +1,39 @@
+[ssh-iptables]
+enabled = true
+filter = sshd
+action = vesta[name=SSH]
+logpath = /var/log/auth.log
+maxretry = 5
+
+[vsftpd-iptables]
+enabled = false
+filter = vsftpd
+action = vesta[name=FTP]
+logpath = /var/log/vsftpd.log
+maxretry = 5
+
+[exim-iptables]
+enabled = true
+filter = exim
+action = vesta[name=MAIL]
+logpath = /var/log/exim4/mainlog
+
+[dovecot-iptables]
+enabled = true
+filter = dovecot
+action = vesta[name=MAIL]
+logpath = /var/log/dovecot.log
+
+[mysqld-iptables]
+enabled = false
+filter = mysqld-auth
+action = vesta[name=DB]
+logpath = /var/log/mysql.log
+maxretry = 5
+
+[vesta-iptables]
+enabled = true
+filter = vesta
+action = vesta[name=VESTA]
+logpath = /var/log/vesta/auth.log
+maxretry = 5
diff --git a/install/ubuntu/15.10/firewall/ports.conf b/install/ubuntu/15.10/firewall/ports.conf
new file mode 100644
index 000000000..a6ef4dae5
--- /dev/null
+++ b/install/ubuntu/15.10/firewall/ports.conf
@@ -0,0 +1,16 @@
+PROTOCOL='TCP' PORT='20'
+PROTOCOL='TCP' PORT='21'
+PROTOCOL='TCP' PORT='22'
+PROTOCOL='TCP' PORT='25'
+PROTOCOL='UDP' PORT='53'
+PROTOCOL='TCP' PORT='80'
+PROTOCOL='TCP' PORT='443'
+PROTOCOL='TCP' PORT='110'
+PROTOCOL='UDP' PORT='123'
+PROTOCOL='TCP' PORT='143'
+PROTOCOL='TCP' PORT='3306'
+PROTOCOL='TCP' PORT='5432'
+PROTOCOL='TCP' PORT='8080'
+PROTOCOL='TCP' PORT='8433'
+PROTOCOL='TCP' PORT='8083'
+PROTOCOL='TCP' PORT='12000:12100'
diff --git a/install/ubuntu/15.10/firewall/rules.conf b/install/ubuntu/15.10/firewall/rules.conf
new file mode 100644
index 000000000..956c2e1d9
--- /dev/null
+++ b/install/ubuntu/15.10/firewall/rules.conf
@@ -0,0 +1,10 @@
+RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
+RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
+RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
+RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
diff --git a/install/ubuntu/15.10/logrotate/apache2 b/install/ubuntu/15.10/logrotate/apache2
new file mode 100644
index 000000000..27629d0dd
--- /dev/null
+++ b/install/ubuntu/15.10/logrotate/apache2
@@ -0,0 +1,19 @@
+/var/log/apache2/*.log /var/log/apache2/domains/*log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null || true
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+ prerotate
+ if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+ run-parts /etc/logrotate.d/httpd-prerotate; \
+ fi; \
+ endscript
+}
diff --git a/install/ubuntu/15.10/logrotate/nginx b/install/ubuntu/15.10/logrotate/nginx
new file mode 100644
index 000000000..d667f2135
--- /dev/null
+++ b/install/ubuntu/15.10/logrotate/nginx
@@ -0,0 +1,13 @@
+/var/log/nginx/*log /var/log/nginx/domains/*log {
+ daily
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 nginx adm
+ sharedscripts
+ postrotate
+ [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+ endscript
+}
diff --git a/install/ubuntu/15.10/logrotate/vesta b/install/ubuntu/15.10/logrotate/vesta
new file mode 100644
index 000000000..027a34396
--- /dev/null
+++ b/install/ubuntu/15.10/logrotate/vesta
@@ -0,0 +1,7 @@
+/usr/local/vesta/log/*.log {
+ missingok
+ notifempty
+ size 30k
+ yearly
+ create 0600 root root
+}
diff --git a/install/ubuntu/15.10/mysql/my-large.cnf b/install/ubuntu/15.10/mysql/my-large.cnf
new file mode 100644
index 000000000..d0bab3907
--- /dev/null
+++ b/install/ubuntu/15.10/mysql/my-large.cnf
@@ -0,0 +1,42 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 256M
+max_allowed_packet = 32M
+table_open_cache = 256
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+thread_cache_size = 8
+query_cache_size= 16M
+thread_concurrency = 8
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=200
+max_user_connections=50
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/15.10/mysql/my-medium.cnf b/install/ubuntu/15.10/mysql/my-medium.cnf
new file mode 100644
index 000000000..1c10ab9a6
--- /dev/null
+++ b/install/ubuntu/15.10/mysql/my-medium.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 16M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=70
+max_user_connections=30
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/15.10/mysql/my-small.cnf b/install/ubuntu/15.10/mysql/my-small.cnf
new file mode 100644
index 000000000..26a804781
--- /dev/null
+++ b/install/ubuntu/15.10/mysql/my-small.cnf
@@ -0,0 +1,40 @@
+[client]
+port=3306
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld_safe]
+socket=/var/run/mysqld/mysqld.sock
+
+[mysqld]
+user=mysql
+pid-file=/var/run/mysqld/mysqld.pid
+socket=/var/run/mysqld/mysqld.sock
+port=3306
+basedir=/usr
+datadir=/var/lib/mysql
+tmpdir=/tmp
+lc-messages-dir=/usr/share/mysql
+log_error=/var/log/mysql/error.log
+
+symbolic-links=0
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+#innodb_use_native_aio = 0
+innodb_file_per_table
+
+max_connections=30
+max_user_connections=20
+wait_timeout=10
+interactive_timeout=50
+long_query_time=5
+
+!includedir /etc/mysql/conf.d/
diff --git a/install/ubuntu/15.10/nginx/nginx.conf b/install/ubuntu/15.10/nginx/nginx.conf
new file mode 100644
index 000000000..1e29f1fce
--- /dev/null
+++ b/install/ubuntu/15.10/nginx/nginx.conf
@@ -0,0 +1,124 @@
+# Server globals
+user www-data;
+worker_processes 2;
+error_log /var/log/nginx/error.log;
+pid /var/run/nginx.pid;
+
+
+# Worker config
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ # Main settings
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ client_header_timeout 1m;
+ client_body_timeout 1m;
+ client_header_buffer_size 2k;
+ client_body_buffer_size 256k;
+ client_max_body_size 256m;
+ large_client_header_buffers 4 8k;
+ send_timeout 30;
+ keepalive_timeout 60 60;
+ reset_timedout_connection on;
+ server_tokens off;
+ server_name_in_redirect off;
+ server_names_hash_max_size 512;
+ server_names_hash_bucket_size 512;
+
+
+ # Log format
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ log_format bytes '$body_bytes_sent';
+ #access_log /var/log/nginx/access.log main;
+ access_log off;
+
+
+ # Mime settings
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+
+ # Compression
+ gzip on;
+ gzip_comp_level 9;
+ gzip_min_length 512;
+ gzip_buffers 8 64k;
+ gzip_types text/plain text/css text/javascript
+ application/x-javascript application/javascript;
+ gzip_proxied any;
+
+
+ # Proxy settings
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass_header Set-Cookie;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 32 4k;
+
+
+ # Cloudflare https://www.cloudflare.com/ips
+ set_real_ip_from 199.27.128.0/21;
+ set_real_ip_from 173.245.48.0/20;
+ set_real_ip_from 103.21.244.0/22;
+ set_real_ip_from 103.22.200.0/22;
+ set_real_ip_from 103.31.4.0/22;
+ set_real_ip_from 141.101.64.0/18;
+ set_real_ip_from 108.162.192.0/18;
+ set_real_ip_from 190.93.240.0/20;
+ set_real_ip_from 188.114.96.0/20;
+ set_real_ip_from 197.234.240.0/22;
+ set_real_ip_from 198.41.128.0/17;
+ set_real_ip_from 162.158.0.0/15;
+ set_real_ip_from 104.16.0.0/12;
+ set_real_ip_from 172.64.0.0/13;
+ #set_real_ip_from 2400:cb00::/32;
+ #set_real_ip_from 2606:4700::/32;
+ #set_real_ip_from 2803:f800::/32;
+ #set_real_ip_from 2405:b500::/32;
+ #set_real_ip_from 2405:8100::/32;
+ real_ip_header CF-Connecting-IP;
+
+
+ # SSL PCI Compliance
+ ssl_session_cache shared:SSL:10m;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+
+
+ # Error pages
+ error_page 403 /error/403.html;
+ error_page 404 /error/404.html;
+ error_page 502 503 504 /error/50x.html;
+
+
+ # Cache
+ proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
+ proxy_cache_key "$host$request_uri $cookie_user";
+ proxy_temp_path /var/cache/nginx/temp;
+ proxy_ignore_headers Expires Cache-Control;
+ proxy_cache_use_stale error timeout invalid_header http_502;
+ proxy_cache_valid any 3d;
+
+ map $http_cookie $no_cache {
+ default 0;
+ ~SESS 1;
+ ~wordpress_logged_in 1;
+ }
+
+
+ # Wildcard include
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/install/ubuntu/15.10/nginx/phpmyadmin.inc b/install/ubuntu/15.10/nginx/phpmyadmin.inc
new file mode 100644
index 000000000..d70ca3e3c
--- /dev/null
+++ b/install/ubuntu/15.10/nginx/phpmyadmin.inc
@@ -0,0 +1,15 @@
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin/;
+
+ location ~ /(libraries|setup) {
+ return 404;
+ }
+
+ location ~ ^/phpmyadmin/(.*\.php)$ {
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/15.10/nginx/phppgadmin.inc b/install/ubuntu/15.10/nginx/phppgadmin.inc
new file mode 100644
index 000000000..cd1e5806b
--- /dev/null
+++ b/install/ubuntu/15.10/nginx/phppgadmin.inc
@@ -0,0 +1,11 @@
+location /phppgadmin {
+ alias /usr/share/phppgadmin/;
+
+ location ~ ^/phppgadmin/(.*\.php)$ {
+ alias /usr/share/phppgadmin/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/15.10/nginx/status.conf b/install/ubuntu/15.10/nginx/status.conf
new file mode 100644
index 000000000..c0bcd0691
--- /dev/null
+++ b/install/ubuntu/15.10/nginx/status.conf
@@ -0,0 +1,9 @@
+server {
+ listen 127.0.0.1:8084 default;
+ server_name _;
+ server_name_in_redirect off;
+ location / {
+ stub_status on;
+ access_log off;
+ }
+}
diff --git a/install/ubuntu/15.10/nginx/webmail.inc b/install/ubuntu/15.10/nginx/webmail.inc
new file mode 100644
index 000000000..ad66895bc
--- /dev/null
+++ b/install/ubuntu/15.10/nginx/webmail.inc
@@ -0,0 +1,15 @@
+location /webmail {
+ alias /var/lib/roundcube/;
+
+ location ~ /(config|temp|logs) {
+ return 404;
+ }
+
+ location ~ ^/webmail/(.*\.php)$ {
+ alias /var/lib/roundcube/$1;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
diff --git a/install/ubuntu/15.10/packages/default.pkg b/install/ubuntu/15.10/packages/default.pkg
new file mode 100644
index 000000000..29585bacb
--- /dev/null
+++ b/install/ubuntu/15.10/packages/default.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='11:46:50'
+DATE='2012-09-26'
diff --git a/install/ubuntu/15.10/packages/gainsboro.pkg b/install/ubuntu/15.10/packages/gainsboro.pkg
new file mode 100644
index 000000000..c3df50258
--- /dev/null
+++ b/install/ubuntu/15.10/packages/gainsboro.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='10'
+WEB_ALIASES='10'
+DNS_DOMAINS='10'
+DNS_RECORDS='10'
+MAIL_DOMAINS='10'
+MAIL_ACCOUNTS='10'
+DATABASES='10'
+CRON_JOBS='10'
+DISK_QUOTA='10000'
+BANDWIDTH='10000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='1'
+TIME='11:31:30'
+DATE='2012-07-26'
diff --git a/install/ubuntu/15.10/packages/palegreen.pkg b/install/ubuntu/15.10/packages/palegreen.pkg
new file mode 100644
index 000000000..d08930f7b
--- /dev/null
+++ b/install/ubuntu/15.10/packages/palegreen.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='hosting'
+PROXY_TEMPLATE='hosting'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='50'
+WEB_ALIASES='50'
+DNS_DOMAINS='50'
+DNS_RECORDS='50'
+MAIL_DOMAINS='50'
+MAIL_ACCOUNTS='50'
+DATABASES='50'
+CRON_JOBS='50'
+DISK_QUOTA='50000'
+BANDWIDTH='50000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='5'
+TIME='07:49:47'
+DATE='2013-06-10'
diff --git a/install/ubuntu/15.10/packages/slategrey.pkg b/install/ubuntu/15.10/packages/slategrey.pkg
new file mode 100644
index 000000000..15a17dcd3
--- /dev/null
+++ b/install/ubuntu/15.10/packages/slategrey.pkg
@@ -0,0 +1,18 @@
+WEB_TEMPLATE='default'
+PROXY_TEMPLATE='default'
+DNS_TEMPLATE='default'
+WEB_DOMAINS='100'
+WEB_ALIASES='100'
+DNS_DOMAINS='100'
+DNS_RECORDS='100'
+MAIL_DOMAINS='100'
+MAIL_ACCOUNTS='100'
+DATABASES='100'
+CRON_JOBS='100'
+DISK_QUOTA='10000'
+BANDWIDTH='100000'
+NS='ns1.localhost.ltd,ns2.localhost.ltd'
+SHELL='nologin'
+BACKUPS='3'
+TIME='12:39:13'
+DATE='2012-09-20'
diff --git a/install/ubuntu/15.10/pga/config.inc.php b/install/ubuntu/15.10/pga/config.inc.php
new file mode 100644
index 000000000..1eec9776c
--- /dev/null
+++ b/install/ubuntu/15.10/pga/config.inc.php
@@ -0,0 +1,159 @@
+
diff --git a/install/ubuntu/15.10/pga/phppgadmin.conf b/install/ubuntu/15.10/pga/phppgadmin.conf
new file mode 100644
index 000000000..f39247d6f
--- /dev/null
+++ b/install/ubuntu/15.10/pga/phppgadmin.conf
@@ -0,0 +1,31 @@
+Alias /phppgadmin /usr/share/phppgadmin
+
+
+
+DirectoryIndex index.php
+AllowOverride None
+
+order deny,allow
+deny from all
+allow from 127.0.0.0/255.0.0.0 ::1/128
+allow from all
+
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+
+
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+ AddType application/x-httpd-php .php
+ Action application/x-httpd-php /cgi-bin/php
+
+
+
+
+
diff --git a/install/ubuntu/15.10/php5-fpm/www.conf b/install/ubuntu/15.10/php5-fpm/www.conf
new file mode 100644
index 000000000..d046bceef
--- /dev/null
+++ b/install/ubuntu/15.10/php5-fpm/www.conf
@@ -0,0 +1,10 @@
+[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
diff --git a/install/ubuntu/15.10/pma/apache.conf b/install/ubuntu/15.10/pma/apache.conf
new file mode 100644
index 000000000..2a8f69e25
--- /dev/null
+++ b/install/ubuntu/15.10/pma/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+
+ Options FollowSymLinks
+ DirectoryIndex index.php
+
+
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
+
+
+
+
+# Authorize for setup
+
+
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+
+ Require valid-user
+
+
+# Disallow web access to directories that don't need it
+
+ Order Deny,Allow
+ Deny from All
+
+
+ Order Deny,Allow
+ Deny from All
+
+
diff --git a/install/ubuntu/15.10/pma/config.inc.php b/install/ubuntu/15.10/pma/config.inc.php
new file mode 100644
index 000000000..a643a065b
--- /dev/null
+++ b/install/ubuntu/15.10/pma/config.inc.php
@@ -0,0 +1,146 @@
+
+ VRootEngine on
+ VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
+
+
+AuthPAMConfig proftpd
+AuthOrder mod_auth_pam.c* mod_auth_unix.c
+UseReverseDNS off
+User proftpd
+Group nogroup
+MaxInstances 20
+UseSendfile off
+LogFormat default "%h %l %u %t \"%r\" %s %b"
+LogFormat auth "%v [%P] %h %t \"%r\" %s"
+ListOptions -a
+RequireValidShell off
+PassivePorts 12000 12100
+
+
+ Umask 002
+ IdentLookups off
+ AllowOverwrite yes
+
+ AllowAll
+
+
diff --git a/install/ubuntu/15.10/roundcube/apache.conf b/install/ubuntu/15.10/roundcube/apache.conf
new file mode 100644
index 000000000..a0c87bcc6
--- /dev/null
+++ b/install/ubuntu/15.10/roundcube/apache.conf
@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+
+
+# Protecting basic directories:
+
+ Options -FollowSymLinks
+ AllowOverride None
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
+
+
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+
diff --git a/install/ubuntu/15.10/roundcube/config.inc.php b/install/ubuntu/15.10/roundcube/config.inc.php
new file mode 100644
index 000000000..0c82b1bc1
--- /dev/null
+++ b/install/ubuntu/15.10/roundcube/config.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/install/ubuntu/15.10/roundcube/main.inc.php b/install/ubuntu/15.10/roundcube/main.inc.php
new file mode 100644
index 000000000..97cdbf2df
--- /dev/null
+++ b/install/ubuntu/15.10/roundcube/main.inc.php
@@ -0,0 +1,850 @@
+/sendmail or to syslog
+$rcmail_config['smtp_log'] = true;
+
+// Log successful logins to /userlogins or to syslog
+$rcmail_config['log_logins'] = false;
+
+// Log session authentication errors to /session or to syslog
+$rcmail_config['log_session'] = false;
+
+// Log SQL queries to /sql or to syslog
+$rcmail_config['sql_debug'] = false;
+
+// Log IMAP conversation to /imap or to syslog
+$rcmail_config['imap_debug'] = false;
+
+// Log LDAP conversation to /ldap or to syslog
+$rcmail_config['ldap_debug'] = false;
+
+// Log SMTP conversation to /smtp or to syslog
+$rcmail_config['smtp_debug'] = false;
+
+// ----------------------------------
+// IMAP
+// ----------------------------------
+
+// the mail host chosen to perform the log-in
+// leave blank to show a textbox at login, give a list of hosts
+// to display a pulldown menu or set one host as string.
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// Supported replacement variables:
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['default_host'] = 'localhost';
+
+// TCP port used for IMAP connections
+$rcmail_config['default_port'] = 143;
+
+// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['imap_auth_type'] = null;
+
+// If you know your imap's folder delimiter, you can specify it here.
+// Otherwise it will be determined automatically
+$rcmail_config['imap_delimiter'] = null;
+
+// If IMAP server doesn't support NAMESPACE extension, but you're
+// using shared folders or personal root folder is non-empty, you'll need to
+// set these options. All can be strings or arrays of strings.
+// Folders need to be ended with directory separator, e.g. "INBOX."
+// (special directory "~" is an exception to this rule)
+// These can be used also to overwrite server's namespaces
+$rcmail_config['imap_ns_personal'] = null;
+$rcmail_config['imap_ns_other'] = null;
+$rcmail_config['imap_ns_shared'] = null;
+
+// By default IMAP capabilities are readed after connection to IMAP server
+// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
+// after login. Set to True if you've got this case.
+$rcmail_config['imap_force_caps'] = false;
+
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
+// IMAP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['imap_timeout'] = 0;
+
+// Optional IMAP authentication identifier to be used as authorization proxy
+$rcmail_config['imap_auth_cid'] = null;
+
+// Optional IMAP authentication password to be used for imap_auth_cid
+$rcmail_config['imap_auth_pw'] = null;
+
+// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
+$rcmail_config['imap_cache'] = null;
+
+// Enables messages cache. Only 'db' cache is supported.
+$rcmail_config['messages_cache'] = false;
+
+
+// ----------------------------------
+// SMTP
+// ----------------------------------
+
+// SMTP server host (for sending mails).
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
+// If left blank, the PHP mail() function is used
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$rcmail_config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$rcmail_config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$rcmail_config['smtp_pass'] = '';
+
+// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
+// best server supported one)
+$rcmail_config['smtp_auth_type'] = '';
+
+// Optional SMTP authentication identifier to be used as authorization proxy
+$rcmail_config['smtp_auth_cid'] = null;
+
+// Optional SMTP authentication password to be used for smtp_auth_cid
+$rcmail_config['smtp_auth_pw'] = null;
+
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
+// SMTP connection timeout, in seconds. Default: 0 (no limit)
+$rcmail_config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// SYSTEM
+// ----------------------------------
+include_once("/etc/roundcube/debian-db-roundcube.php");
+
+
+// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
+// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
+$rcmail_config['enable_installer'] = false;
+
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = '';
+
+// replace Roundcube logo with this image
+// specify an URL relative to the document root of this Roundcube installation
+$rcmail_config['skin_logo'] = null;
+
+// automatically create a new Roundcube user when log-in the first time.
+// a new user will be created once the IMAP login succeeds.
+// set to false if only registered users can use this service
+$rcmail_config['auto_create_user'] = true;
+
+// use this folder to store log files (must be writeable for apache user)
+// This is used by the 'file' log driver.
+$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
+
+// use this folder to store temp files (must be writeable for apache user)
+$rcmail_config['temp_dir'] = '/tmp';
+
+// lifetime of message cache
+// possible units: s, m, h, d, w
+$rcmail_config['message_cache_lifetime'] = '10d';
+
+// enforce connections over https
+// with this option enabled, all non-secure connections will be redirected.
+// set the port for the ssl connection as value of this option if it differs from the default 443
+$rcmail_config['force_https'] = false;
+
+// tell PHP that it should work as under secure connection
+// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
+// e.g. when you're running Roundcube behind a https proxy
+// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
+$rcmail_config['use_https'] = false;
+
+// Allow browser-autocompletion on login form.
+// 0 - disabled, 1 - username and host only, 2 - username, host, password
+$rcmail_config['login_autocomplete'] = 0;
+
+// Forces conversion of logins to lower case.
+// 0 - disabled, 1 - only domain part, 2 - domain and local part.
+// If users authentication is not case-sensitive this must be enabled.
+// After enabling it all user records need to be updated, e.g. with query:
+// UPDATE users SET username = LOWER(username);
+$rcmail_config['login_lc'] = 0;
+
+// Includes should be interpreted as PHP files
+$rcmail_config['skin_include_php'] = false;
+
+// display software version on login screen
+$rcmail_config['display_version'] = false;
+
+// Session lifetime in minutes
+// must be greater than 'keep_alive'/60
+$rcmail_config['session_lifetime'] = 10;
+
+// session domain: .example.org
+$rcmail_config['session_domain'] = '';
+
+// session name. Default: 'roundcube_sessid'
+$rcmail_config['session_name'] = null;
+
+// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
+// If set to memcache, a list of servers need to be specified in 'memcache_hosts'
+// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
+$rcmail_config['session_storage'] = 'db';
+
+// Use these hosts for accessing memcached
+// Define any number of hosts in the form of hostname:port or unix:///path/to/sock.file
+$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
+
+// check client IP in session athorization
+$rcmail_config['ip_check'] = false;
+
+// check referer of incoming requests
+$rcmail_config['referer_check'] = false;
+
+// X-Frame-Options HTTP header value sent to prevent from Clickjacking.
+// Possible values: sameorigin|deny. Set to false in order to disable sending them
+$rcmail_config['x_frame_options'] = 'sameorigin';
+
+// this key is used to encrypt the users imap password which is stored
+// in the session record (and the client cookie if remember password is enabled).
+// please provide a string of exactly 24 chars.
+$rcmail_config['des_key'] = 'vtIOjLZo9kffJoqzpSbm5r1r';
+
+// Automatically add this domain to user names for login
+// Only for IMAP servers that require full e-mail addresses for login
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['username_domain'] = '';
+
+// This domain will be used to form e-mail addresses of new users
+// Specify an array with 'host' => 'domain' values to support multiple hosts
+// Supported replacement variables:
+// %h - user's IMAP hostname
+// %n - http hostname ($_SERVER['SERVER_NAME'])
+// %d - domain (http hostname without the first part)
+// %z - IMAP domain (IMAP hostname without the first part)
+// For example %n = mail.domain.tld, %d = domain.tld
+$rcmail_config['mail_domain'] = '';
+
+// Password charset.
+// Use it if your authentication backend doesn't support UTF-8.
+// Defaults to ISO-8859-1 for backward compatibility
+$rcmail_config['password_charset'] = 'ISO-8859-1';
+
+// How many seconds must pass between emails sent by a user
+$rcmail_config['sendmail_delay'] = 0;
+
+// Maximum number of recipients per message. Default: 0 (no limit)
+$rcmail_config['max_recipients'] = 0;
+
+// Maximum allowednumber of members of an address group. Default: 0 (no limit)
+// If 'max_recipients' is set this value should be less or equal
+$rcmail_config['max_group_members'] = 0;
+
+// add this user-agent to message headers when sending
+$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+
+// use this name to compose page titles
+$rcmail_config['product_name'] = 'Roundcube Webmail';
+
+// try to load host-specific configuration
+// see http://trac.roundcube.net/wiki/Howto_Config for more details
+$rcmail_config['include_host_config'] = false;
+
+// path to a text file which will be added to each sent message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer'] = '';
+
+// path to a text file which will be added to each sent HTML message
+// paths are relative to the Roundcube root folder
+$rcmail_config['generic_message_footer_html'] = '';
+
+// add a received header to outgoing mails containing the creators IP and hostname
+$rcmail_config['http_received_header'] = false;
+
+// Whether or not to encrypt the IP address and the host name
+// these could, in some circles, be considered as sensitive information;
+// however, for the administrator, these could be invaluable help
+// when tracking down issues.
+$rcmail_config['http_received_header_encrypt'] = false;
+
+// This string is used as a delimiter for message headers when sending
+// a message via mail() function. Leave empty for auto-detection
+$rcmail_config['mail_header_delimiter'] = NULL;
+
+// number of chars allowed for line when wrapping text.
+// text wrapping is done when composing/sending messages
+$rcmail_config['line_length'] = 72;
+
+// send plaintext messages as format=flowed
+$rcmail_config['send_format_flowed'] = true;
+
+// don't allow these settings to be overriden by the user
+$rcmail_config['dont_override'] = array();
+
+// Set identities access level:
+// 0 - many identities with possibility to edit all params
+// 1 - many identities with possibility to edit all params but not email address
+// 2 - one identity with possibility to edit all params
+// 3 - one identity with possibility to edit all params but not email address
+$rcmail_config['identities_level'] = 0;
+
+// Mimetypes supported by the browser.
+// attachments of these types will open in a preview window
+// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
+$rcmail_config['client_mimetypes'] = null; # null == default
+
+// mime magic database
+$rcmail_config['mime_magic'] = null;
+
+// path to imagemagick identify binary
+$rcmail_config['im_identify_path'] = null;
+
+// path to imagemagick convert binary
+$rcmail_config['im_convert_path'] = null;
+
+// maximum size of uploaded contact photos in pixel
+$rcmail_config['contact_photo_size'] = 160;
+
+// Enable DNS checking for e-mail address validation
+$rcmail_config['email_dns_check'] = false;
+
+// ----------------------------------
+// PLUGINS
+// ----------------------------------
+
+// List of active plugins (in plugins/ directory)
+$rcmail_config['plugins'] = array('password');
+
+// ----------------------------------
+// USER INTERFACE
+// ----------------------------------
+
+// default messages sort column. Use empty value for default server's sorting,
+// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
+$rcmail_config['message_sort_col'] = '';
+
+// default messages sort order
+$rcmail_config['message_sort_order'] = 'DESC';
+
+// These cols are shown in the message list. Available cols are:
+// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
+$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
+
+// the default locale setting (leave empty for auto-detection)
+// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
+$rcmail_config['language'] = null;
+
+// use this format for date display (date or strftime format)
+$rcmail_config['date_format'] = 'Y-m-d';
+
+// give this choice of date formats to the user to select from
+$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+
+// use this format for time display (date or strftime format)
+$rcmail_config['time_format'] = 'H:i';
+
+// give this choice of time formats to the user to select from
+$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
+
+// use this format for short date display (derived from date_format and time_format)
+$rcmail_config['date_short'] = 'D H:i';
+
+// use this format for detailed date/time formatting (derived from date_format and time_format)
+$rcmail_config['date_long'] = 'Y-m-d H:i';
+
+// store draft message is this mailbox
+// leave blank if draft messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['drafts_mbox'] = 'Drafts';
+
+// store spam messages in this mailbox
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['junk_mbox'] = 'Spam';
+
+// store sent message is this mailbox
+// leave blank if sent messages should not be stored
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['sent_mbox'] = 'Sent';
+
+// move messages to this folder when deleting them
+// leave blank if they should be deleted directly
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['trash_mbox'] = 'Trash';
+
+// display these folders separately in the mailbox list.
+// these folders will also be displayed with localized names
+// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
+
+// automatically create the above listed default folders on first login
+$rcmail_config['create_default_folders'] = true;
+
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = true;
+
+// if in your system 0 quota means no limit set this option to true
+$rcmail_config['quota_zero_as_unlimited'] = false;
+
+// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
+$rcmail_config['enable_spellcheck'] = true;
+
+// Enables spellchecker exceptions dictionary.
+// Setting it to 'shared' will make the dictionary shared by all users.
+$rcmail_config['spellcheck_dictionary'] = false;
+
+// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
+// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
+$rcmail_config['spellcheck_engine'] = 'googie';
+
+// For a locally installed Nox Spell Server, please specify the URI to call it.
+// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
+// Leave empty to use the Google spell checking service, what means
+// that the message content will be sent to Google in order to check spelling
+$rcmail_config['spellcheck_uri'] = '';
+
+// These languages can be selected for spell checking.
+// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
+// Leave empty for default set of available language.
+$rcmail_config['spellcheck_languages'] = NULL;
+
+// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
+$rcmail_config['spellcheck_ignore_caps'] = false;
+
+// Makes that words with numbers will be ignored (e.g. g00gle)
+$rcmail_config['spellcheck_ignore_nums'] = false;
+
+// Makes that words with symbols will be ignored (e.g. g@@gle)
+$rcmail_config['spellcheck_ignore_syms'] = false;
+
+// Use this char/string to separate recipients when composing a new message
+$rcmail_config['recipients_separator'] = ',';
+
+// don't let users set pagesize to more than this value if set
+$rcmail_config['max_pagesize'] = 200;
+
+// Minimal value of user's 'keep_alive' setting (in seconds)
+// Must be less than 'session_lifetime'
+$rcmail_config['min_keep_alive'] = 60;
+
+// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
+// By default refresh time is set to 1 second. You can set this value to true
+// or any integer value indicating number of seconds.
+$rcmail_config['upload_progress'] = false;
+
+// Specifies for how many seconds the Undo button will be available
+// after object delete action. Currently used with supporting address book sources.
+// Setting it to 0, disables the feature.
+$rcmail_config['undo_timeout'] = 0;
+
+// ----------------------------------
+// ADDRESSBOOK SETTINGS
+// ----------------------------------
+
+// This indicates which type of address book to use. Possible choises:
+// 'sql' (default) and 'ldap'.
+// If set to 'ldap' then it will look at using the first writable LDAP
+// address book as the primary address book and it will not display the
+// SQL address book in the 'Address Book' view.
+$rcmail_config['address_book_type'] = 'sql';
+
+// In order to enable public ldap search, configure an array like the Verisign
+// example further below. if you would like to test, simply uncomment the example.
+// Array key must contain only safe characters, ie. a-zA-Z0-9_
+$rcmail_config['ldap_public'] = array();
+
+// If you are going to use LDAP for individual address books, you will need to
+// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
+//
+// The recommended directory structure for LDAP is to store all the address book entries
+// under the users main entry, e.g.:
+//
+// o=root
+// ou=people
+// uid=user@domain
+// mail=contact@contactdomain
+//
+// So the base_dn would be uid=%fu,ou=people,o=root
+// The bind_dn would be the same as based_dn or some super user login.
+/*
+ * example config for Verisign directory
+ *
+$rcmail_config['ldap_public']['Verisign'] = array(
+ 'name' => 'Verisign.com',
+ // Replacement variables supported in host names:
+ // %h - user's IMAP hostname
+ // %n - http hostname ($_SERVER['SERVER_NAME'])
+ // %d - domain (http hostname without the first part)
+ // %z - IMAP domain (IMAP hostname without the first part)
+ // For example %n = mail.domain.tld, %d = domain.tld
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+ // %fu - The full username provided, assumes the username is an email
+ // address, uses the username_domain value if not an email address.
+ // %u - The username prior to the '@'.
+ // %d - The domain name after the '@'.
+ // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
+ // %dn - DN found by ldap search when search_filter/search_base_dn are used
+ 'base_dn' => '',
+ 'bind_dn' => '',
+ 'bind_pass' => '',
+ // It's possible to bind for an individual address book
+ // The login name is used to search for the DN to bind with
+ 'search_base_dn' => '',
+ 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
+ // Default for %dn variable if search doesn't return DN value
+ 'search_dn_default' => '',
+ // Optional authentication identifier to be used as SASL authorization proxy
+ // bind_dn need to be empty
+ 'auth_cid' => '',
+ // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'auth_method' => '',
+ // Indicates if the addressbook shall be hidden from the list.
+ // With this option enabled you can still search/view contacts.
+ 'hidden' => false,
+ // Indicates if the addressbook shall not list contacts but only allows searching.
+ 'searchonly' => false,
+ // Indicates if we can write to the LDAP directory or not.
+ // If writable is true then these fields need to be populated:
+ // LDAP_Object_Classes, required_fields, LDAP_rdn
+ 'writable' => false,
+ // To create a new contact these are the object classes to specify
+ // (or any other classes you wish to use).
+ 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
+ // The RDN field that is used for new entries, this field needs
+ // to be one of the search_fields, the base of base_dn is appended
+ // to the RDN to insert into the LDAP directory.
+ 'LDAP_rdn' => 'cn',
+ // The required fields needed to build a new contact as required by
+ // the object classes (can include additional fields not required by the object classes).
+ 'required_fields' => array('cn', 'sn', 'mail'),
+ 'search_fields' => array('mail', 'cn'), // fields to search in
+ // mapping of contact fields to directory attributes
+ // for every attribute one can specify the number of values (limit) allowed.
+ // default is 1, a wildcard * means unlimited
+ 'fieldmap' => array(
+ // Roundcube => LDAP:limit
+ 'name' => 'cn',
+ 'surname' => 'sn',
+ 'firstname' => 'givenName',
+ 'title' => 'title',
+ 'email' => 'mail:*',
+ 'phone:home' => 'homePhone',
+ 'phone:work' => 'telephoneNumber',
+ 'phone:mobile' => 'mobile',
+ 'phone:pager' => 'pager',
+ 'street' => 'street',
+ 'zipcode' => 'postalCode',
+ 'region' => 'st',
+ 'locality' => 'l',
+// if you uncomment country, you need to modify 'sub_fields' above
+// 'country' => 'c',
+ 'department' => 'departmentNumber',
+ 'notes' => 'description',
+// these currently don't work:
+// 'phone:workfax' => 'facsimileTelephoneNumber',
+// 'photo' => 'jpegPhoto',
+// 'organization' => 'o',
+// 'manager' => 'manager',
+// 'assistant' => 'secretary',
+ ),
+ // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
+ 'sub_fields' => array(),
+ 'sort' => 'cn', // The field to sort the listing by.
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ 'fuzzy_search' => true, // server allows wildcard search
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
+ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
+ 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+ // definition for contact groups (uncomment if no groups are supported)
+ // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
+ // if the groups base_dn is empty, the contact base_dn is used for the groups as well
+ // -> in this case, assure that groups and contacts are separated due to the concernig filters!
+ 'groups' => array(
+ 'base_dn' => '',
+ 'scope' => 'sub', // search mode: sub|base|list
+ 'filter' => '(objectClass=groupOfNames)',
+ 'object_classes' => array("top", "groupOfNames"),
+ 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
+ 'name_attr' => 'cn', // attribute to be used as group name
+ ),
+);
+*/
+
+// An ordered array of the ids of the addressbooks that should be searched
+// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
+$rcmail_config['autocomplete_addressbooks'] = array('sql');
+
+// The minimum number of characters required to be typed in an autocomplete field
+// before address books will be searched. Most useful for LDAP directories that
+// may need to do lengthy results building given overly-broad searches
+$rcmail_config['autocomplete_min_length'] = 1;
+
+// Number of parallel autocomplete requests.
+// If there's more than one address book, n parallel (async) requests will be created,
+// where each request will search in one address book. By default (0), all address
+// books are searched in one request.
+$rcmail_config['autocomplete_threads'] = 0;
+
+// Max. numer of entries in autocomplete popup. Default: 15.
+$rcmail_config['autocomplete_max'] = 15;
+
+// show address fields in this order
+// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
+$rcmail_config['address_template'] = '{street} {locality} {zipcode} {country} {region}';
+
+// Matching mode for addressbook search (including autocompletion)
+// 0 - partial (*abc*), default
+// 1 - strict (abc)
+// 2 - prefix (abc*)
+// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
+$rcmail_config['addressbook_search_mode'] = 0;
+
+// ----------------------------------
+// USER PREFERENCES
+// ----------------------------------
+
+// Use this charset as fallback for message decoding
+//$rcmail_config['default_charset'] = 'ISO-8859-1';
+$rcmail_config['default_charset'] = 'UTF-8';
+
+// skin name: folder from skins/
+$rcmail_config['skin'] = 'larry';
+
+// show up to X items in messages list view
+$rcmail_config['mail_pagesize'] = 50;
+
+// show up to X items in contacts list view
+$rcmail_config['addressbook_pagesize'] = 50;
+
+// sort contacts by this col (preferably either one of name, firstname, surname)
+$rcmail_config['addressbook_sort_col'] = 'surname';
+
+// the way how contact names are displayed in the list
+// 0: display name
+// 1: (prefix) firstname middlename surname (suffix)
+// 2: (prefix) surname firstname middlename (suffix)
+// 3: (prefix) surname, firstname middlename (suffix)
+$rcmail_config['addressbook_name_listing'] = 0;
+
+// use this timezone to display date/time
+// valid timezone identifers are listed here: php.net/manual/en/timezones.php
+// 'auto' will use the browser's timezone settings
+$rcmail_config['timezone'] = 'auto';
+
+// prefer displaying HTML messages
+$rcmail_config['prefer_html'] = true;
+
+// display remote inline images
+// 0 - Never, always ask
+// 1 - Ask if sender is not in address book
+// 2 - Always show inline images
+$rcmail_config['show_images'] = 0;
+
+// compose html formatted messages by default
+// 0 - never, 1 - always, 2 - on reply to HTML message only
+$rcmail_config['htmleditor'] = 0;
+
+// show pretty dates as standard
+$rcmail_config['prettydate'] = true;
+
+// save compose message every 300 seconds (5min)
+$rcmail_config['draft_autosave'] = 300;
+
+// default setting if preview pane is enabled
+$rcmail_config['preview_pane'] = false;
+
+// Mark as read when viewed in preview pane (delay in seconds)
+// Set to -1 if messages in preview pane should not be marked as read
+$rcmail_config['preview_pane_mark_read'] = 0;
+
+// Clear Trash on logout
+$rcmail_config['logout_purge'] = false;
+
+// Compact INBOX on logout
+$rcmail_config['logout_expunge'] = false;
+
+// Display attached images below the message body
+$rcmail_config['inline_images'] = true;
+
+// Encoding of long/non-ascii attachment names:
+// 0 - Full RFC 2231 compatible
+// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
+// 2 - Full 2047 compatible
+$rcmail_config['mime_param_folding'] = 1;
+
+// Set true if deleted messages should not be displayed
+// This will make the application run slower
+$rcmail_config['skip_deleted'] = false;
+
+// Set true to Mark deleted messages as read as well as deleted
+// False means that a message's read status is not affected by marking it as deleted
+$rcmail_config['read_when_deleted'] = true;
+
+// Set to true to never delete messages immediately
+// Use 'Purge' to remove messages marked as deleted
+$rcmail_config['flag_for_deletion'] = false;
+
+// Default interval for keep-alive/check-recent requests (in seconds)
+// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
+$rcmail_config['keep_alive'] = 60;
+
+// If true all folders will be checked for recent messages
+$rcmail_config['check_all_folders'] = false;
+
+// If true, after message delete/move, the next message will be displayed
+$rcmail_config['display_next'] = false;
+
+// 0 - Do not expand threads
+// 1 - Expand all threads automatically
+// 2 - Expand only threads with unread messages
+$rcmail_config['autoexpand_threads'] = 0;
+
+// When replying place cursor above original message (top posting)
+$rcmail_config['top_posting'] = false;
+
+// When replying strip original signature from message
+$rcmail_config['strip_existing_sig'] = true;
+
+// Show signature:
+// 0 - Never
+// 1 - Always
+// 2 - New messages only
+// 3 - Forwards and Replies only
+$rcmail_config['show_sig'] = 1;
+
+// When replying or forwarding place sender's signature above existing message
+$rcmail_config['sig_above'] = false;
+
+// Use MIME encoding (quoted-printable) for 8bit characters in message body
+$rcmail_config['force_7bit'] = false;
+
+// Defaults of the search field configuration.
+// The array can contain a per-folder list of header fields which should be considered when searching
+// The entry with key '*' stands for all folders which do not have a specific list set.
+// Please note that folder names should to be in sync with $rcmail_config['default_folders']
+$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
+
+// Defaults of the addressbook search field configuration.
+$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
+
+// 'Delete always'
+// This setting reflects if mail should be always deleted
+// when moving to Trash fails. This is necessary in some setups
+// when user is over quota and Trash is included in the quota.
+$rcmail_config['delete_always'] = false;
+
+// Directly delete messages in Junk instead of moving to Trash
+$rcmail_config['delete_junk'] = true;
+
+// Behavior if a received message requests a message delivery notification (read receipt)
+// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
+// 3 = send automatically if sender is in addressbook, otherwise ask the user
+// 4 = send automatically if sender is in addressbook, otherwise ignore
+$rcmail_config['mdn_requests'] = 0;
+
+// Return receipt checkbox default state
+$rcmail_config['mdn_default'] = 0;
+
+// Delivery Status Notification checkbox default state
+$rcmail_config['dsn_default'] = 0;
+
+// Place replies in the folder of the message being replied to
+$rcmail_config['reply_same_folder'] = false;
+
+// Sets default mode of Forward feature to "forward as attachment"
+$rcmail_config['forward_attachment'] = false;
+
+// Defines address book (internal index) to which new contacts will be added
+// By default it is the first writeable addressbook.
+// Note: Use '0' for built-in address book.
+$rcmail_config['default_addressbook'] = null;
+
+// Enables spell checking before sending a message.
+$rcmail_config['spellcheck_before_send'] = false;
+
+// Skip alternative email addresses in autocompletion (show one address per contact)
+$rcmail_config['autocomplete_single'] = false;
+
+// Default font for composed HTML message.
+// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
+// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
+$rcmail_config['default_font'] = '';
+
+// end of config file
diff --git a/install/ubuntu/15.10/roundcube/vesta.php b/install/ubuntu/15.10/roundcube/vesta.php
new file mode 100644
index 000000000..8fb202a44
--- /dev/null
+++ b/install/ubuntu/15.10/roundcube/vesta.php
@@ -0,0 +1,62 @@
+
+ */
+
+ function password_save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
+ $vesta_host = $rcmail->config->get('password_vesta_host');
+
+ if (empty($vesta_host))
+ {
+ $vesta_host = 'localhost';
+ }
+
+ $vesta_port = $rcmail->config->get('password_vesta_port');
+ if (empty($vesta_port))
+ {
+ $vesta_port = '8083';
+ }
+
+ $postvars = array(
+ 'email' => $_SESSION['username'],
+ 'password' => $curpass,
+ 'new' => $passwd
+ );
+
+ $postdata = http_build_query($postvars);
+
+ $send = 'POST /reset/mail/ HTTP/1.1' . PHP_EOL;
+ $send .= 'Host: ' . $vesta_host . PHP_EOL;
+ $send .= 'User-Agent: PHP Script' . PHP_EOL;
+ $send .= 'Content-length: ' . strlen($postdata) . PHP_EOL;
+ $send .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
+ $send .= 'Connection: close' . PHP_EOL;
+ $send .= PHP_EOL;
+ $send .= $postdata . PHP_EOL . PHP_EOL;
+
+ $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);
+ fputs($fp, $send);
+ $result = fread($fp, 2048);
+ fclose($fp);
+
+ $fp = fopen("/tmp/roundcube.log", 'w');
+ fwrite($fp, "test ok");
+ fwrite($fp, "\n");
+ fclose($fp);
+
+
+ if(strpos($result, 'ok') && !strpos($result, 'error'))
+ {
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ return PASSWORD_ERROR;
+ }
+
+ }
diff --git a/install/ubuntu/15.10/sudo/admin b/install/ubuntu/15.10/sudo/admin
new file mode 100644
index 000000000..4226bdd49
--- /dev/null
+++ b/install/ubuntu/15.10/sudo/admin
@@ -0,0 +1,8 @@
+# Created by vesta installer
+Defaults env_keep="VESTA"
+Defaults:admin !syslog
+Defaults:admin !requiretty
+Defaults:root !requiretty
+
+admin ALL=(ALL) ALL
+admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/15.10/templates/dns/child-ns.tpl b/install/ubuntu/15.10/templates/dns/child-ns.tpl
new file mode 100755
index 000000000..27f9b825b
--- /dev/null
+++ b/install/ubuntu/15.10/templates/dns/child-ns.tpl
@@ -0,0 +1,11 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns1.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='ns2.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ns1' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='ns2' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/15.10/templates/dns/default.tpl b/install/ubuntu/15.10/templates/dns/default.tpl
new file mode 100755
index 000000000..942c15bc8
--- /dev/null
+++ b/install/ubuntu/15.10/templates/dns/default.tpl
@@ -0,0 +1,15 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns3%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns4%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns5%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns6%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns7%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns8%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/15.10/templates/dns/gmail.tpl b/install/ubuntu/15.10/templates/dns/gmail.tpl
new file mode 100755
index 000000000..950cfa456
--- /dev/null
+++ b/install/ubuntu/15.10/templates/dns/gmail.tpl
@@ -0,0 +1,14 @@
+ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='4' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='5' RECORD='localhost' TYPE='A' PRIORITY='' VALUE='127.0.0.1' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='6' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='ghs.google.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='7' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='8' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='9' RECORD='@' TYPE='MX' PRIORITY='1' VALUE='ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='10' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT1.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='11' RECORD='@' TYPE='MX' PRIORITY='5' VALUE='ALT2.ASPMX.L.GOOGLE.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX2.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='13' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='ASPMX3.GOOGLEMAIL.COM.' SUSPENDED='no' TIME='%time%' DATE='%date%'
+ID='14' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
diff --git a/install/ubuntu/15.10/templates/web/apache2/basedir.stpl b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl
new file mode 100755
index 000000000..3f71e6999
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl
@@ -0,0 +1,41 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/basedir.tpl b/install/ubuntu/15.10/templates/web/apache2/basedir.tpl
new file mode 100755
index 000000000..75daf0e10
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/basedir.tpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value open_basedir %docroot%
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/default.stpl b/install/ubuntu/15.10/templates/web/apache2/default.stpl
new file mode 100755
index 000000000..e884a95b9
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/default.stpl
@@ -0,0 +1,40 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/default.tpl b/install/ubuntu/15.10/templates/web/apache2/default.tpl
new file mode 100755
index 000000000..073724ce0
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/default.tpl
@@ -0,0 +1,34 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+
+ AllowOverride All
+
+
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/hosting.stpl b/install/ubuntu/15.10/templates/web/apache2/hosting.stpl
new file mode 100755
index 000000000..7a5d7787f
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/hosting.stpl
@@ -0,0 +1,49 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/hosting.tpl b/install/ubuntu/15.10/templates/web/apache2/hosting.tpl
new file mode 100755
index 000000000..ab844dc74
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/hosting.tpl
@@ -0,0 +1,43 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ #SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ php_admin_value upload_tmp_dir %home%/%user%/tmp
+ php_admin_value upload_max_filesize 10M
+ php_admin_value max_execution_time 20
+ php_admin_value post_max_size 8M
+ php_admin_value memory_limit 32M
+ php_admin_flag mysql.allow_persistent off
+ php_admin_flag safe_mode off
+ php_admin_value session.save_path %home%/%user%/tmp
+ php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
+
+ RMode config
+ RUidGid %user% %group%
+ RGroups www-data
+
+
+ AssignUserID %user% %group%
+
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/phpcgi.sh b/install/ubuntu/15.10/templates/web/apache2/phpcgi.sh
new file mode 100755
index 000000000..6565e103d
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/phpcgi.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini'
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl
new file mode 100755
index 000000000..aa5137308
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl
@@ -0,0 +1,35 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl
new file mode 100755
index 000000000..a05ff252d
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+ Action phpcgi-script /cgi-bin/php
+
+ SetHandler phpcgi-script
+
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.sh b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.sh
new file mode 100755
index 000000000..e80582492
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Adding php wrapper
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+wrapper_script="#!/bin/sh
+PHPRC=/usr/local/lib
+export PHPRC
+export PHP_FCGI_MAX_REQUESTS=1000
+export PHP_FCGI_CHILDREN=20
+exec /usr/bin/php-cgi
+"
+wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
+
+echo "$wrapper_script" > $wrapper_file
+chown $user:$user $wrapper_file
+chmod -f 751 $wrapper_file
+
+exit 0
diff --git a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl
new file mode 100755
index 000000000..622495756
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ SSLRequireSSL
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ php_admin_value open_basedir none
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl
new file mode 100755
index 000000000..5c1f16e20
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl
@@ -0,0 +1,28 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%
+ ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
+ Alias /vstats/ %home%/%user%/web/%domain%/stats/
+ Alias /error/ %home%/%user%/web/%domain%/document_errors/
+ SuexecUserGroup %user% %group%
+ CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
+ CustomLog /var/log/%web_system%/domains/%domain%.log combined
+ ErrorLog /var/log/%web_system%/domains/%domain%.error.log
+
+ AllowOverride All
+ Options +Includes -Indexes +ExecCGI
+
+ SetHandler fcgid-script
+
+ FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
+
+
+ AllowOverride All
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/awstats/awstats.tpl b/install/ubuntu/15.10/templates/web/awstats/awstats.tpl
new file mode 100755
index 000000000..9a92e0fd4
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/awstats/awstats.tpl
@@ -0,0 +1,133 @@
+LogFile="/var/log/%web_system%/domains/%domain%.log"
+LogType=W
+LogFormat=1
+LogSeparator=" "
+SiteDomain="%domain_idn%"
+HostAliases="%alias_idn%"
+DirData="%home%/%user%/web/%domain%/stats"
+DirCgi="/vstats"
+DirIcons="/vstats/icon"
+AllowToUpdateStatsFromBrowser=0
+AllowFullYearView=2
+EnableLockForUpdate=1
+DNSStaticCacheFile="dnscache.txt"
+DNSLastUpdateCacheFile="dnscachelastupdate.txt"
+SkipDNSLookupFor=""
+AllowAccessFromWebToAuthenticatedUsersOnly=0
+AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingIPAddresses=""
+CreateDirDataIfNotExists=0
+BuildHistoryFormat=text
+BuildReportFormat=html
+SaveDatabaseFilesWithPermissionsForEveryone=0
+PurgeLogFile=0
+ArchiveLogRecords=0
+KeepBackupOfHistoricFiles=1
+DefaultFile="index.php index.html"
+SkipHosts="127.0.0.1
+SkipUserAgents=""
+SkipFiles=""
+SkipReferrersBlackList=""
+OnlyHosts=""
+OnlyUserAgents=""
+OnlyUsers=""
+OnlyFiles=""
+NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
+ValidHTTPCodes="200 304"
+ValidSMTPCodes="1 250"
+AuthenticatedUsersNotCaseSensitive=0
+URLNotCaseSensitive=0
+URLWithAnchor=0
+URLQuerySeparators="?;"
+URLWithQuery=0
+URLWithQueryWithOnlyFollowingParameters=""
+URLWithQueryWithoutFollowingParameters=""
+URLReferrerWithQuery=0
+WarningMessages=1
+ErrorMessages=""
+DebugMessages=0
+NbOfLinesForCorruptedLog=50
+WrapperScript=""
+DecodeUA=0
+MiscTrackerUrl="/js/awstats_misc_tracker.js"
+UseFramesWhenCGI=1
+DetailedReportsOnNewWindows=1
+Expires=3600
+MaxRowsInHTMLOutput=1000
+Lang="auto"
+DirLang="./lang"
+ShowMenu=1
+ShowSummary=UVPHB
+ShowMonthStats=UVPHB
+ShowDaysOfMonthStats=VPHB
+ShowDaysOfWeekStats=PHB
+ShowHoursStats=PHB
+ShowDomainsStats=PHB
+ShowHostsStats=PHBL
+ShowAuthenticatedUsers=0
+ShowRobotsStats=HBL
+ShowWormsStats=0
+ShowEMailSenders=0
+ShowEMailReceivers=0
+ShowSessionsStats=1
+ShowPagesStats=PBEX
+ShowFileTypesStats=HB
+ShowFileSizesStats=0
+ShowDownloadsStats=HB
+ShowOSStats=1
+ShowBrowsersStats=1
+ShowScreenSizeStats=0
+ShowOriginStats=PH
+ShowKeyphrasesStats=1
+ShowKeywordsStats=1
+ShowMiscStats=a
+ShowHTTPErrorsStats=1
+ShowSMTPErrorsStats=0
+ShowClusterStats=0
+AddDataArrayMonthStats=1
+AddDataArrayShowDaysOfMonthStats=1
+AddDataArrayShowDaysOfWeekStats=1
+AddDataArrayShowHoursStats=1
+IncludeInternalLinksInOriginSection=0
+MaxNbOfDomain = 10
+MinHitDomain = 1
+MaxNbOfHostsShown = 10
+MinHitHost = 1
+MaxNbOfLoginShown = 10
+MinHitLogin = 1
+MaxNbOfRobotShown = 10
+MinHitRobot = 1
+MaxNbOfDownloadsShown = 10
+MinHitDownloads = 1
+MaxNbOfPageShown = 10
+MinHitFile = 1
+MaxNbOfOsShown = 10
+MinHitOs = 1
+MaxNbOfBrowsersShown = 10
+MinHitBrowser = 1
+MaxNbOfScreenSizesShown = 5
+MinHitScreenSize = 1
+MaxNbOfWindowSizesShown = 5
+MinHitWindowSize = 1
+MaxNbOfRefererShown = 10
+MinHitRefer = 1
+MaxNbOfKeyphrasesShown = 10
+MinHitKeyphrase = 1
+MaxNbOfKeywordsShown = 10
+MinHitKeyword = 1
+MaxNbOfEMailsShown = 20
+MinHitEMail = 1
+FirstDayOfWeek=0
+ShowFlagLinks=""
+ShowLinksOnUrl=1
+UseHTTPSLinkForUrl=""
+MaxLengthOfShownURL=64
+HTMLHeadSection=""
+HTMLEndSection=""
+MetaRobot=0
+Logo="awstats_logo6.png"
+LogoLink="http://awstats.sourceforge.net"
+BarWidth = 260
+BarHeight = 90
+StyleSheet=""
+ExtraTrackedRowsLimit=500
diff --git a/install/ubuntu/15.10/templates/web/awstats/index.tpl b/install/ubuntu/15.10/templates/web/awstats/index.tpl
new file mode 100755
index 000000000..9df9bb5cb
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/awstats/index.tpl
@@ -0,0 +1,10 @@
+
+
+
+ Awstats log analyzer
+
+
+
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/awstats/nav.tpl b/install/ubuntu/15.10/templates/web/awstats/nav.tpl
new file mode 100755
index 000000000..f29bed68b
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/awstats/nav.tpl
@@ -0,0 +1,23 @@
+
+
+ Awstats navigation
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/nginx/caching.sh b/install/ubuntu/15.10/templates/web/nginx/caching.sh
new file mode 100755
index 000000000..6eb9126db
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/caching.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+user=$1
+domain=$2
+ip=$3
+home=$4
+docroot=$5
+
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
+
diff --git a/install/ubuntu/15.10/templates/web/nginx/caching.stpl b/install/ubuntu/15.10/templates/web/nginx/caching.stpl
new file mode 100755
index 000000000..ca6cffe32
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/caching.stpl
@@ -0,0 +1,44 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/caching.tpl b/install/ubuntu/15.10/templates/web/nginx/caching.tpl
new file mode 100755
index 000000000..36761b65c
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/caching.tpl
@@ -0,0 +1,41 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ proxy_cache cache;
+ proxy_cache_valid 15m;
+ proxy_cache_valid 404 1m;
+ proxy_no_cache $no_cache;
+ proxy_cache_bypass $no_cache;
+ proxy_cache_bypass $cookie_session $http_x_update;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ proxy_cache off;
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/default.stpl b/install/ubuntu/15.10/templates/web/nginx/default.stpl
new file mode 100755
index 000000000..fa5380606
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/default.stpl
@@ -0,0 +1,36 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.10/templates/web/nginx/default.tpl b/install/ubuntu/15.10/templates/web/nginx/default.tpl
new file mode 100755
index 000000000..4d5c774bc
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/default.tpl
@@ -0,0 +1,33 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.10/templates/web/nginx/hosting.sh b/install/ubuntu/15.10/templates/web/nginx/hosting.sh
new file mode 100755
index 000000000..eeed37ef9
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/hosting.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Changing public_html permission
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+chmod 755 $docroot
+
+exit 0
diff --git a/install/ubuntu/15.10/templates/web/nginx/hosting.stpl b/install/ubuntu/15.10/templates/web/nginx/hosting.stpl
new file mode 100755
index 000000000..d778d6333
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/hosting.stpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%proxy_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.10/templates/web/nginx/hosting.tpl b/install/ubuntu/15.10/templates/web/nginx/hosting.tpl
new file mode 100755
index 000000000..15961c95c
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/hosting.tpl
@@ -0,0 +1,35 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
new file mode 100644
index 000000000..01d82b603
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/cms_made_simple.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
new file mode 100644
index 000000000..af452d19f
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/cms_made_simple.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?page=$request_uri;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter2.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
new file mode 100644
index 000000000..a592a652d
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter2.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter2.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
new file mode 100644
index 000000000..9b955aa6a
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter2.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ location = /index.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;
+ fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ~ \.php$ {
+ return 444;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter3.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
new file mode 100644
index 000000000..4d330d34f
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter3.stpl
@@ -0,0 +1,51 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter3.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
new file mode 100644
index 000000000..1f446e5d3
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/codeigniter3.tpl
@@ -0,0 +1,47 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/datalife_engine.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
new file mode 100644
index 000000000..d1b5bcd24
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/datalife_engine.stpl
@@ -0,0 +1,122 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/datalife_engine.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
new file mode 100644
index 000000000..ff33c2325
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/datalife_engine.tpl
@@ -0,0 +1,118 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
+
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
+ rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
+ rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
+
+ rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
+ rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
+ rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
+ rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
+
+ rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
+ rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
+
+ rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
+ rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
+
+ rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
+ rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
+
+ rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
+ rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
+
+ rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
+ rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
+ rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
+ rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
+
+ rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
+ rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
+
+ rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
+ rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
+
+ rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
+ rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
+
+ rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
+ rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
+
+ rewrite "^/rules.html$" /index.php?do=rules last;
+ rewrite "^/statistics.html$" /index.php?do=stats last;
+ rewrite "^/addnews.html$" /index.php?do=addnews last;
+ rewrite "^/rss.xml$" /engine/rss.php last;
+ rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
+
+ if (!-d $request_filename) {
+ rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
+ rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
+ rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
+ rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
+ }
+
+ if (!-f $request_filename) {
+ rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/default.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/default.stpl
new file mode 100644
index 000000000..a68c99861
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/default.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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 / {
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/default.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/default.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/default.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
new file mode 100644
index 000000000..27483cd8c
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl
@@ -0,0 +1,67 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
new file mode 100644
index 000000000..31647c9ff
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ index doku.php;
+ try_files $uri $uri/ @dokuwiki;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location ^~ /lib/ {
+ expires 30d;
+ }
+
+ location ^~ /conf/ { return 403; }
+ location ^~ /data/ { return 403; }
+ location @dokuwiki {
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1 last;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl
new file mode 100644
index 000000000..9a5484396
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl
@@ -0,0 +1,101 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl
new file mode 100644
index 000000000..417762c18
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl
@@ -0,0 +1,98 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ # Very rarely should these ever be accessed outside of your lan
+ location ~* \.(txt|log)$ {
+ allow 192.168.0.0/16;
+ deny all;
+ }
+
+ location ~ \..*/.*\.php$ {
+ return 403;
+ }
+
+ # No no for private
+ location ~ ^/sites/.*/private/ {
+ return 403;
+ }
+
+ # Block access to "hidden" files and directories whose names begin with a
+ # period. This includes directories used by version control systems such
+ # as Subversion or Git to store control files.
+ location ~ (^|/)\. {
+ return 403;
+ }
+
+ location / {
+ try_files $uri @rewrite;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_intercept_errors on;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location @rewrite {
+ # You have 2 options here
+ # For D7 and above:
+ # Clean URLs are handled in drupal_environment_initialize().
+ rewrite ^ /index.php;
+
+ # For Drupal 6 and bwlow:
+ # Some modules enforce no slash (/) at the end of the URL
+ # Else this rewrite block wouldn't be needed (GlobalRedirect)
+ #rewrite ^/(.*)$ /index.php?q=$1;
+ }
+
+ location ~ ^/sites/.*/files/styles/ {
+ try_files $uri @rewrite;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/joomla.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/joomla.stpl
new file mode 100644
index 000000000..235a01216
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/joomla.stpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ 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?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/joomla.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/joomla.tpl
new file mode 100644
index 000000000..997c268de
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/joomla.tpl
@@ -0,0 +1,54 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+
+ # deny running scripts inside writable directories
+ location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
+ return 403;
+ error_page 403 /403_error.html;
+ }
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/no-php.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/no-php.stpl
new file mode 100644
index 000000000..a0234ae3a
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/no-php.stpl
@@ -0,0 +1,42 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+ 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%;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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/snginx.%domain%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/no-php.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..97d045990
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/no-php.tpl
@@ -0,0 +1,38 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ types {
+ text/html html htm shtml php php5;
+ }
+
+ location / {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ }
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl
new file mode 100644
index 000000000..8311ca43f
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl
@@ -0,0 +1,80 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl
new file mode 100644
index 000000000..57cac2f85
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl
@@ -0,0 +1,76 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
+ rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
+ rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
+
+ error_page 403 = /core/templates/403.php;
+ error_page 404 = /core/templates/404.php;
+
+ location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
+ deny all;
+ }
+
+ location / {
+ # The following 2 rules are only needed with webfinger
+ rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
+ rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
+ rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
+ rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
+ rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
+ try_files $uri $uri/ /index.php;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ #fastcgi_param HTTPS on;
+ fastcgi_pass %backend_lsnr%;
+ }
+ }
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ expires max;
+ # Some basic cache-control for static files to be sent to the browser
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+ }
+
+ #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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/piwik.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/piwik.stpl
new file mode 100644
index 000000000..c53af4011
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/piwik.stpl
@@ -0,0 +1,68 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/piwik.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/piwik.tpl
new file mode 100644
index 000000000..6b4a94a68
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/piwik.tpl
@@ -0,0 +1,64 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ try_files /favicon.ico =204;
+ }
+
+ location / {
+ try_files $uri /index.php;
+
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
+ valid_referers none blocked %domain_idn% %alias_idn%;
+ if ($invalid_referer) {
+ return 444;
+ }
+ expires max;
+ }
+
+ location ~* ^/(?:index|piwik)\.php$ {
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ # Any other attempt to access PHP files returns a 404.
+ location ~* ^.+\.php$ {
+ return 404;
+ }
+
+ # Return a 404 for all text files.
+ location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
+ return 404;
+ }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/pyrocms.stpl
new file mode 100644
index 000000000..a6fc67556
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/pyrocms.stpl
@@ -0,0 +1,61 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/pyrocms.tpl
new file mode 100644
index 000000000..68b378efd
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/pyrocms.tpl
@@ -0,0 +1,57 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location /installer {
+ try_files $uri $uri/ /installer/index.php;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php;
+
+ 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;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/fastcgi_params;
+ }
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location ~ /\. { access_log off; log_not_found off; deny all; }
+ location ~ ~$ { access_log off; log_not_found off; deny all; }
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress.stpl
new file mode 100644
index 000000000..910c28b69
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress.stpl
@@ -0,0 +1,50 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress.tpl
new file mode 100644
index 000000000..b143e53ba
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress.tpl
@@ -0,0 +1,46 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location / {
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress2.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress2.stpl
new file mode 100644
index 000000000..2822f8754
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress2.stpl
@@ -0,0 +1,62 @@
+server {
+ listen %ip%:%web_ssl_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress2.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress2.tpl
new file mode 100644
index 000000000..37b8be305
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/wordpress2.tpl
@@ -0,0 +1,58 @@
+server {
+ listen %ip%:%web_port%;
+ server_name %domain_idn% %alias_idn%;
+ root %docroot%;
+ index index.php index.html index.htm;
+ access_log /var/log/nginx/domains/%domain%.log combined;
+ access_log /var/log/nginx/domains/%domain%.bytes bytes;
+ error_log /var/log/nginx/domains/%domain%.error.log error;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+
+ 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;
+ }
+
+ 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%.conf*;
+}
diff --git a/install/ubuntu/15.10/templates/web/nginx/proxy_ip.tpl b/install/ubuntu/15.10/templates/web/nginx/proxy_ip.tpl
new file mode 100755
index 000000000..ae1956173
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/nginx/proxy_ip.tpl
@@ -0,0 +1,9 @@
+server {
+ listen %ip%:%proxy_port% default;
+ server_name _;
+ #access_log /var/log/nginx/%ip%.log main;
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+ }
+}
+
diff --git a/install/ubuntu/15.10/templates/web/php5-fpm/default.tpl b/install/ubuntu/15.10/templates/web/php5-fpm/default.tpl
new file mode 100644
index 000000000..44ccf7a42
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/php5-fpm/default.tpl
@@ -0,0 +1,18 @@
+[%backend%]
+listen = 127.0.0.1:%backend_port%
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl
new file mode 100644
index 000000000..89487d5f5
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl
@@ -0,0 +1,13 @@
+#[%backend%]
+#user = %user%
+#group = %user%
+#listen = /dev/null
+
+#listen.owner = %user%
+#listen.group = nginx
+
+#pm = dynamic
+#pm.max_children = 50
+#pm.start_servers = 3
+#pm.min_spare_servers = 2
+#pm.max_spare_servers = 10
diff --git a/install/ubuntu/15.10/templates/web/php5-fpm/socket.tpl b/install/ubuntu/15.10/templates/web/php5-fpm/socket.tpl
new file mode 100644
index 000000000..f0513da3e
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/php5-fpm/socket.tpl
@@ -0,0 +1,21 @@
+[%backend%]
+listen = /var/run/php5-%backend%.sock
+listen.allowed_clients = 127.0.0.1
+
+user = %user%
+group = %user%
+
+listen.owner = %user%
+listen.group = nginx
+
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 3
+pm.min_spare_servers = 2
+pm.max_spare_servers = 10
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
diff --git a/install/ubuntu/15.10/templates/web/skel/document_errors/403.html b/install/ubuntu/15.10/templates/web/skel/document_errors/403.html
new file mode 100755
index 000000000..9c3f6baab
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/document_errors/403.html
@@ -0,0 +1,29 @@
+
+
+ 403 — Forbidden
+
+
+
+
+
+
+ %domain%
+
+ 403
+ Forbidden
+
+ Unfortunately, you do not have permission to view this
+
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/skel/document_errors/404.html b/install/ubuntu/15.10/templates/web/skel/document_errors/404.html
new file mode 100755
index 000000000..2cee77084
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/document_errors/404.html
@@ -0,0 +1,28 @@
+
+
+ 404 — Not Found
+
+
+
+
+
+
+ %domain%
+ 404
+ Page Not Found
+
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the
home or go back to
previous page .
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/skel/document_errors/50x.html b/install/ubuntu/15.10/templates/web/skel/document_errors/50x.html
new file mode 100755
index 000000000..85ba648b7
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/document_errors/50x.html
@@ -0,0 +1,29 @@
+
+
+ 500 — Internal Sever Error
+
+
+
+
+
+
+ %domain%
+
+ 500
+ Internal Server Error
+
+ Sorry, something went wrong :(
+
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/skel/public_html/index.html b/install/ubuntu/15.10/templates/web/skel/public_html/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/public_html/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/skel/public_html/robots.txt b/install/ubuntu/15.10/templates/web/skel/public_html/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/public_html/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/15.10/templates/web/skel/public_shtml/index.html b/install/ubuntu/15.10/templates/web/skel/public_shtml/index.html
new file mode 100755
index 000000000..4f5bb7244
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/public_shtml/index.html
@@ -0,0 +1,26 @@
+
+
+ %domain% — Coming Soon
+
+
+
+
+
+
+ %domain%
+
+
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/skel/public_shtml/robots.txt b/install/ubuntu/15.10/templates/web/skel/public_shtml/robots.txt
new file mode 100755
index 000000000..00ee83dcf
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/skel/public_shtml/robots.txt
@@ -0,0 +1,3 @@
+# vestacp autogenerated robots.txt
+User-agent: *
+Crawl-delay: 10
diff --git a/install/ubuntu/15.10/templates/web/suspend/.htaccess b/install/ubuntu/15.10/templates/web/suspend/.htaccess
new file mode 100755
index 000000000..5a6df83fb
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/suspend/.htaccess
@@ -0,0 +1,2 @@
+ErrorDocument 403 /index.html
+ErrorDocument 404 /index.html
diff --git a/install/ubuntu/15.10/templates/web/suspend/index.html b/install/ubuntu/15.10/templates/web/suspend/index.html
new file mode 100755
index 000000000..f2d04e1f0
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/suspend/index.html
@@ -0,0 +1,25 @@
+
+
+ Website Suspended
+
+
+
+
+
+ SUSPENDED
+ This website has been suspended.
+
+ Please contact the technical support department.
+
+
+
diff --git a/install/ubuntu/15.10/templates/web/webalizer/webalizer.tpl b/install/ubuntu/15.10/templates/web/webalizer/webalizer.tpl
new file mode 100755
index 000000000..068adcfb9
--- /dev/null
+++ b/install/ubuntu/15.10/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/ubuntu/15.10/vsftpd/vsftpd.conf b/install/ubuntu/15.10/vsftpd/vsftpd.conf
new file mode 100644
index 000000000..0902899e7
--- /dev/null
+++ b/install/ubuntu/15.10/vsftpd/vsftpd.conf
@@ -0,0 +1,24 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=002
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
diff --git a/install/ubuntu/apache2.readme.txt b/install/ubuntu/apache2.readme.txt
deleted file mode 100644
index b8d05cbe1..000000000
--- a/install/ubuntu/apache2.readme.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|
-# _| _| _| _| _| _| _|
-# _| _| _|_|_| _|_| _| _|_|_|_|
-# _| _| _| _| _| _| _|
-# _| _|_|_|_| _|_|_| _| _| _|
-#
-#
-# Server is manager by Vesta Control Panel.
-# See /etc/apache2/conf.d/vesta.conf to get a full list of running vhosts.
-#
diff --git a/install/ubuntu/certificate.crt b/install/ubuntu/certificate.crt
deleted file mode 100644
index 4a3230ac2..000000000
--- a/install/ubuntu/certificate.crt
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDqjCCApICCQCBAQdAxoNnAjANBgkqhkiG9w0BAQUFADCBljELMAkGA1UEBhMC
-VVMxFjAUBgNVBAgMDU1hc3NhY2h1c2V0dHMxEzARBgNVBAcMClN3YW1wc2NvdHQx
-EDAOBgNVBAoMB1Zlc3RhQ1AxCzAJBgNVBAsMAklUMRowGAYDVQQDDBFwYW5lbC52
-ZXN0YWNwLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B2ZXN0YWNwLmNvbTAeFw0x
-MzA5MjMwNzA0NDVaFw0xNDA5MjMwNzA0NDVaMIGWMQswCQYDVQQGEwJVUzEWMBQG
-A1UECAwNTWFzc2FjaHVzZXR0czETMBEGA1UEBwwKU3dhbXBzY290dDEQMA4GA1UE
-CgwHVmVzdGFDUDELMAkGA1UECwwCSVQxGjAYBgNVBAMMEXBhbmVsLnZlc3RhY3Au
-Y29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHZlc3RhY3AuY29tMIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvu84meigHrwPmzEbFpKe/o8FTKwO5w1VL0HU
-ILVW5EBGT76VEBqpWC+x0QrChHit14FV7m+hZRvhhkulXrknChTTNA500EVNZ5Wb
-UpDWezZDivTKAHzzq0aUwKB230Tz+k3j+duBcbzwFwirnDXb5dE5RqzBOhiIvDw9
-mjP66UyH8RxFF+pTAPlcF18zWak7KnaDreyGknzy7m+Zqs07uLnb0wTgcwIcqREP
-eqgw0E8xrEdjz1N9HIvxi+glfnjNgHja3cCYhe9ZCpDDr9ERXrEcULrqRuch6Zfv
-QKoscG4dankbq0V4DfpMBYMTvFvFLLp/uWvwLjunzfu37XmBLQIDAQABMA0GCSqG
-SIb3DQEBBQUAA4IBAQBl+GF4Ii+7cW0tWVTsDh0Kw+rjc9bEA0eF4p3LBLEsFRkP
-Yeqp2t0g8RTAAiq3OyUWYISzOX8xu0i56/3jUFazABBjz0P0w2A0BfRZS5TAEwxJ
-TS9zAgobBuLtTh3FDJJIRXLJOKLJZVUmi6D+8QIQVOox0925tMIxGc9CxLK05bIc
-HUYdHsn1gDwmTWem/XED559eWV/vGnvf3Ea0EHU76kTQaLPkul2y8BTbbLaHSw96
-1xFc8x9gqxWTT70YmBpZIApmSzvOGVXqTduMY/CeEbmigo1/1i2YMVjePFEDYnmE
-/f6rNQrtM9kgtE+glWdA7zHlaigKl3SVof1ETStB
------END CERTIFICATE-----
diff --git a/install/ubuntu/certificate.key b/install/ubuntu/certificate.key
deleted file mode 100644
index eb913d684..000000000
--- a/install/ubuntu/certificate.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAvu84meigHrwPmzEbFpKe/o8FTKwO5w1VL0HUILVW5EBGT76V
-EBqpWC+x0QrChHit14FV7m+hZRvhhkulXrknChTTNA500EVNZ5WbUpDWezZDivTK
-AHzzq0aUwKB230Tz+k3j+duBcbzwFwirnDXb5dE5RqzBOhiIvDw9mjP66UyH8RxF
-F+pTAPlcF18zWak7KnaDreyGknzy7m+Zqs07uLnb0wTgcwIcqREPeqgw0E8xrEdj
-z1N9HIvxi+glfnjNgHja3cCYhe9ZCpDDr9ERXrEcULrqRuch6ZfvQKoscG4dankb
-q0V4DfpMBYMTvFvFLLp/uWvwLjunzfu37XmBLQIDAQABAoIBAF59YsSAJCWxqgOC
-dMZh/z85JkVAbQuZRIvjhwg81eiVinZSedCDcUUMLXKnYYZPdrDM9+rM4dF4z843
-R3quJIzPq4n6kYK0mU7m8fwVY5+MRjbRV9qP+8LKZjlB8DIkHJ3FyEnRgKj5+NNd
-Xhgra0y7kx3Pxrxqgdit80qJ6OVlN2gsMjUcDBhqQev9Xs8cKYjYc1uPtFw14B2G
-5fsNE8cHJA+hH/aym7xTaEQlz/JOKn2GsH/dOhm3RM2QygdyrVOBBj6rKSi03LMb
-7QOkDvZ3nBltxQKOqs2PkYyEAdqR4dMZIPNxye/k21iVovLeMVe4lG7BmNOD6XwB
-+TOhYh0CgYEA9WyUeSNPP309Br65wg61GdapWmQIaj7HSZE06BWhp82PPwHaF1yY
-p9hWgo6fDxwHiTSLeUqEPXJMaPG+RxvYFc7Lc3JjOKU4ezR9fqz01LLtWXHVVT/x
-RZuogMyaDhIjhwMyu4mybpUMkBQ/B3DFufrzTv0y8ljAc0nlFsuXaPMCgYEAxymI
-btxZFGES6UNG7ldEaihll9MpP22/VghUeAaia0qgnXlYkbngIIhGpGJUkvZ2pduE
-tfw2S20k38qvrWXx/NhLxmiVSIvq5TFi/22dfT20kfrdCcnkrp/tRpeR72IrQ6Kx
-+6l7QHV5Gjcc4rvNc8mw7itVu+StgCYx+koD9V8CgYA8sThaaLf9XGxOEbaAXgC9
-Pg+tcdV+6L2B3O33gvnyNGx7SWr0ogqCX4atTLXbF7RpYtwnB52CUJTC0x2aGjGq
-2vQHPb95z6oTFdz/CaiWPRVjLDp0lZaF/0OBbpeeaS/uAIV4SUod/LAZpVgc7++F
-2aB35TfHJNma6ShFJd3wrwKBgBH444DtjXRTVjuKgKodYeUahCBxQ7Wfl7aRxd2W
-66027MuJGb78wQbuhUFsRimE6CwLZSxu+A9SaBNx3OyO2Ilyk1PyOBZ12dqY3FAk
-eiPFH7hUpQGvIF3JvMW0A81QVIsj8V++aYrljuoYsxiaze128+pqKrBr8GQyDiyB
-5V2NAoGBAIPWovM20cbx6LpEuFN5Pmkl500F6sTc8F3DQVRe3JhwVhqHQXv7tUE1
-VHMqpMybUQin8q/RXvJ0vr2sQEe2fVC2a0FWJTqww1eMwu1V9ppUJAfXfaYWY+XJ
-4d3myajakr0Eh3ia+IrSBcMRJ2sD3sL5KQC6jbD0R8odex4syiu2
------END RSA PRIVATE KEY-----
diff --git a/install/ubuntu/freshclam.conf b/install/ubuntu/freshclam.conf
deleted file mode 100644
index 5e6ca56c1..000000000
--- a/install/ubuntu/freshclam.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# Automatically created by the clamav-freshclam postinst
-# Comments will get lost when you reconfigure the clamav-freshclam package
-
-DatabaseOwner clamav
-UpdateLogFile /var/log/clamav/freshclam.log
-LogVerbose false
-LogSyslog false
-LogFacility LOG_LOCAL6
-LogFileMaxSize 0
-LogTime true
-Foreground false
-Debug false
-MaxAttempts 5
-DatabaseDirectory /var/lib/clamav
-DNSDatabaseInfo current.cvd.clamav.net
-AllowSupplementaryGroups false
-PidFile /var/run/clamav/freshclam.pid
-ConnectTimeout 30
-ReceiveTimeout 30
-TestDatabases yes
-ScriptedUpdates yes
-CompressLocalDatabase no
-Bytecode true
-# Check for new database 24 times a day
-Checks 24
-DatabaseMirror db.local.clamav.net
-DatabaseMirror database.clamav.net
diff --git a/install/ubuntu/nginx.readme.txt b/install/ubuntu/nginx.readme.txt
deleted file mode 100644
index e5db79e79..000000000
--- a/install/ubuntu/nginx.readme.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|
-# _| _| _| _| _| _| _|
-# _| _| _|_|_| _|_| _| _|_|_|_|
-# _| _| _| _| _| _| _|
-# _| _|_|_|_| _|_|_| _| _| _|
-#
-#
-# Server is manager by Vesta Control Panel.
-# See /etc/nginx/conf.d/vesta.conf to get a full list of running vhosts.
-#
diff --git a/install/ubuntu/sudoers.admin.conf b/install/ubuntu/sudoers.admin.conf
deleted file mode 100644
index b4f870395..000000000
--- a/install/ubuntu/sudoers.admin.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Created by vesta installer
-admin ALL=(ALL) ALL
-admin ALL=NOPASSWD:/usr/local/vesta/bin/*
diff --git a/install/ubuntu/sudoers.vestacp.conf b/install/ubuntu/sudoers.vestacp.conf
deleted file mode 100644
index fc1782282..000000000
--- a/install/ubuntu/sudoers.vestacp.conf
+++ /dev/null
@@ -1 +0,0 @@
-Defaults env_keep="VESTA"
diff --git a/install/ubuntu/vesta.conf b/install/ubuntu/vesta.conf
deleted file mode 100644
index 6c148bd17..000000000
--- a/install/ubuntu/vesta.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-WEB_SYSTEM='apache2'
-WEB_RGROUPS='www-data'
-WEB_PORT='8080'
-WEB_SSL='mod_ssl'
-WEB_SSL_PORT='8443'
-PROXY_SYSTEM='nginx'
-PROXY_PORT='80'
-PROXY_SSL_PORT='443'
-FTP_SYSTEM='vsftpd'
-MAIL_SYSTEM='exim4'
-IMAP_SYSTEM='dovecot'
-ANTIVIRUS_SYSTEM='clamav-daemon'
-ANTISPAM_SYSTEM='spamassassin'
-DB_SYSTEM='mysql'
-DNS_SYSTEM='bind9'
-STATS_SYSTEM='webalizer,awstats'
-BACKUP_SYSTEM='local'
-CRON_SYSTEM='cron'
-DISK_QUOTA='no'
-FIREWALL_SYSTEM='iptables'
-FIREWALL_EXTENSION='fail2ban'
-REPOSITORY='cmmnt'
-VERSION='0.9.8'
-LANGUAGE='en'
diff --git a/install/ubuntu/whmcs-module.php b/install/ubuntu/whmcs-module.php
deleted file mode 100644
index 1cb250611..000000000
--- a/install/ubuntu/whmcs-module.php
+++ /dev/null
@@ -1,359 +0,0 @@
- array( "Type" => "text", "Default" => "default"),
- "SSH Access" => array( "Type" => "yesno", "Description" => "Tick to grant access", ),
- "IP Address (optional)" => array( "Type" => "text" ),
- );
- return $configarray;
-
-}
-
-function vesta_CreateAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-add-user',
- 'arg1' => $params["username"],
- 'arg2' => $params["password"],
- 'arg3' => $params["clientsdetails"]["email"],
- 'arg4' => $params["configoption1"],
- 'arg5' => $params["clientsdetails"]["firstname"],
- 'arg6' => $params["clientsdetails"]["lastname"],
- );
- $postdata = http_build_query($postvars);
-
- // Create user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- // Enable ssh access
- if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-shell',
- 'arg1' => $params["username"],
- 'arg2' => 'bash'
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
- }
-
- // Add domain
- if(($answer == 'OK') && (!empty($params["domain"]))) {
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-add-domain',
- 'arg1' => $params["username"],
- 'arg2' => $params["domain"],
- 'arg3' => $params["configoption3"],
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
- }
- }
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_TerminateAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-delete-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Delete user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_SuspendAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-suspend-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Susupend user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_UnsuspendAccount($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-unsuspend-user',
- 'arg1' => $params["username"]
- );
- $postdata = http_build_query($postvars);
-
- // Unsusupend user account
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ChangePassword($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-password',
- 'arg1' => $params["username"],
- 'arg2' => $params["password"]
- );
- $postdata = http_build_query($postvars);
-
- // Change user package
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ChangePackage($params) {
-
- // Execute only if there is assigned server
- if ($params["server"] == 1) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-change-user-package',
- 'arg1' => $params["username"],
- 'arg2' => $params["configoption1"]
- );
- $postdata = http_build_query($postvars);
-
- // Change user package
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- }
-
- logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
-
- if($answer == 'OK') {
- $result = "success";
- } else {
- $result = $answer;
- }
-
- return $result;
-}
-
-function vesta_ClientArea($params) {
-
- $code = '';
- return $code;
-
-}
-
-function vesta_AdminLink($params) {
-
- $code = '';
- return $code;
-
-}
-
-function vesta_LoginLink($params) {
-
- echo "control panel ";
-
-}
-
-function vesta_UsageUpdate($params) {
-
- // Prepare variables
- $postvars = array(
- 'user' => $params["serverusername"],
- 'password' => $params["serverpassword"],
- 'hash' => $params["serveraccesshash"],
- 'cmd' => 'v-list-users',
- 'arg1' => 'json'
- );
- $postdata = http_build_query($postvars);
-
- // Get user stats
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
-
- // Decode json data
- $results = json_decode($answer, true);
-
- // Loop through results and update DB
- foreach ($results AS $user=>$values) {
- update_query("tblhosting",array(
- "diskusage"=>$values['U_DISK'],
- "disklimit"=>$values['DISK_QUOTA'],
- "bwusage"=>$values['U_BANDWIDTH'],
- "bwlimit"=>$values['BANDWIDTH'],
- "lastupdate"=>"now()",
- ),array("server"=>$params['serverid'], "username"=>$user));
- }
-
-}
-
-?>
diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh
old mode 100644
new mode 100755
index 71a136d92..0c972c79e
--- a/install/vst-install-debian.sh
+++ b/install/vst-install-debian.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Vesta Debian installer v.04
+# Vesta Debian installer v.05
#----------------------------------------------------------#
# Variables&Functions #
@@ -9,33 +9,73 @@ export PATH=$PATH:/sbin
export DEBIAN_FRONTEND=noninteractive
RHOST='apt.vestacp.com'
CHOST='c.vestacp.com'
-VERSION='0.9.8/debian'
-software="nginx apache2 apache2-utils apache2.2-common bsdutils e2fsprogs
- apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
- libapache2-mod-fcgid bind9 idn mysql-server mysql-common
- mysql-client php5-common php5-cgi php5-mysql php5-curl
- libapache2-mod-php5 vsftpd mc exim4 exim4-daemon-heavy clamav-daemon
- flex dovecot-imapd dovecot-pop3d phpMyAdmin awstats webalizer
- jwhois rssh git spamassassin roundcube roundcube-mysql
- roundcube-plugins sudo bc ftp lsof ntpdate rrdtool quota e2fslibs
- fail2ban dnsutils vesta vesta-nginx vesta-php"
+VERSION='debian'
+memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
+arch=$(uname -i)
+os='debian'
+release=$(cat /etc/issue|grep -o [0-9]|head -n1)
+codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
+vestacp="http://$CHOST/$VERSION/$release"
+if [ "$release" -eq 8 ]; then
+ software="nginx apache2 apache2-utils apache2.2-common
+ apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
+ libapache2-mod-fcgid libapache2-mod-php5 php5 php5-common php5-cgi
+ php5-mysql php5-curl php5-fpm php5-pgsql awstats webalizer vsftpd
+ proftpd-basic bind9 exim4 exim4-daemon-heavy clamav-daemon
+ spamassassin dovecot-imapd dovecot-pop3d roundcube-core
+ roundcube-mysql roundcube-plugins mysql-server mysql-common
+ mysql-client postgresql postgresql-contrib phppgadmin phpMyAdmin mc
+ flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
+ e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
+ bsdmainutils cron vesta vesta-nginx vesta-php"
+else
+ software="nginx apache2 apache2-utils apache2.2-common
+ apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
+ libapache2-mod-fcgid libapache2-mod-php5 php5 php5-common php5-cgi
+ php5-mysql php5-curl php5-fpm php5-pgsql awstats webalizer vsftpd
+ proftpd-basic proftpd-mod-vroot bind9 exim4 exim4-daemon-heavy
+ clamav-daemon spamassassin dovecot-imapd dovecot-pop3d roundcube-core
+ roundcube-mysql roundcube-plugins mysql-server mysql-common
+ mysql-client postgresql postgresql-contrib phppgadmin phpMyAdmin mc
+ flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
+ e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
+ bsdmainutils cron vesta vesta-nginx vesta-php"
+fi
+
+# Defining help function
help() {
- echo "usage: $0 [OPTIONS]
- -h, --help Print this help and exit
- -f, --force Force installation
- -i, --disable-iptables Disable iptables support
- -b, --disable-fail2ban Disable fail2ban protection
- -n, --noupdate Do not run apt-get upgrade command
- -s, --hostname Set server hostname
- -e, --email Set email address
- -p, --password Set admin password instead of generating it
- -m, --mysql-password Set MySQL password instead of generating it
- -q, --quota Enable File System Quota"
+ echo "Usage: $0 [OPTIONS]
+ -a, --apache Install Apache [yes|no] default: yes
+ -n, --nginx Install Nginx [yes|no] default: yes
+ -w, --phpfpm Install PHP-FPM [yes|no] default: no
+ -v, --vsftpd Install Vsftpd [yes|no] default: yes
+ -j, --proftpd Install ProFTPD [yes|no] default: no
+ -k, --named Install Bind [yes|no] default: yes
+ -m, --mysql Install MySQL [yes|no] default: yes
+ -g, --postgresql Install PostgreSQL [yes|no] default: no
+ -d, --mongodb Install MongoDB [yes|no] unsupported
+ -x, --exim Install Exim [yes|no] default: yes
+ -z, --dovecot Install Dovecot [yes|no] default: yes
+ -c, --clamav Install ClamAV [yes|no] default: yes
+ -t, --spamassassin Install SpamAssassin [yes|no] default: yes
+ -i, --iptables Install Iptables [yes|no] default: yes
+ -b, --fail2ban Install Fail2ban [yes|no] default: yes
+ -q, --quota Filesystem Quota [yes|no] default: no
+ -l, --lang Default language default: en
+ -y, --interactive Interactive install [yes|no] default: yes
+ -s, --hostname Set hostname
+ -e, --email Set admin email
+ -p, --password Set admin password
+ -f, --force Force installation
+ -h, --help Print this help
+
+ Example: bash $0 -e demo@vestacp.com -p p4ssw0rd --apache no --phpfpm yes"
exit 1
}
-# Password generator
+
+# Defining password-gen function
gen_pass() {
MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
LENGTH=10
@@ -46,111 +86,162 @@ gen_pass() {
echo "$PASS"
}
+# Defning return code check function
+check_result() {
+ if [ $1 -ne 0 ]; then
+ echo "Error: $2"
+ exit $1
+ fi
+}
+
+# Defining function to set default value
+set_default_value() {
+ eval variable=\$$1
+ if [ -z "$variable" ]; then
+ eval $1=$2
+ fi
+ if [ "$variable" != 'yes' ] && [ "$variable" != 'no' ]; then
+ eval $1=$2
+ fi
+}
+
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
+# Creating temporary file
+tmpfile=$(mktemp -p /tmp)
+
# Translating argument to --gnu-long-options
for arg; do
delim=""
case "$arg" in
- --help) args="${args}-h " ;;
- --force) args="${args}-f " ;;
- --disable-fail2ban) args="${args}-b " ;;
- --disable-iptables) args="${args}-i " ;;
- --noupdate) args="${args}-n " ;;
+ --apache) args="${args}-a " ;;
+ --nginx) args="${args}-n " ;;
+ --phpfpm) args="${args}-w " ;;
+ --vsftpd) args="${args}-v " ;;
+ --proftpd) args="${args}-j " ;;
+ --named) args="${args}-k " ;;
+ --mysql) args="${args}-m " ;;
+ --postgresql) args="${args}-g " ;;
+ --mongodb) args="${args}-d " ;;
+ --exim) args="${args}-x " ;;
+ --dovecot) args="${args}-z " ;;
+ --clamav) args="${args}-c " ;;
+ --spamassassin) args="${args}-t " ;;
+ --iptables) args="${args}-i " ;;
+ --fail2ban) args="${args}-b " ;;
+ --remi) args="${args}-r " ;;
+ --quota) args="${args}-q " ;;
+ --lang) args="${args}-l " ;;
+ --interactive) args="${args}-y " ;;
--hostname) args="${args}-s " ;;
--email) args="${args}-e " ;;
--password) args="${args}-p " ;;
- --mysql-password) args="${args}-m " ;;
- --quota) args="${args}-q " ;;
- *) [[ "${arg:0:1}" == "-" ]] || delim="\""
- args="${args}${delim}${arg}${delim} ";;
+ --force) args="${args}-f " ;;
+ --help) args="${args}-h " ;;
+ *) [[ "${arg:0:1}" == "-" ]] || delim="\""
+ args="${args}${delim}${arg}${delim} ";;
esac
done
eval set -- "$args"
-# Getopt
-while getopts "hfibdnqe:m:p:s:" Option; do
+# Parsing arguments
+while getopts "a:n:w:v:j:k:m:g:d:x:z:c:t:i:b:r:q:l:y:s:e:p:fh" Option; do
case $Option in
- h) help ;; # Help
- f) force='yes' ;; # Force install
- i) disable_iptables='yes' ;; # Disable iptables
- b) disable_fail2ban='yes' ;; # Disable fail2ban
- n) noupdate='yes' ;; # Disable apt-get upgrade
- s) servername=$OPTARG ;; # Server hostname
- e) email=$OPTARG ;; # Set email
- p) vpass=$OPTARG ;; # Admin password
- m) mpass=$OPTARG ;; # MySQL pasword
- q) quota='yes' ;; # Enable quota
- *) help ;; # Default
+ a) apache=$OPTARG ;; # Apache
+ n) nginx=$OPTARG ;; # Nginx
+ w) phpfpm=$OPTARG ;; # PHP-FPM
+ v) vsftpd=$OPTARG ;; # Vsftpd
+ j) proftpd=$OPTARG ;; # Proftpd
+ k) named=$OPTARG ;; # Named
+ m) mysql=$OPTARG ;; # MySQL
+ g) postgresql=$OPTARG ;; # PostgreSQL
+ d) mongodb=$OPTARG ;; # MongoDB (unsupported)
+ x) exim=$OPTARG ;; # Exim
+ z) dovecot=$OPTARG ;; # Dovecot
+ c) clamd=$OPTARG ;; # ClamAV
+ t) spamd=$OPTARG ;; # SpamAssassin
+ i) iptables=$OPTARG ;; # Iptables
+ b) fail2ban=$OPTARG ;; # Fail2ban
+ r) remi=$OPTARG ;; # Remi repo
+ q) quota=$OPTARG ;; # FS Quota
+ l) lang=$OPTARG ;; # Language
+ y) interactive=$OPTARG ;; # Interactive install
+ s) servername=$OPTARG ;; # Hostname
+ e) email=$OPTARG ;; # Admin email
+ p) vpass=$OPTARG ;; # Admin password
+ f) force='yes' ;; # Force install
+ h) help ;; # Help
+ *) help ;; # Print help (default)
esac
done
-# Am I root?
-if [ "x$(id -u)" != 'x0' ]; then
- echo 'Error: this script can only be executed by root'
- exit 1
-fi
-
-# Check supported version
-if [ -e '/etc/redhat-release' ] || [ "$(lsb_release -si)" == "Ubuntu" ]; then
- echo 'Error: sorry, this installer works only on Debian 7'
- exit 1
-fi
-
-# Check supported OS
-if [ "$(arch)" != 'x86_64' ]; then
- arch='i386'
+# Defining default software stack
+set_default_value 'nginx' 'yes'
+set_default_value 'apache' 'yes'
+set_default_value 'phpfpm' 'no'
+set_default_value 'vsftpd' 'yes'
+set_default_value 'proftpd' 'no'
+set_default_value 'named' 'yes'
+set_default_value 'mysql' 'yes'
+set_default_value 'postgresql' 'no'
+set_default_value 'mongodb' 'no'
+set_default_value 'exim' 'yes'
+set_default_value 'dovecot' 'yes'
+if [ $memory -lt 1500000 ]; then
+ set_default_value 'clamd' 'no'
+ set_default_value 'spamd' 'no'
else
- arch="amd64"
+ set_default_value 'clamd' 'yes'
+ set_default_value 'spamd' 'yes'
fi
-os=$(head -n1 /etc/issue | cut -f 1 -d ' ')
-if [[ "$(cut -f 1 -d . /etc/debian_version)" -eq '7' ]]; then
- release="7"
- codename="wheezy"
+set_default_value 'iptables' 'yes'
+set_default_value 'fail2ban' 'yes'
+set_default_value 'quota' 'no'
+set_default_value 'lang' 'en'
+set_default_value 'interactive' 'yes'
+
+# Checking software conflicts
+if [ "$phpfpm" = 'yes' ]; then
+ apache='no'
+ nginx='yes'
fi
-if [ $codename != 'wheezy' ]; then
- echo 'Error: only Debian 7 is supported'
- exit 1
+if [ "$proftpd" = 'yes' ]; then
+ vsftpd='no'
+fi
+if [ "$exim" = 'no' ]; then
+ clamd='no'
+ spamd='no'
+ dovecot='no'
+fi
+if [ "$iptables" = 'no' ]; then
+ fail2ban='no'
fi
-# Check admin user account
-if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" != 'yes' ]; then
- echo "Error: user admin exists"
- echo
+# Checking root permissions
+if [ "x$(id -u)" != 'x0' ]; then
+ check_error 1 "Script can be run executed only by root"
+fi
+
+# Checking admin user account
+if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
echo 'Please remove admin user account before proceeding.'
echo 'If you want to do it automatically run installer with -f option:'
- echo "Example: bash $0 --force"
- exit 1
+ echo -e "Example: bash $0 --force\n"
+ check_result 1 "User admin exists"
fi
-# Check admin group
-if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" != 'yes' ]; then
- echo "Error: group admin exists"
- echo
- echo 'Please remove admin group before proceeding.'
- echo 'If you want to do it automatically run installer with -f option:'
- echo "Example: bash $0 --force"
- exit 1
-fi
-
-# Check wget
+# Checking wget
if [ ! -e '/usr/bin/wget' ]; then
apt-get -y install wget
- if [ $? -ne 0 ]; then
- echo "Error: can't install wget"
- exit 1
- fi
+ check_result $? "Can't install wget"
fi
-# Check repo availability
-wget -q "$CHOST/$VERSION/vesta.conf" -O /dev/null
-if [ $? -ne 0 ]; then
- echo "Error: no access to repository"
- exit 1
-fi
+# Checking repository availability
+wget -q "$vestacp/deb_signing.key" -O /dev/null
+check_result $? "No access to Vesta repository"
# Check installed packages
tmpfile=$(mktemp -p /tmp)
@@ -173,211 +264,306 @@ if [ ! -z "$conflicts" ] && [ -z "$force" ]; then
echo
echo '!!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!'
echo
- exit 1
+ check_result 1 "Control Panel should be installed on clean server."
fi
-# Check server type
-memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
-if [ "$memory" -lt '350000' ] && [ -z "$force" ]; then
- echo "Error: not enough memory to install Vesta Control Panel."
- echo -e "\nMinimum RAM required: 350Mb"
- echo 'If you want to force installation run this script with -f option:'
- echo "Example: bash $0 --force"
- exit 1
-fi
-srv_type='micro'
-if [ "$memory" -gt '1000000' ]; then
- srv_type='small'
+#----------------------------------------------------------#
+# Brief Info #
+#----------------------------------------------------------#
+
+# Printing nice ascii aslogo
+clear
+echo
+echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|'
+echo ' _| _| _| _| _| _| _|'
+echo ' _| _| _|_|_| _|_| _| _|_|_|_|'
+echo ' _| _| _| _| _| _| _|'
+echo ' _| _|_|_|_| _|_|_| _| _| _|'
+echo
+echo ' Vesta Control Panel'
+echo -e "\n\n"
+
+echo 'Following software will be installed on your system:'
+
+# Web stack
+if [ "$nginx" = 'yes' ]; then
+ echo ' - Nginx Web Server'
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
+ echo ' - Apache Web Server'
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
+ echo ' - Apache Web Server (as backend)'
+fi
+if [ "$phpfpm" = 'yes' ]; then
+ echo ' - PHP-FPM Application Server'
fi
-if [ "$memory" -gt '3000000' ]; then
- srv_type='medium'
+# DNS stack
+if [ "$named" = 'yes' ]; then
+ echo ' - Bind DNS Server'
fi
-if [ "$memory" -gt '7000000' ]; then
- srv_type='large'
-fi
-
-# Are you sure ?
-if [ -z $email ]; then
- clear
- echo
- echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_| '
- echo ' _| _| _| _| _| _| _| '
- echo ' _| _| _|_|_| _|_| _| _|_|_|_| '
- echo ' _| _| _| _| _| _| _| '
- echo ' _| _|_|_|_| _|_|_| _| _| _| '
- echo
- echo ' Vesta Control Panel'
- echo
- echo
- echo 'Following software will be installed on your system:'
- echo ' - Nginx frontend web server'
- echo ' - Apache application web server'
- echo ' - Bind DNS server'
- echo ' - Exim mail server'
- echo ' - Dovecot IMAP and POP3 server'
- if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
- echo ' - Clam mail antivirus'
- echo ' - SpamAssassin antispam'
+# Mail Stack
+if [ "$exim" = 'yes' ]; then
+ echo -n ' - Exim mail server'
+ if [ "$clamd" = 'yes' ] || [ "$spamd" = 'yes' ] ; then
+ echo -n ' + '
+ if [ "$clamd" = 'yes' ]; then
+ echo -n 'Antivirus '
+ fi
+ if [ "$spamd" = 'yes' ]; then
+ echo -n 'Antispam'
+ fi
fi
- echo ' - MySQL database server'
- echo ' - Vsftpd FTP server'
- echo
- echo
+ echo
+ if [ "$dovecot" = 'yes' ]; then
+ echo ' - Dovecot POP3/IMAP Server'
+ fi
+fi
- read -p 'Do you want to proceed? [y/n]): ' answer
+# DB stack
+if [ "$mysql" = 'yes' ]; then
+ echo ' - MySQL Database Server'
+fi
+if [ "$postgresql" = 'yes' ]; then
+ echo ' - PostgreSQL Database Server'
+fi
+if [ "$mongodb" = 'yes' ]; then
+ echo ' - MongoDB Database Server'
+fi
+
+# FTP stack
+if [ "$vsftpd" = 'yes' ]; then
+ echo ' - Vsftpd FTP Server'
+fi
+if [ "$proftpd" = 'yes' ]; then
+ echo ' - ProFTPD FTP Server'
+fi
+
+# Firewall stack
+if [ "$iptables" = 'yes' ]; then
+ echo -n ' - Iptables Firewall'
+fi
+if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
+ echo -n ' + Fail2Ban'
+fi
+echo -e "\n\n"
+
+# Asking for confirmation to proceed
+if [ "$interactive" = 'yes' ]; then
+ read -p 'Would you like to continue [y/n]: ' answer
if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then
echo 'Goodbye'
exit 1
fi
- # Check email
- read -p 'Please enter valid email address: ' email
+ # Asking for contact email
+ if [ -z "$email" ]; then
+ read -p 'Please enter admin email address: ' email
+ fi
- # Define server hostname
+ # Asking to set FQDN hostname
if [ -z "$servername" ]; then
- read -p "Please enter hostname [$(hostname)]: " servername
+ read -p "Please enter FQDN hostname [$(hostname)]: " servername
fi
fi
-# Validate email
-local_part=$(echo $email | cut -s -f1 -d\@)
-remote_host=$(echo $email | cut -s -f2 -d\@)
-mx_failed=1
-if [ ! -z "$remote_host" ] && [ ! -z "$local_part" ]; then
- /usr/bin/host -t mx "$remote_host" > /dev/null 2>&1
- mx_failed="$?"
+# Generating admin password if it wasn't set
+if [ -z "$vpass" ]; then
+ vpass=$(gen_pass)
fi
-if [ "$mx_failed" -eq 1 ]; then
- echo "Error: email $email is not valid"
- exit 1
+# Set hostname if it wasn't set
+if [ -z "$servername" ]; then
+ servername=$(hostname -f)
+fi
+
+# Set email if it wasn't set
+if [ -z "$email" ]; then
+ email="admin@$servername"
+fi
+
+# Defining backup directory
+vst_backups="/root/vst_install_backups/$(date +%s)"
+echo "Installation backup directory: $vst_backups"
+
+# Printing start message and sleeping for 5 seconds
+echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
+sleep 5
+
+
+#----------------------------------------------------------#
+# Checking swap #
+#----------------------------------------------------------#
+
+# Checking swap on small instances
+if [ -z "$(swapon -s)" ] && [ $memory -lt 1000000 ]; then
+ fallocate -l 1G /swapfile
+ chmod 600 /swapfile
+ mkswap /swapfile
+ swapon /swapfile
+ echo "/swapfile none swap sw 0 0" >> /etc/fstab
fi
#----------------------------------------------------------#
# Install repository #
#----------------------------------------------------------#
-# Let's start
-echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
-sleep 5
-# Update system
-if [ -z "$noupdate" ]; then
- apt-get -y upgrade
- if [ $? -ne 0 ]; then
- echo 'Error: apt-get upgrade failed'
- exit 1
- fi
-fi
+# Updating system
+apt-get -y upgrade
+check_result $? 'apt-get upgrade failed'
-# Install nginx repo
+# Installing nginx repo
apt=/etc/apt/sources.list.d
echo "deb http://nginx.org/packages/debian/ $codename nginx" > $apt/nginx.list
wget http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
apt-key add /tmp/nginx_signing.key
-# Install vesta repo
+# Installing vesta repo
echo "deb http://$RHOST/$codename/ $codename vesta" > $apt/vesta.list
wget $CHOST/deb_signing.key -O deb_signing.key
apt-key add deb_signing.key
#----------------------------------------------------------#
-# Backups #
+# Backup #
#----------------------------------------------------------#
-# Prepare backup tree
-vst_backups="/root/vst_install_backups/$(date +%s)"
-mkdir -p $vst_backups/nginx
-mkdir -p $vst_backups/apache2
-mkdir -p $vst_backups/mysql
-mkdir -p $vst_backups/exim4
-mkdir -p $vst_backups/dovecot
-mkdir -p $vst_backups/clamav
-mkdir -p $vst_backups/spamassassin
-mkdir -p $vst_backups/vsftpd
-mkdir -p $vst_backups/bind
-mkdir -p $vst_backups/vesta
-mkdir -p $vst_backups/home
+# Creating backup directory tree
+mkdir -p $vst_backups
+cd $vst_backups
+mkdir nginx apache2 php5 php5-fpm vsftpd proftpd bind exim4 dovecot clamd
+mkdir spamassassin mysql postgresql mongodb vesta
-# Backup sudoers
-if [ -e '/etc/sudoers' ]; then
- cp /etc/sudoers $vst_backups/
-fi
-
-# Backup nginx
+# Backing up Nginx configuration
service nginx stop > /dev/null 2>&1
-if [ -e '/etc/nginx/nginx.conf' ]; then
- cp -r /etc/nginx/* $vst_backups/nginx/
-fi
+cp -r /etc/nginx/* $vst_backups/nginx >/dev/null 2>&1
-# Backup apache2
+# Backing up Apache configuration
service apache2 stop > /dev/null 2>&1
-if [ -e '/etc/apache2/apache2.conf' ]; then
- cp -r /etc/apache2/* $vst_backups/apache2/
-fi
+cp -r /etc/apache2/* $vst_backups/apache2 > /dev/null 2>&1
+rm -f /etc/apache2/conf.d/* > /dev/null 2>&1
-# Backup bind9
+# Backing up PHP configuration
+cp /etc/php.ini $vst_backups/php > /dev/null 2>&1
+cp -r /etc/php.d $vst_backups/php > /dev/null 2>&1
+
+# Backing up PHP configuration
+service php5-fpm stop >/dev/null 2>&1
+cp /etc/php5/* $vst_backups/php5 > /dev/null 2>&1
+rm -f /etc/php5/fpm/pool.d/* >/dev/null 2>&1
+
+# Backing up Bind configuration
service bind9 stop > /dev/null 2>&1
-if [ -e '/etc/bind/named.conf' ]; then
- cp -r /etc/bind/* $vst_backups/bind/
-fi
+cp -r /etc/bind/* $vst_backups/bind > /dev/null 2>&1
-# Backup vsftpd
+# Backing up Vsftpd configuration
service vsftpd stop > /dev/null 2>&1
-if [ -e '/etc/vsftpd.conf' ]; then
- cp /etc/vsftpd.conf $vst_backups/vsftpd/
-fi
+cp /etc/vsftpd.conf $vst_backups/vsftpd > /dev/null 2>&1
-# Backup exim4
+# Backing up ProFTPD configuration
+service proftpd stop > /dev/null 2>&1
+cp /etc/proftpd.conf $vst_backups/proftpd >/dev/null 2>&1
+
+# Backing up Exim configuration
service exim4 stop > /dev/null 2>&1
-if [ -e '/etc/exim4/exim4.conf.template' ]; then
- cp -r /etc/exim4/* $vst_backups/exim4/
-fi
+cp -r /etc/exim4/* $vst_backups/exim4 > /dev/null 2>&1
-# Backup clamav
+# Backing up ClamAV configuration
service clamav-daemon stop > /dev/null 2>&1
-if [ -e '/etc/clamav/clamd.conf' ]; then
- cp -r /etc/clamav/* $vst_backups/clamav/
-fi
+cp -r /etc/clamav/* $vst_backups/clamav > /dev/null 2>&1
-# Backup SpamAssassin
+# Backing up SpamAssassin configuration
service spamassassin stop > /dev/null 2>&1
-if [ -e '/etc/spamassassin/local.cf' ]; then
- cp -r /etc/spamassassin/* $vst_backups/spamassassin/
-fi
+cp -r /etc/spamassassin/* $vst_backups/spamassassin > /dev/null 2>&1
-# Backup dovecot
+# Backing up Dovecot configuration
service dovecot stop > /dev/null 2>&1
-if [ -e '/etc/dovecot.conf' ]; then
- cp /etc/dovecot.conf $vst_backups/dovecot/
-fi
-if [ -e '/etc/dovecot' ]; then
- cp -r /etc/dovecot/* $vst_backups/dovecot/
-fi
+cp /etc/dovecot.conf $vst_backups/dovecot > /dev/null 2>&1
+cp -r /etc/dovecot/* $vst_backups/dovecot > /dev/null 2>&1
-# Backup MySQL stuff
+# Backing up MySQL/MariaDB configuration and data
service mysql stop > /dev/null 2>&1
-if [ -e '/var/lib/mysql' ]; then
- mv /var/lib/mysql $vst_backups/mysql/mysql_datadir
-fi
-if [ -e '/etc/mysql/my.cnf' ]; then
- cp -r /etc/mysql/* $vst_backups/mysql/
-fi
-if [ -e '/root/.my.cnf' ]; then
- mv /root/.my.cnf $vst_backups/mysql/
-fi
+killall -9 mysqld > /dev/null 2>&1
+mv /var/lib/mysql $vst_backups/mysql/mysql_datadir > /dev/null 2>&1
+cp -r /etc/mysql/* $vst_backups/mysql > /dev/null 2>&1
+mv -f /root/.my.cnf $vst_backups/mysql > /dev/null 2>&1
# Backup vesta
service vesta stop > /dev/null 2>&1
-if [ -e '/usr/local/vesta' ]; then
- cp -r /usr/local/vesta/* $vst_backups/vesta/
- apt-get -y remove vesta*
- apt-get -y purge vesta*
- rm -rf /usr/local/vesta
+cp -r /usr/local/vesta/* $vst_backups/vesta > /dev/null 2>&1
+apt-get -y remove vesta vesta-nginx vesta-php > /dev/null 2>&1
+apt-get -y purge vesta vesta-nginx vesta-php > /dev/null 2>&1
+rm -rf /usr/local/vesta > /dev/null 2>&1
+
+
+#----------------------------------------------------------#
+# Package Excludes #
+#----------------------------------------------------------#
+
+# Excluding packages
+if [ "$nginx" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/^nginx//")
+fi
+if [ "$apache" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/apache2 //")
+ software=$(echo "$software" | sed -e "s/apache2-utils//")
+ software=$(echo "$software" | sed -e "s/apache2-suexec-custom//")
+ software=$(echo "$software" | sed -e "s/apache2.2-common//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-rpaf//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-fcgid//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-php5//")
+fi
+if [ "$phpfpm" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/php5-fpm//")
+fi
+if [ "$vsftpd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/vsftpd//")
+fi
+if [ "$proftpd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/proftpd-basic//")
+ software=$(echo "$software" | sed -e "s/proftpd-mod-vroot//")
+fi
+if [ "$named" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/bind9//")
+fi
+if [ "$exim" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/exim4 //")
+ software=$(echo "$software" | sed -e "s/exim4-daemon-heavy//")
+ software=$(echo "$software" | sed -e "s/dovecot-imapd//")
+ software=$(echo "$software" | sed -e "s/dovecot-pop3d//")
+ software=$(echo "$software" | sed -e "s/clamav-daemon//")
+ software=$(echo "$software" | sed -e "s/spamassassin//")
+fi
+if [ "$clamd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/clamav-daemon//")
+fi
+if [ "$spamd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/spamassassin//")
+fi
+if [ "$dovecot" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/dovecot-imapd//")
+ software=$(echo "$software" | sed -e "s/dovecot-pop3d//")
+fi
+if [ "$mysql" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/mysql-server//')
+ software=$(echo "$software" | sed -e 's/mysql-client//')
+ software=$(echo "$software" | sed -e 's/mysql-common//')
+ software=$(echo "$software" | sed -e 's/php5-mysql//')
+ software=$(echo "$software" | sed -e 's/phpMyAdmin//')
+fi
+if [ "$postgresql" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/postgresql-contrib//')
+ software=$(echo "$software" | sed -e 's/postgresql//')
+ software=$(echo "$software" | sed -e 's/php5-pgsql//')
+ software=$(echo "$software" | sed -e 's/phppgadmin//')
+fi
+if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/fail2ban//')
fi
@@ -385,37 +571,16 @@ fi
# Install packages #
#----------------------------------------------------------#
-# Exclude heavy packages
-if [ "$srv_type" = 'micro' ]; then
- software=$(echo "$software" | sed -e 's/libapache2-mod-fcgid//')
- software=$(echo "$software" | sed -e 's/clamav-daemon//')
- software=$(echo "$software" | sed -e 's/spamassassin//')
-fi
-
-if [ "$srv_type" = 'small' ]; then
- software=$(echo "$software" | sed -e 's/clamav-daemon//')
- software=$(echo "$software" | sed -e 's/spamassassin//')
-fi
-
-# Exclude fail2ban
-if [ "$disable_fail2ban" = 'yes' ]; then
- software=$(echo "$software" | sed -e 's/fail2ban//')
-fi
-
# Update system packages
apt-get update
-# Disable daemon autostart
-# For more details /usr/share/doc/sysv-rc/README.policy-rc.d.gz
+# Disable daemon autostart /usr/share/doc/sysv-rc/README.policy-rc.d.gz
echo -e '#!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
chmod a+x /usr/sbin/policy-rc.d
-# Install Vesta packages
+# Install apt packages
apt-get -y install $software
-if [ $? -ne 0 ]; then
- echo 'Error: apt-get install failed'
- exit 1
-fi
+check_result $? "apt-get install failed"
# Restore policy
rm -f /usr/sbin/policy-rc.d
@@ -425,93 +590,6 @@ rm -f /usr/sbin/policy-rc.d
# Configure system #
#----------------------------------------------------------#
-# Set writable permission on tmp directory
-chmod 777 /tmp
-
-# Vesta configuration
-echo "export VESTA='/usr/local/vesta'" > /etc/profile.d/vesta.sh
-chmod 755 /etc/profile.d/vesta.sh
-source /etc/profile.d/vesta.sh
-echo 'PATH=$PATH:/usr/local/vesta/bin' >> /root/.bash_profile
-echo 'export PATH' >> /root/.bash_profile
-source /root/.bash_profile
-wget $CHOST/$VERSION/vesta.log -O /etc/logrotate.d/vesta
-
-# Directory tree
-mkdir -p $VESTA/conf
-mkdir -p $VESTA/log
-mkdir -p $VESTA/ssl
-mkdir -p $VESTA/data
-mkdir -p $VESTA/data/ips
-mkdir -p $VESTA/data/queue
-mkdir -p $VESTA/data/users
-mkdir -p $VESTA/data/firewall
-touch $VESTA/data/queue/backup.pipe
-touch $VESTA/data/queue/disk.pipe
-touch $VESTA/data/queue/webstats.pipe
-touch $VESTA/data/queue/restart.pipe
-touch $VESTA/data/queue/traffic.pipe
-chmod 750 $VESTA/conf
-chmod 750 $VESTA/data/users
-chmod 750 $VESTA/data/ips
-chmod -R 750 $VESTA/data/queue
-ln -s /usr/local/vesta/log /var/log/vesta
-touch /var/log/vesta/system.log
-touch /var/log/vesta/nginx-error.log
-touch /var/log/vesta/auth.log
-chmod 660 /var/log/vesta/*
-adduser backup > /dev/null 2>&1
-mkdir -p /home/backup
-chown backup:backup /home/backup
-ln -s /home/backup /backup
-chmod a+x /backup
-
-# vesta.conf
-wget $CHOST/$VERSION/vesta.conf -O $VESTA/conf/vesta.conf
-if [ "$srv_type" = 'micro' ] || [ "$srv_type" = 'small' ]; then
- sed -i "s/clamav-daemon//g" $VESTA/conf/vesta.conf
- sed -i "s/spamassassin//g" $VESTA/conf/vesta.conf
-fi
-
-# Set server hostname
-if [ -z "$servername" ]; then
- servername=$(hostname)
-fi
-/usr/local/vesta/bin/v-change-sys-hostname $servername 2>/dev/null
-
-# Templates
-cd /usr/local/vesta/data
-wget $CHOST/$VERSION/packages.tar.gz -O packages.tar.gz
-tar -xzf packages.tar.gz
-rm -f packages.tar.gz
-cd /usr/local/vesta/data
-wget $CHOST/$VERSION/templates.tar.gz -O templates.tar.gz
-tar -xzf templates.tar.gz
-rm -f templates.tar.gz
-chmod -R 755 /usr/local/vesta/data/templates
-cp templates/web/skel/public_html/index.html /var/www/
-sed -i 's/%domain%/It worked!/g' /var/www/index.html
-if [ "$srv_type" = 'micro' ]; then
- rm -f /usr/local/vesta/data/templates/web/apache2/phpfcgid.*
-fi
-
-# Generating SSL certificate
-$VESTA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
- 'San Francisco' 'Vesta Control Panel' 'IT' > /tmp/vst.pem
-
-# Parsing merged certificate file
-crt_end=$(grep -n "END CERTIFICATE-" /tmp/vst.pem |cut -f 1 -d:)
-key_start=$(grep -n "BEGIN RSA" /tmp/vst.pem |cut -f 1 -d:)
-key_end=$(grep -n "END RSA" /tmp/vst.pem |cut -f 1 -d:)
-
-# Adding SSL certificate
-cd /usr/local/vesta/ssl
-sed -n "1,${crt_end}p" /tmp/vst.pem > certificate.crt
-sed -n "$key_start,${key_end}p" /tmp/vst.pem > certificate.key
-chown root:mail /usr/local/vesta/ssl/*
-chmod 660 /usr/local/vesta/ssl/*
-rm /tmp/vst.pem
-
# Enable SSH password auth
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
service ssh restart
@@ -528,13 +606,6 @@ echo 'LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
# Register /sbin/nologin
echo "/sbin/nologin" >> /etc/shells
-# Sudo configuration
-wget $CHOST/$VERSION/sudoers.conf -O /etc/sudoers
-wget $CHOST/$VERSION/sudoers.admin.conf -O /etc/sudoers.d/admin
-chmod 440 /etc/sudoers
-chmod 440 /etc/sudoers.d/admin
-echo 'Defaults:admin !syslog' >>/etc/sudoers.d/admin
-
# NTP Synchronization
echo '#!/bin/sh' > /etc/cron.daily/ntpdate
echo "$(which ntpdate) -s pool.ntp.org" >> /etc/cron.daily/ntpdate
@@ -550,279 +621,532 @@ sed -i 's/#allowsftp/allowsftp/' /etc/rssh.conf
sed -i 's/#allowrsync/allowrsync/' /etc/rssh.conf
chmod 755 /usr/bin/rssh
-# Nginx configuration
-rm -f /etc/nginx/conf.d/*.conf
-wget $CHOST/$VERSION/nginx.conf -O /etc/nginx/nginx.conf
-wget $CHOST/$VERSION/nginx-status.conf -O /etc/nginx/conf.d/status.conf
-touch /etc/nginx/conf.d/vesta.conf
-update-rc.d nginx defaults
-service nginx stop > /dev/null 2>&1
-service nginx start
-if [ "$?" -ne 0 ]; then
- echo "Error: nginx start failed"
- exit 1
+
+#----------------------------------------------------------#
+# Configure VESTA #
+#----------------------------------------------------------#
+
+# Downloading sudo configuration
+mkdir -p /etc/sudoers.d
+wget $vestacp/sudo/admin -O /etc/sudoers.d/admin
+chmod 440 /etc/sudoers.d/admin
+
+# Configuring system env
+echo "export VESTA='/usr/local/vesta'" > /etc/profile.d/vesta.sh
+chmod 755 /etc/profile.d/vesta.sh
+source /etc/profile.d/vesta.sh
+echo 'PATH=$PATH:/usr/local/vesta/bin' >> /root/.bash_profile
+echo 'export PATH' >> /root/.bash_profile
+source /root/.bash_profile
+
+# Configuring logrotate for vesta logs
+wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta
+
+# Building directory tree and creating some blank files for vesta
+mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
+ $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall
+touch $VESTA/data/queue/backup.pipe $VESTA/data/queue/disk.pipe \
+ $VESTA/data/queue/webstats.pipe $VESTA/data/queue/restart.pipe \
+ $VESTA/data/queue/traffic.pipe $VESTA/log/system.log \
+ $VESTA/log/nginx-error.log $VESTA/log/auth.log
+chmod 750 $VESTA/conf $VESTA/data/users $VESTA/data/ips $VESTA/log
+chmod -R 750 $VESTA/data/queue
+chmod 660 $VESTA/log/*
+rm -f /var/log/vesta
+ln -s /usr/local/vesta/log /var/log/vesta
+
+# Generating vesta configuration
+rm -f $VESTA/conf/vesta.conf 2>/dev/null
+touch $VESTA/conf/vesta.conf
+chmod 660 $VESTA/conf/vesta.conf
+
+# WEB stack
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
+ echo "WEB_SYSTEM='apache2'" >> $VESTA/conf/vesta.conf
+ echo "WEB_RGROUPS='www-data'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='mod_ssl'" >> $VESTA/conf/vesta.conf
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
+ echo "WEB_SYSTEM='apache2'" >> $VESTA/conf/vesta.conf
+ echo "WEB_RGROUPS='www-data'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='8080'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='8443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='mod_ssl'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_SYSTEM='nginx'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$apache" = 'no' ] && [ "$nginx" = 'yes' ]; then
+ echo "WEB_SYSTEM='nginx'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='openssl'" >> $VESTA/conf/vesta.conf
+ if [ "$phpfpm" = 'yes' ]; then
+ echo "WEB_BACKEND='php5-fpm'" >> $VESTA/conf/vesta.conf
+ fi
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
fi
-# Apache configuration
-wget $CHOST/$VERSION/apache2.conf -O /etc/apache2/apache2.conf
-wget $CHOST/$VERSION/apache2-status.conf \
- -O /etc/apache2/mods-enabled/status.conf
-wget $CHOST/$VERSION/apache2.log -O /etc/logrotate.d/apache2
-rm -f /etc/apache2/conf.d/vesta.conf
-echo > /etc/apache2/conf.d/vesta.conf
-echo "# Powered by vesta" > /etc/apache2/sites-available/default
-echo "# Powered by vesta" > /etc/apache2/sites-available/default-ssl
-echo "# Powered by vesta" > /etc/apache2/ports.conf
-touch /var/log/apache2/access.log
-touch /var/log/apache2/error.log
-mkdir -p /var/log/apache2/domains
-chmod a+x /var/log/apache2
-chmod 640 /var/log/apache2/access.log
-chmod 640 /var/log/apache2/error.log
-chmod 751 /var/log/apache2/domains
-a2enmod rewrite
-a2enmod suexec
-a2enmod ssl
-a2enmod actions
-a2enmod ruid2
-echo -e "/home\npublic_html/cgi-bin" > /etc/apache2/suexec/www-data
-update-rc.d apache2 defaults
-service apache2 stop > /dev/null 2>&1
-service apache2 start
-if [ "$?" -ne 0 ]; then
- echo "Error: apache2 start failed"
- exit 1
+# FTP stack
+if [ "$vsftpd" = 'yes' ]; then
+ echo "FTP_SYSTEM='vsftpd'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$proftpd" = 'yes' ]; then
+ echo "FTP_SYSTEM='proftpd'" >> $VESTA/conf/vesta.conf
fi
-# Vsftpd configuration
-wget $CHOST/$VERSION/vsftpd.conf -O /etc/vsftpd.conf
-update-rc.d vsftpd defaults
-service vsftpd stop > /dev/null 2>&1
-service vsftpd start
-if [ "$?" -ne 0 ]; then
- echo "Error: vsftpd start failed"
- exit 1
+# DNS stack
+if [ "$named" = 'yes' ]; then
+ echo "DNS_SYSTEM='bind9'" >> $VESTA/conf/vesta.conf
fi
-# Generating MySQL password if it wasn't set
-if [ -z "$mpass" ]; then
- mpass=$(gen_pass)
+# Mail stack
+if [ "$exim" = 'yes' ]; then
+ echo "MAIL_SYSTEM='exim4'" >> $VESTA/conf/vesta.conf
+ if [ "$clamd" = 'yes' ]; then
+ echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $VESTA/conf/vesta.conf
+ fi
+ if [ "$spamd" = 'yes' ]; then
+ echo "ANTISPAM_SYSTEM='spamassassin'" >> $VESTA/conf/vesta.conf
+ fi
+ if [ "$dovecot" = 'yes' ]; then
+ echo "IMAP_SYSTEM='dovecot'" >> $VESTA/conf/vesta.conf
+ fi
fi
-# MySQL configuration
-wget $CHOST/$VERSION/my.cnf -O /etc/mysql/my.cnf
-mysql_install_db
-update-rc.d mysql defaults
-service mysql stop > /dev/null 2>&1
-service mysql start
-if [ "$?" -ne 0 ]; then
- echo "Error: mysql start failed"
- exit 1
-fi
-mysqladmin -u root password $mpass
-echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
-chmod 600 /root/.my.cnf
-mysql -e "DELETE FROM mysql.user WHERE User=''"
-mysql -e "DROP DATABASE test" > /dev/null 2>&1
-mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
-mysql -e "DELETE FROM mysql.user WHERE user='' or password='';"
-mysql -e "FLUSH PRIVILEGES"
+# CRON daemon
+echo "CRON_SYSTEM='cron'" >> $VESTA/conf/vesta.conf
-# Bind configuration
-wget $CHOST/$VERSION/named.conf -O /etc/bind/named.conf
-sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
-chown root:bind /etc/bind/named.conf
-chmod 640 /etc/bind/named.conf
-update-rc.d bind9 defaults
-service bind9 stop > /dev/null 2>&1
-service bind9 start
-if [ "$?" -ne 0 ]; then
- echo "Error: bind9 start failed"
- exit 1
+# Firewall stack
+if [ "$iptables" = 'yes' ]; then
+ echo "FIREWALL_SYSTEM='iptables'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
+ echo "FIREWALL_EXTENSION='fail2ban'" >> $VESTA/conf/vesta.conf
fi
-# Exim
-wget $CHOST/$VERSION/exim4.conf.template -O /etc/exim4/exim4.conf.template
-if [ "$srv_type" != 'micro' ] && [ "$srv_type" != 'small' ]; then
- sed -i "s/#SPAM/SPAM/g" /etc/exim4/exim4.conf.template
- sed -i "s/#CLAMD/CLAMD/g" /etc/exim4/exim4.conf.template
-fi
-wget $CHOST/$VERSION/dnsbl.conf -O /etc/exim4/dnsbl.conf
-wget $CHOST/$VERSION/spam-blocks.conf -O /etc/exim4/spam-blocks.conf
-touch /etc/exim4/white-blocks.conf
-rm -rf /etc/exim4/domains
-mkdir -p /etc/exim4/domains
-chmod 640 /etc/exim4/exim4.conf.template
-gpasswd -a Debian-exim mail
-if [ -e /etc/init.d/sendmail ]; then
- update-rc.d -f sendmail remove
- service sendmail stop
-fi
-if [ -e /etc/init.d/postfix ]; then
- update-rc.d -f postfix remove
- service postfix stop
-fi
-rm -f /etc/alternatives/mta
-ln -s /usr/sbin/exim4 /etc/alternatives/mta
-update-rc.d exim4 defaults
-service exim4 stop > /dev/null 2>&1
-service exim4 start
-if [ "$?" -ne 0 ]; then
- echo "Error: exim start failed"
- exit
+# Disk quota
+if [ "$quota" = 'yes' ]; then
+ echo "DISK_QUOTA='yes'" >> $VESTA/conf/vesta.conf
fi
-# Dovecot configuration
-wget $CHOST/$VERSION/dovecot.conf -O /etc/dovecot/dovecot.conf
-cd /etc/dovecot/
-wget $CHOST/$VERSION/dovecot-conf.d.tar.gz
-rm -rf conf.d *.ext README
-tar -xzf dovecot-conf.d.tar.gz
-rm -f dovecot-conf.d.tar.gz
-chown -R root:root /etc/dovecot
-gpasswd -a dovecot mail
-update-rc.d dovecot defaults
-service dovecot stop > /dev/null 2>&1
-service dovecot start
-if [ "$?" -ne 0 ]; then
- echo "Error: dovecot start failed"
- exit 1
+# Backups
+echo "BACKUP_SYSTEM='local'" >> $VESTA/conf/vesta.conf
+
+# Language
+echo "LANGUAGE='$lang'" >> $VESTA/conf/vesta.conf
+
+# Version
+echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
+
+# Downloading hosting packages
+cd $VESTA/data
+wget $vestacp/packages.tar.gz -O packages.tar.gz
+tar -xzf packages.tar.gz
+rm -f packages.tar.gz
+
+# Downloading templates
+wget $vestacp/templates.tar.gz -O templates.tar.gz
+tar -xzf templates.tar.gz
+rm -f templates.tar.gz
+
+# Copying index.html to default documentroot
+cp templates/web/skel/public_html/index.html /var/www/
+sed -i 's/%domain%/It worked!/g' /var/www/index.html
+
+# Downloading firewall rules
+wget $vestacp/firewall.tar.gz -O firewall.tar.gz
+tar -xzf firewall.tar.gz
+rm -f firewall.tar.gz
+
+# Configuring server hostname
+$VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
+
+# Generating SSL certificate
+$VESTA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
+ 'San Francisco' 'Vesta Control Panel' 'IT' > /tmp/vst.pem
+
+# Parsing certificate file
+crt_end=$(grep -n "END CERTIFICATE-" /tmp/vst.pem |cut -f 1 -d:)
+key_start=$(grep -n "BEGIN RSA" /tmp/vst.pem |cut -f 1 -d:)
+key_end=$(grep -n "END RSA" /tmp/vst.pem |cut -f 1 -d:)
+
+# Adding SSL certificate
+cd $VESTA/ssl
+sed -n "1,${crt_end}p" /tmp/vst.pem > certificate.crt
+sed -n "$key_start,${key_end}p" /tmp/vst.pem > certificate.key
+chown root:mail $VESTA/ssl/*
+chmod 660 $VESTA/ssl/*
+rm /tmp/vst.pem
+
+
+#----------------------------------------------------------#
+# Configure Nginx #
+#----------------------------------------------------------#
+
+if [ "$nginx" = 'yes' ]; then
+ rm -f /etc/nginx/conf.d/*.conf
+ wget $vestacp/nginx/nginx.conf -O /etc/nginx/nginx.conf
+ wget $vestacp/nginx/status.conf -O /etc/nginx/conf.d/status.conf
+ wget $vestacp/nginx/phpmyadmin.inc -O /etc/nginx/conf.d/phpmyadmin.inc
+ wget $vestacp/nginx/phppgadmin.inc -O /etc/nginx/conf.d/phppgadmin.inc
+ wget $vestacp/nginx/webmail.inc -O /etc/nginx/conf.d/webmail.inc
+ wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
+ echo > /etc/nginx/conf.d/vesta.conf
+ mkdir -p /var/log/nginx/domains
+ update-rc.d nginx defaults
+ service nginx start
+ check_result $? "nginx start failed"
fi
-# ClamAV configuration
-if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
- wget $CHOST/$VERSION/clamd.conf -O /etc/clamav/clamd.conf
+
+#----------------------------------------------------------#
+# Configure Apache #
+#----------------------------------------------------------#
+
+if [ "$apache" = 'yes' ]; then
+ wget $vestacp/apache2/apache2.conf -O /etc/apache2/apache2.conf
+ wget $vestacp/apache2/status.conf -O /etc/apache2/mods-enabled/status.conf
+ wget $vestacp/logrotate/apache2 -O /etc/logrotate.d/apache2
+ a2enmod rewrite
+ a2enmod suexec
+ a2enmod ssl
+ a2enmod actions
+ a2enmod ruid2
+ mkdir -p /etc/apache2/conf.d
+ echo > /etc/apache2/conf.d/vesta.conf
+ echo "# Powered by vesta" > /etc/apache2/sites-available/default
+ echo "# Powered by vesta" > /etc/apache2/sites-available/default-ssl
+ echo "# Powered by vesta" > /etc/apache2/ports.conf
+ echo -e "/home\npublic_html/cgi-bin" > /etc/apache2/suexec/www-data
+ touch /var/log/apache2/access.log /var/log/apache2/error.log
+ mkdir -p /var/log/apache2/domains
+ chmod a+x /var/log/apache2
+ chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
+ chmod 751 /var/log/apache2/domains
+ update-rc.d apache2 defaults
+ service apache2 start
+ check_result $? "apache2 start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure PHP-FPM #
+#----------------------------------------------------------#
+
+if [ "$phpfpm" = 'yes' ]; then
+ wget $vestacp/php5-fpm/www.conf -O /etc/php5/fpm/pool.d/www.conf
+ update-rc.d php5-fpm defaults
+ service php5-fpm start
+ check_result $? "php-fpm start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure PHP #
+#----------------------------------------------------------#
+
+ZONE=$(timedatectl 2>/dev/null|grep Timezone|awk '{print $2}')
+if [ -z "$ZONE" ]; then
+ ZONE='UTC'
+fi
+for pconf in $(find /etc/php* -name php.ini); do
+ sed -i "s/;date.timezone =/date.timezone = $ZONE/g" $pconf
+ sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
+done
+
+
+#----------------------------------------------------------#
+# Configure VSFTPD #
+#----------------------------------------------------------#
+
+if [ "$vsftpd" = 'yes' ]; then
+ wget $vestacp/vsftpd/vsftpd.conf -O /etc/vsftpd.conf
+ update-rc.d vsftpd defaults
+ service vsftpd start
+ check_result $? "vsftpd start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure ProFTPD #
+#----------------------------------------------------------#
+
+if [ "$proftpd" = 'yes' ]; then
+ echo "127.0.0.1 $servername" >> /etc/hosts
+ wget $vestacp/proftpd/proftpd.conf -O /etc/proftpd/proftpd.conf
+ update-rc.d proftpd defaults
+ service proftpd start
+ check_result $? "proftpd start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure MySQL/MariaDB #
+#----------------------------------------------------------#
+
+if [ "$mysql" = 'yes' ]; then
+ mycnf="my-small.cnf"
+ if [ $memory -gt 1200000 ]; then
+ mycnf="my-medium.cnf"
+ fi
+ if [ $memory -gt 3900000 ]; then
+ mycnf="my-large.cnf"
+ fi
+
+ # MySQL configuration
+ wget $vestacp/mysql/$mycnf -O /etc/mysql/my.cnf
+ mysql_install_db
+ update-rc.d mysql defaults
+ service mysql start
+ check_result $? "mysql start failed"
+
+ # Securing MySQL installation
+ mysqladmin -u root password $vpass
+ echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf
+ chmod 600 /root/.my.cnf
+ mysql -e "DELETE FROM mysql.user WHERE User=''"
+ mysql -e "DROP DATABASE test" >/dev/null 2>&1
+ mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
+ mysql -e "DELETE FROM mysql.user WHERE user='' or password='';"
+ mysql -e "FLUSH PRIVILEGES"
+
+ # Configuring phpMyAdmin
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/pma/apache.conf -O /etc/phpmyadmin/apache.conf
+ ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
+ fi
+ wget $vestacp/pma/config.inc.php -O /etc/phpmyadmin/config.inc.php
+ chmod 777 /var/lib/phpmyadmin/tmp
+fi
+
+#----------------------------------------------------------#
+# Configure PostgreSQL #
+#----------------------------------------------------------#
+
+if [ "$postgresql" = 'yes' ]; then
+ wget $vestacp/postgresql/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf
+ service postgresql restart
+ sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" 2>/dev/null
+
+ # Configuring phpPgAdmin
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/pga/phppgadmin.conf -O /etc/apache2/conf.d/phppgadmin.conf
+ fi
+ wget $vestacp/pga/config.inc.php -O /etc/phppgadmin/config.inc.php
+fi
+
+
+#----------------------------------------------------------#
+# Configure Bind #
+#----------------------------------------------------------#
+
+if [ "$named" = 'yes' ]; then
+ wget $vestacp/bind/named.conf -O /etc/bind/named.conf
+ sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
+ chown root:bind /etc/bind/named.conf
+ chmod 640 /etc/bind/named.conf
+ update-rc.d bind9 defaults
+ service bind9 start
+ check_result $? "bind9 start failed"
+fi
+
+#----------------------------------------------------------#
+# Configure Exim #
+#----------------------------------------------------------#
+
+if [ "$exim" = 'yes' ]; then
+ gpasswd -a Debian-exim mail
+ wget $vestacp/exim/exim4.conf.template -O /etc/exim4/exim4.conf.template
+ wget $vestacp/exim/dnsbl.conf -O /etc/exim4/dnsbl.conf
+ wget $vestacp/exim/spam-blocks.conf -O /etc/exim4/spam-blocks.conf
+ touch /etc/exim4/white-blocks.conf
+
+ if [ "$spamd" = 'yes' ]; then
+ sed -i "s/#SPAM/SPAM/g" /etc/exim4/exim4.conf.template
+ fi
+ if [ "$clamd" = 'yes' ]; then
+ sed -i "s/#CLAMD/CLAMD/g" /etc/exim4/exim4.conf.template
+ fi
+
+ chmod 640 /etc/exim4/exim4.conf.template
+ rm -rf /etc/exim4/domains
+ mkdir -p /etc/exim4/domains
+
+ rm -f /etc/alternatives/mta
+ ln -s /usr/sbin/exim4 /etc/alternatives/mta
+ update-rc.d -f sendmail remove > /dev/null 2>&1
+ service sendmail stop > /dev/null 2>&1
+ update-rc.d -f postfix remove > /dev/null 2>&1
+ service postfix stop > /dev/null 2>&1
+
+ update-rc.d exim4 defaults
+ service exim4 start
+ check_result $? "exim4 start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure Dovecot #
+#----------------------------------------------------------#
+
+if [ "$dovecot" = 'yes' ]; then
+ gpasswd -a dovecot mail
+ wget $vestacp/dovecot.tar.gz -O /etc/dovecot.tar.gz
+ cd /etc
+ rm -rf dovecot dovecot.conf
+ tar -xzf dovecot.tar.gz
+ rm -f dovecot.tar.gz
+ chown -R root:root /etc/dovecot*
+ update-rc.d dovecot defaults
+ service dovecot start
+ check_result $? "dovecot start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure ClamAV #
+#----------------------------------------------------------#
+
+if [ "$clamd" = 'yes' ]; then
gpasswd -a clamav mail
gpasswd -a clamav Debian-exim
+ wget $vestacp/clamav/clamd.conf -O /etc/clamav/clamd.conf
/usr/bin/freshclam
update-rc.d clamav-daemon defaults
- service clamav-daemon stop > /dev/null 2>&1
service clamav-daemon start
- if [ "$?" -ne 0 ]; then
- echo "Error: clamav start failed"
- exit 1
- fi
+ check_result $? "clamav-daeom start failed"
fi
-# SpamAssassin configuration
-if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
+
+#----------------------------------------------------------#
+# Configure SpamAssassin #
+#----------------------------------------------------------#
+
+if [ "$spamd" = 'yes' ]; then
update-rc.d spamassassin defaults
sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
- service spamassassin stop > /dev/null 2>&1
service spamassassin start
- if [ "$?" -ne 0 ]; then
- echo "Error: spamassassin start failed"
- exit 1
+ check_result $? "spamassassin start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure RoundCube #
+#----------------------------------------------------------#
+
+if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/roundcube/apache.conf -O /etc/roundcube/apache.conf
+ ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
+ fi
+ wget $vestacp/roundcube/main.inc.php -O /etc/roundcube/main.inc.php
+ wget $vestacp/roundcube/db.inc.php -O /etc/roundcube/db.inc.php
+ wget $vestacp/roundcube/vesta.php -O \
+ /usr/share/roundcube/plugins/password/drivers/vesta.php
+ wget $vestacp/roundcube/config.inc.php -O \
+ /etc/roundcube/plugins/password/config.inc.php
+ r="$(gen_pass)"
+ mysql -e "CREATE DATABASE roundcube"
+ mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
+ sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
+ mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
+ chmod a+r /etc/roundcube/main.inc.php
+ if [ "$release" -eq 8 ]; then
+ mv -f /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
+ mv -f /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
fi
fi
-# Fail2ban configuration
-if [ -z "$disable_fail2ban" ]; then
+
+#----------------------------------------------------------#
+# Configure Fail2Ban #
+#----------------------------------------------------------#
+
+if [ "$fail2ban" = 'yes' ]; then
cd /etc
- wget $CHOST/$VERSION/fail2ban.tar.gz -O fail2ban.tar.gz
+ wget $vestacp/fail2ban.tar.gz -O fail2ban.tar.gz
tar -xzf fail2ban.tar.gz
rm -f fail2ban.tar.gz
- chkconfig fail2ban on
+ if [ "$dovecot" = 'no' ]; then
+ fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
+ fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+ sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
+ fi
+ if [ "$exim" = 'no' ]; then
+ fline=$(cat /etc/fail2ban/jail.local |grep -n exim-iptables -A 2)
+ fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+ sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
+ fi
+ update-rc.d fail2ban defaults
service fail2ban start
-else
- sed -i "s/fail2ban//" $VESTA/conf/vestac.conf
+ check_result $? "fail2ban start failed"
fi
-# php configuration
-sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php5/apache2/php.ini
-sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php5/cli/php.ini
-# phpMyAdmin configuration
-wget $CHOST/$VERSION/apache2-pma.conf -O /etc/phpmyadmin/apache.conf
-wget $CHOST/$VERSION/pma.conf -O /etc/phpmyadmin/config.inc.php
-ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
-mv -f /etc/phpmyadmin/config-db.php /etc/phpmyadmin/config-db.php_
-chmod 777 /var/lib/phpmyadmin/tmp
-# Roundcube configuration
-wget $CHOST/$VERSION/apache2-webmail.conf -O /etc/roundcube/apache.conf
-wget $CHOST/$VERSION/roundcube-main.conf -O /etc/roundcube/main.inc.php
-wget $CHOST/$VERSION/roundcube-db.conf -O /etc/roundcube/db.inc.php
-wget $CHOST/$VERSION/roundcube-driver.php -O \
- /usr/share/roundcube/plugins/password/drivers/vesta.php
-wget $CHOST/$VERSION/roundcube-pw.conf -O \
- /etc/roundcube/plugins/password/config.inc.php
-r="$(gen_pass)"
-mysql -e "DROP DATABASE roundcube" > /dev/null 2>&1
-mysql -e "CREATE DATABASE roundcube"
-mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
-sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
-mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
-mkdir -p /var/log/roundcube/error
-chmod -R 777 /var/log/roundcube
+#----------------------------------------------------------#
+# Configure Admin User #
+#----------------------------------------------------------#
-# Deleting old admin user account if exists
+# Deleting old admin user
if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
chattr -i /home/admin/conf > /dev/null 2>&1
- userdel -f admin
- chattr -i /home/admin/conf
- mv -f /home/admin $vst_backups/home/
- rm -f /tmp/sess_*
+ userdel -f admin >/dev/null 2>&1
+ chattr -i /home/admin/conf >/dev/null 2>&1
+ mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
+ rm -f /tmp/sess_* >/dev/null 2>&1
fi
-if [ ! -z "$(grep ^admin: /etc/group)" ]; then
+if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
groupdel admin > /dev/null 2>&1
fi
-# Generating admin password if it wasn't set
-if [ -z "$vpass" ]; then
- vpass=$(gen_pass)
-fi
-
-# Adding admin account
+# Adding vesta account
$VESTA/bin/v-add-user admin $vpass $email default System Administrator
-if [ $? -ne 0 ]; then
- echo "Error: can't create admin user"
- exit 1
-fi
+check_result $? "can't create admin user"
$VESTA/bin/v-change-user-shell admin bash
-$VESTA/bin/v-change-user-language admin en
-
-# Configure mysql host
-$VESTA/bin/v-add-database-host mysql localhost root $mpass
-$VESTA/bin/v-add-database admin default default $(gen_pass) mysql
+$VESTA/bin/v-change-user-language admin $lang
# Configuring system ips
$VESTA/bin/v-update-sys-ip
-# Firewall configuartion
-cd $VESTA/data
-wget $CHOST/$VERSION/firewall.tar.gz -O firewall.tar.gz
-tar -xzf firewall.tar.gz
-rm -f firewall.tar.gz
-if [ "$disable_iptables" = 'yes' ]; then
- sed -i "s/iptables//" $VESTA/conf/vesta.conf
-else
- /usr/local/vesta/bin/v-update-firewall
-fi
-
# Get main ip
-main_ip=$(ifconfig |grep 'inet addr:' |grep -v 127.0.0.1 |head -n1 | \
- cut -f2 -d: | cut -f1 -d ' ')
+ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
-# Get remote ip
-vst_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
-if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then
- # Set NAT association
- $VESTA/bin/v-change-sys-ip-nat $main_ip $vst_ip
+# Get public ip
+pub_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
+if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
+ $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
fi
-if [ -z "$vst_ip" ]; then
- vst_ip=$main_ip
+if [ -z "$pub_ip" ]; then
+ ip=$main_ip
fi
-# Add default web domain
-$VESTA/bin/v-add-web-domain admin default.domain $vst_ip
+# Firewall configuration
+if [ "$iptables" = 'yes' ]; then
+ $VESTA/bin/v-update-firewall
+fi
-# Add default dns domain
-$VESTA/bin/v-add-dns-domain admin default.domain $vst_ip
+# Configuring mysql host
+if [ "$mysql" = 'yes' ]; then
+ $VESTA/bin/v-add-database-host mysql localhost root $vpass
+ $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
+fi
-# Add default mail domain
-$VESTA/bin/v-add-mail-domain admin default.domain
+# Configuring pgsql host
+if [ "$postgresql" = 'yes' ]; then
+ $VESTA/bin/v-add-database-host pgsql localhost postgres $vpass
+ $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
+fi
-# Configuring cron jobs
+# Adding default domain
+$VESTA/bin/v-add-domain admin $servername
+check_result $? "can't create $servername domain"
+
+# Adding cron jobs
command='sudo /usr/local/vesta/bin/v-update-sys-queue disk'
$VESTA/bin/v-add-cron-job 'admin' '15' '02' '*' '*' '*' "$command"
command='sudo /usr/local/vesta/bin/v-update-sys-queue traffic'
@@ -837,35 +1161,45 @@ command='sudo /usr/local/vesta/bin/v-update-user-stats'
$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command"
command='sudo /usr/local/vesta/bin/v-update-sys-rrd'
$VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
+service cron restart
# Building inititall rrd images
$VESTA/bin/v-update-sys-rrd
-# Enable file system quota
+# Enabling file system quota
if [ "$quota" = 'yes' ]; then
$VESTA/bin/v-add-sys-quota
fi
-# Start system service
+# Starting vesta service
update-rc.d vesta defaults
-service vesta stop > /dev/null 2>&1
service vesta start
-if [ "$?" -ne 0 ]; then
- echo "Error: vesta start failed"
- exit 1
+check_result $? "vesta start failed"
+
+# Adding notifications
+$VESTA/upd/add_notifications.sh
+
+
+#----------------------------------------------------------#
+# Vesta Access Info #
+#----------------------------------------------------------#
+
+# Sending install notification to vestacp.com
+wget vestacp.com/notify/?$codename -O /dev/null -q
+
+# Comparing hostname and ip
+host_ip=$(host $servername| head -n 1 | awk '{print $NF}')
+if [ "$host_ip" = "$ip" ]; then
+ ip="$servername"
fi
-# Send notification to vestacp.com
-wget vestacp.com/notify/?$codename -O /dev/null
-
-# Send notification to admin email
+# Sending notification to admin email
echo -e "Congratulations, you have just successfully installed \
-the Vesta Control Panel
+Vesta Control Panel
-You can login in Vesta with following credentials:
+ https://$ip:8083
username: admin
password: $vpass
- https://$vst_ip:8083
We hope that you enjoy your installation of Vesta. Please \
feel free to contact us anytime if you have any questions.
@@ -878,12 +1212,10 @@ vestacp.com team
send_mail="$VESTA/web/inc/mail-wrapper.php"
cat $tmpfile | $send_mail -s "Vesta Control Panel" $email
-rm -f $tmpfile
# Congrats
echo '======================================================='
echo
-echo
echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_| '
echo ' _| _| _| _| _| _| _| '
echo ' _| _| _|_|_| _|_| _| _|_|_|_| '
@@ -891,20 +1223,7 @@ echo ' _| _| _| _| _| _| _| '
echo ' _| _|_|_|_| _|_|_| _| _| _| '
echo
echo
-echo '-------------------------------'
-echo " https://$vst_ip:8083"
-echo ' username: admin'
-echo " password: $vpass"
-echo '-------------------------------'
-echo
-echo
-echo 'Congratulations,'
-echo 'you have successfully installed Vesta Control Panel.'
-echo
-echo
+cat $tmpfile
+rm -f $tmpfile
-# Tricky way to get new PATH variable
-cd
-bash
-
-#EOF
+# EOF
diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh
old mode 100644
new mode 100755
index 218c08401..593043fbb
--- a/install/vst-install-rhel.sh
+++ b/install/vst-install-rhel.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Vesta RHEL/CentOS installer v.04
+# Vesta RHEL/CentOS installer v.05
#----------------------------------------------------------#
# Variables&Functions #
@@ -9,35 +9,69 @@ export PATH=$PATH:/sbin
RHOST='r.vestacp.com'
CHOST='c.vestacp.com'
REPO='cmmnt'
-VERSION='0.9.8/rhel'
-YUM_REPO='/etc/yum.repos.d/vesta.repo'
-software="nginx httpd mod_ssl mod_ruid2 mod_extract_forwarded mod_fcgid
- php php-bcmath php-cli php-common php-gd php-imap php-mbstring php-mcrypt
- php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc quota e2fsprogs
- phpMyAdmin awstats webalizer vsftpd mysql mysql-server exim dovecot clamd
- spamassassin curl roundcubemail bind bind-utils bind-libs mc screen ftp
- libpng libjpeg libmcrypt mhash zip unzip openssl flex rssh libxml2
- ImageMagick sqlite pcre sudo bc jwhois mailx lsof tar telnet rrdtool
- fail2ban GeoIP freetype ntp openssh-clients vesta vesta-nginx vesta-php"
+VERSION='rhel'
+memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
+arch=$(uname -i)
+os=$(cut -f 1 -d ' ' /etc/redhat-release)
+release=$(grep -o "[0-9]" /etc/redhat-release |head -n1)
+codename="${os}_$release"
+vestacp="http://$CHOST/$VERSION/$release"
-# Help
+if [ "$release" -eq 7 ]; then
+ software="nginx httpd mod_ssl mod_ruid2 mod_fcgid php php-common php-cli
+ php-bcmath php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo
+ php-soap php-tidy php-xml php-xmlrpc php-fpm php-pgsql awstats webalizer
+ vsftpd proftpd bind bind-utils bind-libs exim dovecot clamav-server
+ clamav-update spamassassin roundcubemail mariadb mariadb-server phpMyAdmin
+ postgresql postgresql-server postgresql-contrib phpPgAdmin e2fsprogs
+ openssh-clients ImageMagick curl mc screen ftp zip unzip flex sqlite pcre
+ sudo bc jwhois mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype
+ fail2ban rsyslog iptables-services which vesta vesta-nginx vesta-php"
+else
+ software="nginx httpd mod_ssl mod_ruid2 mod_fcgid mod_extract_forwarded
+ php php-common php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt
+ php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-fpm php-pgsql
+ awstats webalizer vsftpd proftpd bind bind-utils bind-libs exim dovecot
+ clamd spamassassin roundcubemail mysql mysql-server phpMyAdmin postgresql
+ postgresql-server postgresql-contrib phpPgAdmin e2fsprogs openssh-clients
+ ImageMagick curl mc screen ftp zip unzip flex sqlite pcre sudo bc jwhois
+ mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype fail2ban
+ which vesta vesta-nginx vesta-php"
+fi
+
+# Defining help function
help() {
- echo "usage: $0 [OPTIONS]
- -h, --help Print this help and exit
- -f, --force Force installation
- -i, --disable-iptables Disable iptables support
- -b, --disable-fail2ban Disable fail2ban protection
- -d, --disable-remi Disable remi repository
- -n, --noupdate Do not run yum update command
- -s, --hostname Set server hostname
- -e, --email Set email address
- -p, --password Set admin password instead of generating it
- -m, --mysql-password Set MySQL password instead of generating it
- -q, --quota Enable File System Quota"
+ echo "Usage: $0 [OPTIONS]
+ -a, --apache Install Apache [yes|no] default: yes
+ -n, --nginx Install Nginx [yes|no] default: yes
+ -w, --phpfpm Install PHP-FPM [yes|no] default: no
+ -v, --vsftpd Install Vsftpd [yes|no] default: yes
+ -j, --proftpd Install ProFTPD [yes|no] default: no
+ -k, --named Install Bind [yes|no] default: yes
+ -m, --mysql Install MySQL [yes|no] default: yes
+ -g, --postgresql Install PostgreSQL [yes|no] default: no
+ -d, --mongodb Install MongoDB [yes|no] unsupported
+ -x, --exim Install Exim [yes|no] default: yes
+ -z, --dovecot Install Dovecot [yes|no] default: yes
+ -c, --clamav Install ClamAV [yes|no] default: yes
+ -t, --spamassassin Install SpamAssassin [yes|no] default: yes
+ -i, --iptables Install Iptables [yes|no] default: yes
+ -b, --fail2ban Install Fail2ban [yes|no] default: yes
+ -r, --remi Install Remi repo [yes|no] default: yes
+ -q, --quota Filesystem Quota [yes|no] default: no
+ -l, --lang Default language default: en
+ -y, --interactive Interactive install [yes|no] default: yes
+ -s, --hostname Set hostname
+ -e, --email Set admin email
+ -p, --password Set admin password
+ -f, --force Force installation
+ -h, --help Print this help
+
+ Example: bash $0 -e demo@vestacp.com -p p4ssw0rd --apache no --phpfpm yes"
exit 1
}
-# Password generator
+# Defining password-gen function
gen_pass() {
MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
LENGTH=10
@@ -48,117 +82,172 @@ gen_pass() {
echo "$PASS"
}
+# Defning return code check function
+check_result() {
+ if [ $1 -ne 0 ]; then
+ echo "Error: $2"
+ exit $1
+ fi
+}
+
+# Defining function to set default value
+set_default_value() {
+ eval variable=\$$1
+ if [ -z "$variable" ]; then
+ eval $1=$2
+ fi
+ if [ "$variable" != 'yes' ] && [ "$variable" != 'no' ]; then
+ eval $1=$2
+ fi
+}
+
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
+# Creating temporary file
+tmpfile=$(mktemp -p /tmp)
+
# Translating argument to --gnu-long-options
for arg; do
delim=""
case "$arg" in
- --help) args="${args}-h " ;;
- --force) args="${args}-f " ;;
- --disable-fail2ban) args="${args}-b " ;;
- --disable-remi) args="${args}-d " ;;
- --disable-iptables) args="${args}-i " ;;
- --noupdate) args="${args}-n " ;;
+ --apache) args="${args}-a " ;;
+ --nginx) args="${args}-n " ;;
+ --phpfpm) args="${args}-w " ;;
+ --vsftpd) args="${args}-v " ;;
+ --proftpd) args="${args}-j " ;;
+ --named) args="${args}-k " ;;
+ --mysql) args="${args}-m " ;;
+ --postgresql) args="${args}-g " ;;
+ --mongodb) args="${args}-d " ;;
+ --exim) args="${args}-x " ;;
+ --dovecot) args="${args}-z " ;;
+ --clamav) args="${args}-c " ;;
+ --spamassassin) args="${args}-t " ;;
+ --iptables) args="${args}-i " ;;
+ --fail2ban) args="${args}-b " ;;
+ --remi) args="${args}-r " ;;
+ --quota) args="${args}-q " ;;
+ --lang) args="${args}-l " ;;
+ --interactive) args="${args}-y " ;;
--hostname) args="${args}-s " ;;
--email) args="${args}-e " ;;
--password) args="${args}-p " ;;
- --mysql-password) args="${args}-m " ;;
- --quota) args="${args}-q " ;;
- *) [[ "${arg:0:1}" == "-" ]] || delim="\""
- args="${args}${delim}${arg}${delim} ";;
+ --force) args="${args}-f " ;;
+ --help) args="${args}-h " ;;
+ *) [[ "${arg:0:1}" == "-" ]] || delim="\""
+ args="${args}${delim}${arg}${delim} ";;
esac
done
eval set -- "$args"
-# Getopt
-while getopts "hfibdnqe:m:p:s:" Option; do
+# Parsing arguments
+while getopts "a:n:w:v:j:k:m:g:d:x:z:c:t:i:b:r:q:l:y:s:e:p:fh" Option; do
case $Option in
- h) help ;; # Help
- f) force='yes' ;; # Force install
- i) disable_iptables='yes' ;; # Disable iptables
- b) disable_fail2ban='yes' ;; # Disable fail2ban
- d) disable_remi='yes' ;; # Disable remi repo
- n) noupdate='yes' ;; # Disable yum update
- s) servername=$OPTARG ;; # Server hostname
- e) email=$OPTARG ;; # Set email
- p) vpass=$OPTARG ;; # Admin password
- m) mpass=$OPTARG ;; # MySQL pasword
- q) quota='yes' ;; # Enable quota
- *) help ;; # Default
+ a) apache=$OPTARG ;; # Apache
+ n) nginx=$OPTARG ;; # Nginx
+ w) phpfpm=$OPTARG ;; # PHP-FPM
+ v) vsftpd=$OPTARG ;; # Vsftpd
+ j) proftpd=$OPTARG ;; # Proftpd
+ k) named=$OPTARG ;; # Named
+ m) mysql=$OPTARG ;; # MySQL
+ g) postgresql=$OPTARG ;; # PostgreSQL
+ d) mongodb=$OPTARG ;; # MongoDB (unsupported)
+ x) exim=$OPTARG ;; # Exim
+ z) dovecot=$OPTARG ;; # Dovecot
+ c) clamd=$OPTARG ;; # ClamAV
+ t) spamd=$OPTARG ;; # SpamAssassin
+ i) iptables=$OPTARG ;; # Iptables
+ b) fail2ban=$OPTARG ;; # Fail2ban
+ r) remi=$OPTARG ;; # Remi repo
+ q) quota=$OPTARG ;; # FS Quota
+ l) lang=$OPTARG ;; # Language
+ y) interactive=$OPTARG ;; # Interactive install
+ s) servername=$OPTARG ;; # Hostname
+ e) email=$OPTARG ;; # Admin email
+ p) vpass=$OPTARG ;; # Admin password
+ f) force='yes' ;; # Force install
+ h) help ;; # Help
+ *) help ;; # Print help (default)
esac
done
-# Am I root?
+# Defining default software stack
+set_default_value 'nginx' 'yes'
+set_default_value 'apache' 'yes'
+set_default_value 'phpfpm' 'no'
+set_default_value 'vsftpd' 'yes'
+set_default_value 'proftpd' 'no'
+set_default_value 'named' 'yes'
+set_default_value 'mysql' 'yes'
+set_default_value 'postgresql' 'no'
+set_default_value 'mongodb' 'no'
+set_default_value 'exim' 'yes'
+set_default_value 'dovecot' 'yes'
+if [ $memory -lt 1500000 ]; then
+ set_default_value 'clamd' 'no'
+ set_default_value 'spamd' 'no'
+else
+ set_default_value 'clamd' 'yes'
+ set_default_value 'spamd' 'yes'
+fi
+set_default_value 'iptables' 'yes'
+set_default_value 'fail2ban' 'yes'
+set_default_value 'remi' 'yes'
+set_default_value 'quota' 'no'
+set_default_value 'lang' 'en'
+set_default_value 'interactive' 'yes'
+
+# Checking software conflicts
+if [ "$phpfpm" = 'yes' ]; then
+ apache='no'
+ nginx='yes'
+fi
+if [ "$proftpd" = 'yes' ]; then
+ vsftpd='no'
+fi
+if [ "$exim" = 'no' ]; then
+ clamd='no'
+ spamd='no'
+ dovecot='no'
+fi
+if [ "$iptables" = 'no' ]; then
+ fail2ban='no'
+fi
+
+
+# Checking root permissions
if [ "x$(id -u)" != 'x0' ]; then
- echo 'Error: this script can only be executed by root'
- exit 1
+ check_error 1 "Script can be run executed only by root"
fi
-# Check supported version
-if [ ! -e '/etc/redhat-release' ]; then
- echo 'Error: sorry, we currently support RHEL and CentOS only'
- exit 1
-fi
-
-# Check supported OS
-arch=$(uname -i)
-os=$(cut -f 1 -d ' ' /etc/redhat-release)
-release=$(grep -o "[0-9]" /etc/redhat-release |head -n1)
-codename="${os}_$release"
-if [ $os != 'CentOS' ] && [ $os != 'Red' ]; then
- echo 'Error: sorry, we currently support RHEL and CentOS only'
- exit
-fi
-
-# Check admin user account
-if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" != 'yes' ]; then
- echo "Error: user admin exists"
- echo
+# Checking admin user account
+if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
echo 'Please remove admin user account before proceeding.'
echo 'If you want to do it automatically run installer with -f option:'
- echo "Example: bash $0 --force"
- exit 1
+ echo -e "Example: bash $0 --force\n"
+ check_result 1 "User admin exists"
fi
-# Check admin group
-if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" != 'yes' ]; then
- echo "Error: group admin exists"
- echo
- echo 'Please remove admin group before proceeding.'
- echo 'If you want to do it automatically run installer with -f option:'
- echo "Example: bash $0 --force"
- exit 1
-fi
-
-# Check wget
+# Checking wget
if [ ! -e '/usr/bin/wget' ]; then
yum -y install wget
- if [ $? -ne 0 ]; then
- echo "Error: can't install wget"
- exit 1
- fi
+ check_result $? "Can't install wget"
fi
-# Check repo availability
-wget -q "$CHOST/$VERSION/vesta.conf" -O /dev/null
-if [ $? -ne 0 ]; then
- echo "Error: no access to $REPO repository"
- exit 1
-fi
+# Checking repository availability
+wget -q "$vestacp/GPG.txt" -O /dev/null
+check_result $? "No access to Vesta repository"
-# Check installed packages
-tmpfile=$(mktemp -p /tmp)
+# Checking installed packages
rpm -qa > $tmpfile
-for pkg in exim bind-9 mysql-server httpd nginx vesta; do
+for pkg in exim mysql-server httpd nginx vesta; do
if [ ! -z "$(grep $pkg $tmpfile)" ]; then
conflicts="$pkg $conflicts"
fi
done
-rm -f $tmpfile
if [ ! -z "$conflicts" ] && [ -z "$force" ]; then
echo '!!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!'
echo
@@ -171,92 +260,357 @@ if [ ! -z "$conflicts" ] && [ -z "$force" ]; then
echo
echo '!!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!'
echo
- exit 1
+ check_result 1 "Control Panel should be installed on clean server."
fi
-# Check server type
-memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
-if [ "$memory" -lt '350000' ] && [ -z "$force" ]; then
- echo "Error: not enough memory to install Vesta Control Panel."
- echo -e "\nMinimum RAM required: 350Mb"
- echo 'If you want to force installation run this script with -f option:'
- echo "Example: bash $0 --force"
- exit 1
-fi
-srv_type='micro'
-if [ "$memory" -gt '1000000' ]; then
- srv_type='small'
+#----------------------------------------------------------#
+# Brief Info #
+#----------------------------------------------------------#
+
+# Printing nice ascii aslogo
+clear
+echo
+echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|'
+echo ' _| _| _| _| _| _| _|'
+echo ' _| _| _|_|_| _|_| _| _|_|_|_|'
+echo ' _| _| _| _| _| _| _|'
+echo ' _| _|_|_|_| _|_|_| _| _| _|'
+echo
+echo ' Vesta Control Panel'
+echo -e "\n\n"
+
+echo 'Following software will be installed on your system:'
+
+# Web stack
+if [ "$nginx" = 'yes' ]; then
+ echo ' - Nginx Web Server'
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
+ echo ' - Apache Web Server'
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
+ echo ' - Apache Web Server (as backend)'
+fi
+if [ "$phpfpm" = 'yes' ]; then
+ echo ' - PHP-FPM Application Server'
fi
-if [ "$memory" -gt '3000000' ]; then
- srv_type='medium'
+# DNS stack
+if [ "$named" = 'yes' ]; then
+ echo ' - Bind DNS Server'
fi
-if [ "$memory" -gt '7000000' ]; then
- srv_type='large'
-fi
-
-# Are you sure ?
-if [ -z $email ]; then
- clear
- echo
- echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_| '
- echo ' _| _| _| _| _| _| _| '
- echo ' _| _| _|_|_| _|_| _| _|_|_|_| '
- echo ' _| _| _| _| _| _| _| '
- echo ' _| _|_|_|_| _|_|_| _| _| _| '
- echo
- echo ' Vesta Control Panel'
- echo
- echo
- echo 'Following software will be installed on your system:'
- echo ' - Nginx frontend web server'
- echo ' - Apache application web server'
- echo ' - Bind DNS server'
- echo ' - Exim mail server'
- echo ' - Dovecot IMAP and POP3 server'
- if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
- echo ' - Clam mail antivirus'
- echo ' - SpamAssassin antispam'
+# Mail Stack
+if [ "$exim" = 'yes' ]; then
+ echo -n ' - Exim mail server'
+ if [ "$clamd" = 'yes' ] || [ "$spamd" = 'yes' ] ; then
+ echo -n ' + '
+ if [ "$clamd" = 'yes' ]; then
+ echo -n 'Antivirus '
+ fi
+ if [ "$spamd" = 'yes' ]; then
+ echo -n 'Antispam'
+ fi
fi
- echo ' - MySQL database server'
- echo ' - Vsftpd FTP server'
- echo
- echo ' * SELinux and Iptables will be disabled'
- echo
+ echo
+ if [ "$dovecot" = 'yes' ]; then
+ echo ' - Dovecot POP3/IMAP Server'
+ fi
+fi
- read -p 'Do you want to proceed? [y/n]): ' answer
+# DB stack
+if [ "$mysql" = 'yes' ]; then
+ if [ $release = 7 ]; then
+ echo ' - MariaDB Database Server'
+ else
+ echo ' - MySQL Database Server'
+ fi
+fi
+if [ "$postgresql" = 'yes' ]; then
+ echo ' - PostgreSQL Database Server'
+fi
+if [ "$mongodb" = 'yes' ]; then
+ echo ' - MongoDB Database Server'
+fi
+
+# FTP stack
+if [ "$vsftpd" = 'yes' ]; then
+ echo ' - Vsftpd FTP Server'
+fi
+if [ "$proftpd" = 'yes' ]; then
+ echo ' - ProFTPD FTP Server'
+fi
+
+# Firewall stack
+if [ "$iptables" = 'yes' ]; then
+ echo -n ' - Iptables Firewall'
+fi
+if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
+ echo -n ' + Fail2Ban'
+fi
+echo -e "\n\n"
+
+# Asking for confirmation to proceed
+if [ "$interactive" = 'yes' ]; then
+ read -p 'Would you like to continue [y/n]: ' answer
if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then
echo 'Goodbye'
exit 1
fi
- # Define email
- read -p 'Please enter valid email address: ' email
+ # Asking for contact email
+ if [ -z "$email" ]; then
+ read -p 'Please enter admin email address: ' email
+ fi
- # Define server hostname
+ # Asking to set FQDN hostname
if [ -z "$servername" ]; then
- read -p "Please enter hostname [$(hostname)]: " servername
+ read -p "Please enter FQDN hostname [$(hostname)]: " servername
fi
fi
-# Validate email
-local_part=$(echo $email | cut -s -f1 -d\@)
-remote_host=$(echo $email | cut -s -f2 -d\@)
-mx_failed=1
-if [ ! -z "$remote_host" ] && [ ! -z "$local_part" ]; then
- /usr/bin/host -t mx "$remote_host" > /dev/null 2>&1
- mx_failed="$?"
+# Generating admin password if it wasn't set
+if [ -z "$vpass" ]; then
+ vpass=$(gen_pass)
fi
-if [ "$mx_failed" -eq 1 ]; then
- echo "Error: email $email is not valid"
- exit 1
+# Set hostname if it wasn't set
+if [ -z "$servername" ]; then
+ servername=$(hostname -f)
fi
-# Check for ipv6 on loopback interface
-check_lo_ipv6=$(/sbin/ifconfig lo| grep 'inet6 addr')
+# Set email if it wasn't set
+if [ -z "$email" ]; then
+ email="admin@$servername"
+fi
+
+# Defining backup directory
+vst_backups="/root/vst_install_backups/$(date +%s)"
+echo "Installation backup directory: $vst_backups"
+
+# Printing start message and sleeping for 5 seconds
+echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
+sleep 5
+
+
+#----------------------------------------------------------#
+# Checking swap #
+#----------------------------------------------------------#
+
+# Checking swap on small instances
+if [ -z "$(swapon -s)" ] && [ $memory -lt 1000000 ]; then
+ fallocate -l 1G /swapfile
+ chmod 600 /swapfile
+ mkswap /swapfile
+ swapon /swapfile
+ echo "/swapfile none swap sw 0 0" >> /etc/fstab
+fi
+
+
+#----------------------------------------------------------#
+# Install repositories #
+#----------------------------------------------------------#
+
+# Updating system packages
+yum -y update
+check_result $? 'yum update failed'
+
+# Installing EPEL repository
+rpm -Uvh --force $vestacp/epel-release.rpm
+check_result $? "Can't install EPEL repository"
+
+# Installing Remi repository
+if [ "$remi" = 'yes' ]; then
+ rpm -Uvh --force $vestacp/remi-release.rpm
+ check_result $? "Can't install REMI repository"
+fi
+
+# Installing Nginx repository
+nrepo="/etc/yum.repos.d/nginx.repo"
+echo "[nginx]" > $nrepo
+echo "name=nginx repo" >> $nrepo
+echo "baseurl=http://nginx.org/packages/centos/$release/\$basearch/" >> $nrepo
+echo "gpgcheck=0" >> $nrepo
+echo "enabled=1" >> $nrepo
+
+# Installing Vesta repository
+vrepo='/etc/yum.repos.d/vesta.repo'
+echo "[vesta]" > $vrepo
+echo "name=Vesta - $REPO" >> $vrepo
+echo "baseurl=http://$RHOST/$REPO/$release/\$basearch/" >> $vrepo
+echo "enabled=1" >> $vrepo
+echo "gpgcheck=1" >> $vrepo
+echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-VESTA" >> $vrepo
+wget $vestacp/GPG.txt -O /etc/pki/rpm-gpg/RPM-GPG-KEY-VESTA
+
+
+#----------------------------------------------------------#
+# Backup #
+#----------------------------------------------------------#
+
+# Creating backup directory tree
+mkdir -p $vst_backups
+cd $vst_backups
+mkdir nginx httpd php php-fpm vsftpd proftpd named exim dovecot clamd \
+ spamassassin mysql postgresql mongodb vesta
+
+# Backing up Nginx configuration
+service nginx stop > /dev/null 2>&1
+cp -r /etc/nginx/* $vst_backups/nginx > /dev/null 2>&1
+
+# Backing up Apache configuration
+service httpd stop > /dev/null 2>&1
+cp -r /etc/httpd/* $vst_backups/httpd > /dev/null 2>&1
+
+# Backing up PHP configuration
+service php-fpm stop >/dev/null 2>&1
+cp /etc/php.ini $vst_backups/php > /dev/null 2>&1
+cp -r /etc/php.d $vst_backups/php > /dev/null 2>&1
+cp /etc/php-fpm.conf $vst_backups/php-fpm > /dev/null 2>&1
+mv -f /etc/php-fpm.d/* $vst_backups/php-fpm/ > /dev/null 2>&1
+
+# Backing up Bind configuration
+service named stop > /dev/null 2>&1
+cp /etc/named.conf $vst_backups/named >/dev/null 2>&1
+
+# Backing up Vsftpd configuration
+service vsftpd stop > /dev/null 2>&1
+cp /etc/vsftpd/vsftpd.conf $vst_backups/vsftpd >/dev/null 2>&1
+
+# Backing up ProFTPD configuration
+service proftpd stop > /dev/null 2>&1
+cp /etc/proftpd.conf $vst_backups/proftpd >/dev/null 2>&1
+
+# Backing up Exim configuration
+service exim stop > /dev/null 2>&1
+cp -r /etc/exim/* $vst_backups/exim >/dev/null 2>&1
+
+# Backing up ClamAV configuration
+service clamd stop > /dev/null 2>&1
+cp /etc/clamd.conf $vst_backups/clamd >/dev/null 2>&1
+cp -r /etc/clamd.d $vst_backups/clamd >/dev/null 2>&1
+
+# Backing up SpamAssassin configuration
+service spamassassin stop > /dev/null 2>&1
+cp -r /etc/mail/spamassassin/* $vst_backups/spamassassin >/dev/null 2>&1
+
+# Backing up Dovecot configuration
+service dovecot stop > /dev/null 2>&1
+cp /etc/dovecot.conf $vst_backups/dovecot > /dev/null 2>&1
+cp -r /etc/dovecot/* $vst_backups/dovecot > /dev/null 2>&1
+
+# Backing up MySQL/MariaDB configuration and data
+service mysql stop > /dev/null 2>&1
+service mysqld stop > /dev/null 2>&1
+service mariadb stop > /dev/null 2>&1
+mv /var/lib/mysql $vst_backups/mysql/mysql_datadir >/dev/null 2>&1
+cp /etc/my.cnf $vst_backups/mysql > /dev/null 2>&1
+cp /etc/my.cnf.d $vst_backups/mysql > /dev/null 2>&1
+mv /root/.my.cnf $vst_backups/mysql > /dev/null 2>&1
+
+# Backing up MySQL/MariaDB configuration and data
+service postgresql stop > /dev/null 2>&1
+mv /var/lib/pgsql/data $vst_backups/postgresql/ >/dev/null 2>&1
+
+# Backing up Vesta configuration and data
+service vesta stop > /dev/null 2>&1
+mv /usr/local/vesta/data/* $vst_backups/vesta > /dev/null 2>&1
+mv /usr/local/vesta/conf/* $vst_backups/vesta > /dev/null 2>&1
+
+
+#----------------------------------------------------------#
+# Package Exludes #
+#----------------------------------------------------------#
+
+# Excluding packages
+if [ "$nginx" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/^nginx//")
+fi
+if [ "$apache" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/httpd//")
+ software=$(echo "$software" | sed -e "s/mod_ssl//")
+ software=$(echo "$software" | sed -e "s/mod_fcgid//")
+ software=$(echo "$software" | sed -e "s/mod_ruid2//")
+fi
+if [ "$phpfpm" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/php-fpm//")
+fi
+if [ "$vsftpd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/vsftpd//")
+fi
+if [ "$proftpd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/proftpd//")
+fi
+if [ "$named" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/bind //")
+fi
+if [ "$exim" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/exim//")
+ software=$(echo "$software" | sed -e "s/dovecot//")
+ software=$(echo "$software" | sed -e "s/clamd//")
+ software=$(echo "$software" | sed -e "s/clamav-server//")
+ software=$(echo "$software" | sed -e "s/clamav-update//")
+ software=$(echo "$software" | sed -e "s/spamassassin//")
+ software=$(echo "$software" | sed -e "s/dovecot//")
+ software=$(echo "$software" | sed -e "s/roundcubemail//")
+fi
+if [ "$clamd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/clamd//")
+ software=$(echo "$software" | sed -e "s/clamav-server//")
+ software=$(echo "$software" | sed -e "s/clamav-update//")
+fi
+if [ "$spamd" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/spamassassin//')
+fi
+if [ "$dovecot" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/dovecot//")
+fi
+if [ "$mysql" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/mysql //')
+ software=$(echo "$software" | sed -e 's/mysql-server//')
+ software=$(echo "$software" | sed -e 's/mariadb //')
+ software=$(echo "$software" | sed -e 's/mariadb-server//')
+ software=$(echo "$software" | sed -e 's/php-mysql//')
+ software=$(echo "$software" | sed -e 's/phpMyAdmin//')
+ software=$(echo "$software" | sed -e 's/roundcubemail//')
+fi
+if [ "$postgresql" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/postgresql //')
+ software=$(echo "$software" | sed -e 's/postgresql-server//')
+ software=$(echo "$software" | sed -e 's/postgresql-contrib//')
+ software=$(echo "$software" | sed -e 's/php-pgsql//')
+ software=$(echo "$software" | sed -e 's/phpPgAdmin//')
+fi
+if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/fail2ban//')
+fi
+
+
+#----------------------------------------------------------#
+# Install packages #
+#----------------------------------------------------------#
+
+# Installing rpm packages
+if [ -z "$disable_remi" ]; then
+ yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta,remi" \
+ install $software
+else
+ yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta" \
+ install $software
+fi
+check_result $? "yum install failed"
+
+
+#----------------------------------------------------------#
+# Configure system #
+#----------------------------------------------------------#
+
+# Restarting rsyslog
+service rsyslog restart > /dev/null 2>&1
+
+# Checking ipv6 on loopback interface
+check_lo_ipv6=$(/sbin/ip addr | grep 'inet6')
check_rc_ipv6=$(grep 'scope global dev lo' /etc/rc.local)
if [ ! -z "$check_lo_ipv6)" ] && [ -z "$check_rc_ipv6" ]; then
ip addr add ::2/128 scope global dev lo
@@ -265,614 +619,604 @@ if [ ! -z "$check_lo_ipv6)" ] && [ -z "$check_rc_ipv6" ]; then
chmod a+x /etc/rc.local
fi
-
-#----------------------------------------------------------#
-# Install repository #
-#----------------------------------------------------------#
-# Let's start
-echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
-sleep 5
-
-# Update system
-if [ -z "$noupdate" ]; then
- yum -y update
- if [ $? -ne 0 ]; then
- echo 'Error: yum update failed'
- exit 1
- fi
-fi
-
-# Install EPEL repo
-if [ ! -e '/etc/yum.repos.d/epel.repo' ]; then
- if [ "$release" -eq '5' ]; then
- epel="5/$arch/epel-release-5-4.noarch.rpm"
- fi
-
- if [ "$release" -eq '6' ]; then
- epel="6/$arch/epel-release-6-8.noarch.rpm"
- fi
-
- rpm -ivh http://dl.fedoraproject.org/pub/epel/$epel
- if [ $? -ne 0 ]; then
- echo "Error: can't install EPEL repository"
- exit 1
- fi
-fi
-
-# Install remi repo
-if [ ! -e '/etc/yum.repos.d/remi.repo' ]; then
- if [ "$release" -eq '5' ]; then
- remi="remi-release-5.rpm"
- fi
-
- if [ "$release" -eq '6' ]; then
- remi="remi-release-6.rpm"
- fi
-
- rpm -ivh http://rpms.famillecollet.com/enterprise/$remi
- if [ $? -ne 0 ]; then
- echo "Error: can't install remi repository"
- exit 1
- fi
-fi
-
-# Install nginx repo
-if [ ! -e '/etc/yum.repos.d/nginx.repo' ]; then
- echo "[nginx]" > /etc/yum.repos.d/nginx.repo
- echo "name=nginx repo" >> /etc/yum.repos.d/nginx.repo
- echo "baseurl=http://nginx.org/packages/centos/$release/\$basearch/" \
- >> /etc/yum.repos.d/nginx.repo
- echo "gpgcheck=0" >> /etc/yum.repos.d/nginx.repo
- echo "enabled=1" >> /etc/yum.repos.d/nginx.repo
-fi
-
-# Install vesta repo
-echo "[vesta]" > $YUM_REPO
-echo "name=Vesta - $REPO" >> $YUM_REPO
-echo "baseurl=http://$RHOST/$REPO/$release/\$basearch/" >> $YUM_REPO
-echo "enabled=1" >> $YUM_REPO
-echo "gpgcheck=1" >> $YUM_REPO
-echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-VESTA" >> $YUM_REPO
-wget $CHOST/GPG.txt -O /etc/pki/rpm-gpg/RPM-GPG-KEY-VESTA
-
-
-#----------------------------------------------------------#
-# Backups #
-#----------------------------------------------------------#
-
-# Prepare backup tree
-vst_backups="/root/vst_install_backups/$(date +%s)"
-mkdir -p $vst_backups/nginx
-mkdir -p $vst_backups/httpd
-mkdir -p $vst_backups/mysql
-mkdir -p $vst_backups/exim
-mkdir -p $vst_backups/dovecot
-mkdir -p $vst_backups/clamd
-mkdir -p $vst_backups/spamassassin
-mkdir -p $vst_backups/vsftpd
-mkdir -p $vst_backups/named
-mkdir -p $vst_backups/vesta/admin
-mkdir -p $vst_backups/home
-
-# Backup sudoers
-if [ -e '/etc/sudoers' ]; then
- cp /etc/sudoers $vst_backups/
-fi
-
-# Backup nginx
-service nginx stop > /dev/null 2>&1
-if [ -e '/etc/nginx/nginx.conf' ]; then
- cp -r /etc/nginx/* $vst_backups/nginx/
-fi
-
-# Backup httpd
-service httpd stop > /dev/null 2>&1
-if [ -e '/etc/httpd/conf/httpd.conf' ]; then
- cp -r /etc/httpd/* $vst_backups/httpd/
-fi
-
-# Backup bind
-service named stop > /dev/null 2>&1
-if [ -e '/etc/named.conf' ]; then
- cp /etc/named.conf $vst_backups/named/
-fi
-
-# Backup vsftpd
-service vsftpd stop > /dev/null 2>&1
-if [ -e '/etc/vsftpd/vsftpd.conf' ]; then
- cp /etc/vsftpd/vsftpd.conf $vst_backups/vsftpd/
-fi
-
-# Backup exim
-service exim stop > /dev/null 2>&1
-if [ -e '/etc/exim/exim.conf' ]; then
- cp -r /etc/exim/* $vst_backups/exim/
-fi
-
-# Backup clamav
-service clamd stop > /dev/null 2>&1
-if [ -e '/etc/clamd.conf' ]; then
- cp /etc/clamd.conf $vst_backups/clamd/
-fi
-
-# Backup SpamAssassin
-service spamassassin stop > /dev/null 2>&1
-if [ -e '/etc/mail/spamassassin' ]; then
- cp -r /etc/mail/spamassassin/* $vst_backups/spamassassin/
-fi
-
-# Backup dovecot
-service dovecot stop > /dev/null 2>&1
-if [ -e '/etc/dovecot.conf' ]; then
- cp /etc/dovecot.conf $vst_backups/dovecot/
-fi
-if [ -e '/etc/dovecot' ]; then
- cp -r /etc/dovecot/* $vst_backups/dovecot/
-fi
-
-# Backup MySQL stuff
-service mysqld stop > /dev/null 2>&1
-if [ -e '/var/lib/mysql' ]; then
- mv /var/lib/mysql $vst_backups/mysql/mysql_datadir
-fi
-if [ -e '/etc/my.cnf' ]; then
- cp /etc/my.cnf $vst_backups/mysql/
-fi
-if [ -e '/root/.my.cnf' ]; then
- mv /root/.my.cnf $vst_backups/mysql/
-fi
-
-# Backup vesta
-service vesta stop > /dev/null 2>&1
-if [ -e '/usr/local/vesta/data' ]; then
- mv /usr/local/vesta/data $vst_backups/vesta/
-fi
-
-if [ -e '/usr/local/vesta/conf' ]; then
- mv /usr/local/vesta/conf $vst_backups/vesta/
-fi
-
-if [ -e '/home/admin/conf/' ]; then
- mv /home/admin/conf/ $vst_backups/vesta/admin
-fi
-
-
-#----------------------------------------------------------#
-# Install packages #
-#----------------------------------------------------------#
-
-# Exclude heavy packages
-if [ "$srv_type" = 'micro' ]; then
- software=$(echo "$software" | sed -e 's/mod_fcgid//')
- software=$(echo "$software" | sed -e 's/clamd//')
- software=$(echo "$software" | sed -e 's/spamassassin//')
-fi
-
-if [ "$srv_type" = 'small' ]; then
- software=$(echo "$software" | sed -e 's/clamd//')
- software=$(echo "$software" | sed -e 's/spamassassin//')
-fi
-
-# Exclude fail2ban
-if [ "$disable_fail2ban" = 'yes' ]; then
- software=$(echo "$software" | sed -e 's/fail2ban//')
-fi
-
-# Install Vesta packages
-if [ -z "$disable_remi" ]; then
- yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta,remi" \
- install $software
-else
- yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta" \
- install $software
-fi
-if [ $? -ne 0 ]; then
- echo 'Error: yum install failed'
- exit 1
-fi
-
-
-#----------------------------------------------------------#
-# Configure system #
-#----------------------------------------------------------#
-
-# Set writable permission on tmp directory
-chmod 777 /tmp
-
# Disabling SELinux
if [ -e '/etc/sysconfig/selinux' ]; then
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
- setenforce 0
-fi
-if [ -e '/etc/selinux/config' ]; then
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
- setenforce 0
+ setenforce 0 2>/dev/null
fi
-# Vesta configuration
+# Disable iptables
+service iptables stop
+
+# Configuring NTP synchronization
+echo '#!/bin/sh' > /etc/cron.daily/ntpdate
+echo "$(which ntpdate) -s pool.ntp.org" >> /etc/cron.daily/ntpdate
+chmod 775 /etc/cron.daily/ntpdate
+ntpdate -s pool.ntp.org
+
+# Disabling webalizer routine
+rm -f /etc/cron.daily/00webalizer
+
+# Adding backup user
+adduser backup 2>/dev/null
+ln -sf /home/backup /backup
+chmod a+x /backup
+
+# Chaning default directory color
+echo 'LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
+
+# Changing default systemd interval
+if [ "$release" -eq '7' ]; then
+ # Hi Lennart
+ echo "DefaultStartLimitInterval=1s" >> /etc/systemd/system.conf
+ echo "DefaultStartLimitBurst=60" >> /etc/systemd/system.conf
+ systemctl daemon-reexec
+fi
+
+
+#----------------------------------------------------------#
+# Configure VESTA #
+#----------------------------------------------------------#
+
+# Downlading sudo configuration
+mkdir -p /etc/sudoers.d
+wget $vestacp/sudo/admin -O /etc/sudoers.d/admin
+chmod 440 /etc/sudoers.d/admin
+
+# Configuring system env
echo "export VESTA='/usr/local/vesta'" > /etc/profile.d/vesta.sh
chmod 755 /etc/profile.d/vesta.sh
source /etc/profile.d/vesta.sh
echo 'PATH=$PATH:/usr/local/vesta/bin' >> /root/.bash_profile
echo 'export PATH' >> /root/.bash_profile
source /root/.bash_profile
-wget $CHOST/$VERSION/vesta.log -O /etc/logrotate.d/vesta
-# Directory tree
-mkdir -p $VESTA/conf
-mkdir -p $VESTA/log
-mkdir -p $VESTA/ssl
-mkdir -p $VESTA/data
-mkdir -p $VESTA/data/ips
-mkdir -p $VESTA/data/queue
-mkdir -p $VESTA/data/users
-mkdir -p $VESTA/data/firewall
-touch $VESTA/data/queue/backup.pipe
-touch $VESTA/data/queue/disk.pipe
-touch $VESTA/data/queue/webstats.pipe
-touch $VESTA/data/queue/restart.pipe
-touch $VESTA/data/queue/traffic.pipe
-chmod 750 $VESTA/conf
-chmod 750 $VESTA/data/users
-chmod 750 $VESTA/data/ips
+# Configuring logrotate for vesta logs
+wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta
+
+# Buidling directory tree and creating some blank files for vesta
+mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
+ $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall
+touch $VESTA/data/queue/backup.pipe $VESTA/data/queue/disk.pipe \
+ $VESTA/data/queue/webstats.pipe $VESTA/data/queue/restart.pipe \
+ $VESTA/data/queue/traffic.pipe $VESTA/log/system.log \
+ $VESTA/log/nginx-error.log $VESTA/log/auth.log
+chmod 750 $VESTA/conf $VESTA/data/users $VESTA/data/ips $VESTA/log
chmod -R 750 $VESTA/data/queue
+chmod 660 $VESTA/log/*
+rm -f /var/log/vesta
ln -s /usr/local/vesta/log /var/log/vesta
-touch /var/log/vesta/system.log
-touch /var/log/vesta/nginx-error.log
-touch /var/log/vesta/auth.log
-chmod 660 /var/log/vesta/*
-adduser backup
-ln -s /home/backup /backup
-chmod a+x /backup
-# vesta.conf
-wget $CHOST/$VERSION/vesta.conf -O $VESTA/conf/vesta.conf
-if [ "$srv_type" = 'micro' ] || [ "$srv_type" = 'small' ]; then
- sed -i "s/clamav//g" $VESTA/conf/vesta.conf
- sed -i "s/spamassassin//g" $VESTA/conf/vesta.conf
+# Generating vesta configuration
+rm -f $VESTA/conf/vesta.conf 2>/dev/null
+touch $VESTA/conf/vesta.conf
+chmod 660 $VESTA/conf/vesta.conf
+
+# WEB stack
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
+ echo "WEB_SYSTEM='httpd'" >> $VESTA/conf/vesta.conf
+ echo "WEB_RGROUPS='apache'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='mod_ssl'" >> $VESTA/conf/vesta.conf
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
+ echo "WEB_SYSTEM='httpd'" >> $VESTA/conf/vesta.conf
+ echo "WEB_RGROUPS='apache'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='8080'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='8443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='mod_ssl'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_SYSTEM='nginx'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$apache" = 'no' ] && [ "$nginx" = 'yes' ]; then
+ echo "WEB_SYSTEM='nginx'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='openssl'" >> $VESTA/conf/vesta.conf
+ if [ "$phpfpm" = 'yes' ]; then
+ echo "WEB_BACKEND='php-fpm'" >> $VESTA/conf/vesta.conf
+ fi
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
fi
-# Set server hostname
-if [ -z "$servername" ]; then
- servername=$(hostname)
+# FTP stack
+if [ "$vsftpd" = 'yes' ]; then
+ echo "FTP_SYSTEM='vsftpd'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$proftpd" = 'yes' ]; then
+ echo "FTP_SYSTEM='proftpd'" >> $VESTA/conf/vesta.conf
fi
-/usr/local/vesta/bin/v-change-sys-hostname $servername 2>/dev/null
-# Templates
-cd /usr/local/vesta/data
-wget $CHOST/$VERSION/packages.tar.gz -O packages.tar.gz
+# DNS stack
+if [ "$named" = 'yes' ]; then
+ echo "DNS_SYSTEM='named'" >> $VESTA/conf/vesta.conf
+fi
+
+# Mail stack
+if [ "$exim" = 'yes' ]; then
+ echo "MAIL_SYSTEM='exim'" >> $VESTA/conf/vesta.conf
+ if [ "$clamd" = 'yes' ]; then
+ echo "ANTIVIRUS_SYSTEM='clamav'" >> $VESTA/conf/vesta.conf
+ fi
+ if [ "$spamd" = 'yes' ]; then
+ echo "ANTISPAM_SYSTEM='spamassassin'" >> $VESTA/conf/vesta.conf
+ fi
+ if [ "$dovecot" = 'yes' ]; then
+ echo "IMAP_SYSTEM='dovecot'" >> $VESTA/conf/vesta.conf
+ fi
+fi
+
+# CRON daemon
+echo "CRON_SYSTEM='crond'" >> $VESTA/conf/vesta.conf
+
+# Firewall stack
+if [ "$iptables" = 'yes' ]; then
+ echo "FIREWALL_SYSTEM='iptables'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
+ echo "FIREWALL_EXTENSION='fail2ban'" >> $VESTA/conf/vesta.conf
+fi
+
+# Disk quota
+if [ "$quota" = 'yes' ]; then
+ echo "DISK_QUOTA='yes'" >> $VESTA/conf/vesta.conf
+fi
+
+# Backups
+echo "BACKUP_SYSTEM='local'" >> $VESTA/conf/vesta.conf
+
+# Language
+echo "LANGUAGE='$lang'" >> $VESTA/conf/vesta.conf
+
+# Version
+echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
+
+# Downloading hosting packages
+cd $VESTA/data
+wget $vestacp/packages.tar.gz -O packages.tar.gz
tar -xzf packages.tar.gz
rm -f packages.tar.gz
-cd /usr/local/vesta/data
-wget $CHOST/$VERSION/templates.tar.gz -O templates.tar.gz
+
+# Downloading templates
+wget $vestacp/templates.tar.gz -O templates.tar.gz
tar -xzf templates.tar.gz
rm -f templates.tar.gz
-chmod -R 755 /usr/local/vesta/data/templates
+
+# Copying index.html to default documentroot
cp templates/web/skel/public_html/index.html /var/www/html/
sed -i 's/%domain%/It worked!/g' /var/www/html/index.html
-if [ "$srv_type" = 'micro' ]; then
- rm -f /usr/local/vesta/data/templates/web/httpd/phpfcgid.*
-fi
+
+# Downloading firewall rules
+chkconfig firewalld off >/dev/null 2>&1
+wget $vestacp/firewall.tar.gz -O firewall.tar.gz
+tar -xzf firewall.tar.gz
+rm -f firewall.tar.gz
+
+# Configuring server hostname
+$VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
# Generating SSL certificate
$VESTA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
'San Francisco' 'Vesta Control Panel' 'IT' > /tmp/vst.pem
-# Parsing merged certificate file
+# Parsing certificate file
crt_end=$(grep -n "END CERTIFICATE-" /tmp/vst.pem |cut -f 1 -d:)
key_start=$(grep -n "BEGIN RSA" /tmp/vst.pem |cut -f 1 -d:)
key_end=$(grep -n "END RSA" /tmp/vst.pem |cut -f 1 -d:)
# Adding SSL certificate
-cd /usr/local/vesta/ssl
+cd $VESTA/ssl
sed -n "1,${crt_end}p" /tmp/vst.pem > certificate.crt
sed -n "$key_start,${key_end}p" /tmp/vst.pem > certificate.key
-chown root:mail /usr/local/vesta/ssl/*
-chmod 660 /usr/local/vesta/ssl/*
+chown root:mail $VESTA/ssl/*
+chmod 660 $VESTA/ssl/*
rm /tmp/vst.pem
-# Disabling webalizer routine
-rm -f /etc/cron.daily/00webalizer
-# Set directory color
-echo 'LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
+#----------------------------------------------------------#
+# Configure Nginx #
+#----------------------------------------------------------#
-# Sudo configuration
-wget $CHOST/$VERSION/sudoers.conf -O /etc/sudoers
-wget $CHOST/$VERSION/sudoers.admin.conf -O /etc/sudoers.d/admin
-chmod 440 /etc/sudoers
-chmod 440 /etc/sudoers.d/admin
-
-# NTP Synchronization
-echo '#!/bin/sh' > /etc/cron.daily/ntpdate
-echo "$(which ntpdate) -s pool.ntp.org" >> /etc/cron.daily/ntpdate
-chmod 775 /etc/cron.daily/ntpdate
-ntpdate -s pool.ntp.org
-
-# Setup rssh
-if [ -z "$(grep /usr/bin/rssh /etc/shells)" ]; then
- echo /usr/bin/rssh >> /etc/shells
-fi
-sed -i 's/#allowscp/allowscp/' /etc/rssh.conf
-sed -i 's/#allowsftp/allowsftp/' /etc/rssh.conf
-sed -i 's/#allowrsync/allowrsync/' /etc/rssh.conf
-chmod 755 /usr/bin/rssh
-
-# Nginx configuration
-rm -f /etc/nginx/conf.d/*.conf
-wget $CHOST/$VERSION/nginx.conf -O /etc/nginx/nginx.conf
-wget $CHOST/$VERSION/nginx-status.conf -O /etc/nginx/conf.d/status.conf
-touch /etc/nginx/conf.d/vesta.conf
-chkconfig nginx on
-service nginx start
-if [ "$?" -ne 0 ]; then
- echo "Error: nginx start failed"
- exit 1
+if [ "$nginx" = 'yes' ]; then
+ rm -f /etc/nginx/conf.d/*.conf
+ wget $vestacp/nginx/nginx.conf -O /etc/nginx/nginx.conf
+ wget $vestacp/nginx/status.conf -O /etc/nginx/conf.d/status.conf
+ wget $vestacp/nginx/phpmyadmin.inc -O /etc/nginx/conf.d/phpmyadmin.inc
+ wget $vestacp/nginx/phppgadmin.inc -O /etc/nginx/conf.d/phppgadmin.inc
+ wget $vestacp/nginx/webmail.inc -O /etc/nginx/conf.d/webmail.inc
+ wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
+ echo > /etc/nginx/conf.d/vesta.conf
+ mkdir -p /var/log/nginx/domains
+ chkconfig nginx on
+ service nginx start
+ check_result $? "nginx start failed"
fi
-# Apache configuration
-wget $CHOST/$VERSION/httpd.conf -O /etc/httpd/conf/httpd.conf
-wget $CHOST/$VERSION/httpd-status.conf -O /etc/httpd/conf.d/status.conf
-wget $CHOST/$VERSION/httpd-ssl.conf -O /etc/httpd/conf.d/ssl.conf
-wget $CHOST/$VERSION/httpd.log -O /etc/logrotate.d/httpd
-echo "MEFaccept 127.0.0.1" >> /etc/httpd/conf.d/mod_extract_forwarded.conf
-rm -f /etc/httpd/conf.d/proxy_ajp.conf
-echo > /etc/httpd/conf.d/proxy_ajp.conf
-rm -f /etc/httpd/conf.d/vesta.conf
-echo > /etc/httpd/conf.d/vesta.conf
-touch /var/log/httpd/access_log
-touch /var/log/httpd/error_log
-touch /var/log/httpd/suexec.log
-mkdir -p /var/log/httpd/domains
-chmod a+x /var/log/httpd
-chmod 640 /var/log/httpd/access_log
-chmod 640 /var/log/httpd/error_log
-chmod 640 /var/log/httpd/suexec.log
-chmod 751 /var/log/httpd/domains
-chkconfig httpd on
-service httpd start
-if [ "$?" -ne 0 ]; then
- echo "Error: httpd start failed"
- exit 1
+
+#----------------------------------------------------------#
+# Configure Apache #
+#----------------------------------------------------------#
+
+if [ "$apache" = 'yes' ]; then
+ cd /etc/httpd
+ wget $vestacp/httpd/httpd.conf -O conf/httpd.conf
+ wget $vestacp/httpd/status.conf -O conf.d/status.conf
+ wget $vestacp/httpd/ssl.conf -O conf.d/ssl.conf
+ wget $vestacp/httpd/ruid2.conf -O conf.d/ruid2.conf
+ wget $vestacp/logrotate/httpd -O /etc/logrotate.d/httpd
+ if [ $release -ne 7 ]; then
+ echo "MEFaccept 127.0.0.1" >> conf.d/mod_extract_forwarded.conf
+ echo > conf.d/proxy_ajp.conf
+ fi
+ if [ -e "conf.modules.d/00-dav.conf" ]; then
+ sed -i "s/^/#/" conf.modules.d/00-dav.conf conf.modules.d/00-lua.conf
+ sed -i "s/^/#/" conf.modules.d/00-proxy.conf
+ fi
+ echo > conf.d/vesta.conf
+ touch logs/access_log logs/error_log logs/error_log logs/suexec.log
+ chmod 640 logs/access_log logs/error_log logs/error_log logs/suexec.log
+ chmod -f 777 /var/lib/php/session
+ chmod a+x /var/log/httpd
+ mkdir -p /var/log/httpd/domains
+ chmod 751 /var/log/httpd/domains
+ chkconfig httpd on
+ service httpd start
+ check_result $? "httpd start failed"
fi
-# Vsftpd configuration
-wget $CHOST/$VERSION/vsftpd.conf -O /etc/vsftpd/vsftpd.conf
-chkconfig vsftpd on
-service vsftpd start
-if [ "$?" -ne 0 ]; then
- echo "Error: vsftpd start failed"
- exit 1
+
+#----------------------------------------------------------#
+# Configure PHP-FPM #
+#----------------------------------------------------------#
+
+if [ "$phpfpm" = 'yes' ]; then
+ wget $vestacp/php-fpm/www.conf -O /etc/php-fpm.d/www.conf
+ chkconfig php-fpm on
+ service php-fpm start
+ check_result $? "php-fpm start failed"
fi
-# MySQL configuration
-if [ "$srv_type" = 'micro' ]; then
- wget $CHOST/$VERSION/mysql-512.cnf -O /etc/my.cnf
-else
- wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf
+
+#----------------------------------------------------------#
+# Configure PHP #
+#----------------------------------------------------------#
+
+ZONE=$(timedatectl 2>/dev/null|grep Timezone|awk '{print $2}')
+if [ -e '/etc/sysconfig/clock' ]; then
+ source /etc/sysconfig/clock
fi
-chkconfig mysqld on
-service mysqld start
-if [ "$?" -ne 0 ]; then
- # Fix for aio on OpenVZ
- if [ -e "/proc/user_beancounters" ]; then
- sed -i "s/#innodb_use_native_aio/innodb_use_native_aio/g" /etc/my.cnf
+if [ -z "$ZONE" ]; then
+ ZONE='UTC'
+fi
+for pconf in $(find /etc/php* -name php.ini); do
+ sed -i "s/;date.timezone =/date.timezone = $ZONE/g" $pconf
+ sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
+done
+
+
+#----------------------------------------------------------#
+# Configure VSFTPD #
+#----------------------------------------------------------#
+
+if [ "$vsftpd" = 'yes' ]; then
+ wget $vestacp/vsftpd/vsftpd.conf -O /etc/vsftpd/vsftpd.conf
+ chkconfig vsftpd on
+ service vsftpd start
+ check_result $? "vsftpd start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure ProFTPD #
+#----------------------------------------------------------#
+
+if [ "$proftpd" = 'yes' ]; then
+ wget $vestacp/proftpd/proftpd.conf -O /etc/proftpd.conf
+ chkconfig proftpd on
+ service proftpd start
+ check_result $? "proftpd start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure MySQL/MariaDB #
+#----------------------------------------------------------#
+
+if [ "$mysql" = 'yes' ]; then
+
+ mycnf="my-small.cnf"
+ if [ $memory -gt 1200000 ]; then
+ mycnf="my-medium.cnf"
+ fi
+ if [ $memory -gt 3900000 ]; then
+ mycnf="my-large.cnf"
fi
- service mysqld start
+ mkdir -p /var/lib/mysql
+ chown mysql:mysql /var/lib/mysql
+
+ if [ $release -ne 7 ]; then
+ service='mysqld'
+ else
+ service='mariadb'
+ fi
+
+ wget $vestacp/$service/$mycnf -O /etc/my.cnf
+ chkconfig $service on
+ service $service start
if [ "$?" -ne 0 ]; then
- echo "Error: mysqld start failed"
- exit 1
+ if [ -e "/proc/user_beancounters" ]; then
+ # Fix for aio on OpenVZ
+ sed -i "s/#innodb_use_native/innodb_use_native/g" /etc/my.cnf
+ fi
+ service $service start
+ check_result $? "$service start failed"
fi
+
+ # Securing MySQL installation
+ mysqladmin -u root password $vpass
+ echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf
+ chmod 600 /root/.my.cnf
+ mysql -e "DELETE FROM mysql.user WHERE User=''"
+ mysql -e "DROP DATABASE test" >/dev/null 2>&1
+ mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
+ mysql -e "DELETE FROM mysql.user WHERE user='' or password='';"
+ mysql -e "FLUSH PRIVILEGES"
+
+ # Configuring phpMyAdmin
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/pma/phpMyAdmin.conf -O /etc/httpd/conf.d/phpMyAdmin.conf
+ fi
+ wget $vestacp/pma/config.inc.conf -O /etc/phpMyAdmin/config.inc.php
+ sed -i "s/%blowfish_secret%/$(gen_pass)/g" /etc/phpMyAdmin/config.inc.php
fi
-# Generating MySQL password if it wasn't set
-if [ -z "$mpass" ]; then
- mpass=$(gen_pass)
+
+#----------------------------------------------------------#
+# Configure PostgreSQL #
+#----------------------------------------------------------#
+
+if [ "$postgresql" = 'yes' ]; then
+ if [ $release = 5 ]; then
+ service postgresql start
+ sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'"
+ service postgresql stop
+ wget $vestacp/postgresql/pg_hba.conf -O /var/lib/pgsql/data/pg_hba.conf
+ service postgresql start
+ else
+ service postgresql initdb
+ wget $vestacp/postgresql/pg_hba.conf -O /var/lib/pgsql/data/pg_hba.conf
+ service postgresql start
+ sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'"
+ fi
+ # Configuring phpPgAdmin
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/pga/phpPgAdmin.conf -O /etc/httpd/conf.d/phpPgAdmin.conf
+ fi
+ wget $vestacp/pga/config.inc.php -O /etc/phpPgAdmin/config.inc.php
fi
-mysqladmin -u root password $mpass
-echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
-chmod 600 /root/.my.cnf
-mysql -e "DELETE FROM mysql.user WHERE User=''"
-mysql -e "DROP DATABASE test"
-mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
-mysql -e "DELETE FROM mysql.user WHERE user='' or password='';"
-mysql -e "FLUSH PRIVILEGES"
-# Bind configuration
-wget $CHOST/$VERSION/named.conf -O /etc/named.conf
-chown root:named /etc/named.conf
-chmod 640 /etc/named.conf
-chkconfig named on
-service named start
-if [ "$?" -ne 0 ]; then
- echo "Error: named start failed"
- exit 1
+#----------------------------------------------------------#
+# Configure Bind #
+#----------------------------------------------------------#
+
+if [ "$named" = 'yes' ]; then
+ wget $vestacp/named/named.conf -O /etc/named.conf
+ chown root:named /etc/named.conf
+ chmod 640 /etc/named.conf
+ chkconfig named on
+ service named start
+ check_result $? "named start failed"
fi
-# Exim
-wget $CHOST/$VERSION/exim.conf -O /etc/exim/exim.conf
-if [ "$srv_type" != 'micro' ] && [ "$srv_type" != 'small' ]; then
- sed -i "s/#SPAM/SPAM/g" /etc/exim/exim.conf
- sed -i "s/#CLAMD/CLAMD/g" /etc/exim/exim.conf
-fi
-wget $CHOST/$VERSION/dnsbl.conf -O /etc/exim/dnsbl.conf
-wget $CHOST/$VERSION/spam-blocks.conf -O /etc/exim/spam-blocks.conf
-touch /etc/exim/white-blocks.conf
-rm -rf /etc/exim/domains
-mkdir -p /etc/exim/domains
-chmod 640 /etc/exim/exim.conf
-gpasswd -a exim mail
-if [ -e /etc/init.d/sendmail ]; then
- chkconfig sendmail off
- service sendmail stop
-fi
-if [ -e /etc/init.d/postfix ]; then
- chkconfig postfix off
- service postfix stop
-fi
-rm -f /etc/alternatives/mta
-ln -s /usr/sbin/sendmail.exim /etc/alternatives/mta
-chkconfig exim on
-service exim start
-if [ "$?" -ne 0 ]; then
- echo "Error: exim start failed"
- exit 1
+
+#----------------------------------------------------------#
+# Configure Exim #
+#----------------------------------------------------------#
+
+if [ "$exim" = 'yes' ]; then
+ gpasswd -a exim mail
+ wget $vestacp/exim/exim.conf -O /etc/exim/exim.conf
+ wget $vestacp/exim/dnsbl.conf -O /etc/exim/dnsbl.conf
+ wget $vestacp/exim/spam-blocks.conf -O /etc/exim/spam-blocks.conf
+ touch /etc/exim/white-blocks.conf
+
+ if [ "$spamd" = 'yes' ]; then
+ sed -i "s/#SPAM/SPAM/g" /etc/exim/exim.conf
+ fi
+ if [ "$clamd" = 'yes' ]; then
+ sed -i "s/#CLAMD/CLAMD/g" /etc/exim/exim.conf
+ fi
+
+ chmod 640 /etc/exim/exim.conf
+ rm -rf /etc/exim/domains
+ mkdir -p /etc/exim/domains
+
+ rm -f /etc/alternatives/mta
+ ln -s /usr/sbin/sendmail.exim /etc/alternatives/mta
+ chkconfig sendmail off 2>/dev/null
+ service sendmail stop 2>/dev/null
+ chkconfig postfix off 2>/dev/null
+ service postfix stop 2>/dev/null
+
+ chkconfig exim on
+ service exim start
+ check_result $? "exim start failed"
fi
-# Dovecot configuration
-if [ "$release" -eq '5' ]; then
- wget $CHOST/$VERSION/dovecot.conf -O /etc/dovecot.conf
-else
- wget $CHOST/$VERSION/dovecot.tar.gz -O /etc/dovecot.tar.gz
- cd /etc/
- rm -rf dovecot
+
+#----------------------------------------------------------#
+# Configure Dovecot #
+#----------------------------------------------------------#
+
+if [ "$dovecot" = 'yes' ]; then
+ gpasswd -a dovecot mail
+ wget $vestacp/dovecot.tar.gz -O /etc/dovecot.tar.gz
+ cd /etc
+ rm -rf dovecot dovecot.conf
tar -xzf dovecot.tar.gz
rm -f dovecot.tar.gz
- chown -R root:root /etc/dovecot
-fi
-gpasswd -a dovecot mail
-chkconfig dovecot on
-service dovecot start
-if [ "$?" -ne 0 ]; then
- echo "Error: dovecot start failed"
- exit 1
+ chown -R root:root /etc/dovecot*
+ chkconfig dovecot on
+ service dovecot start
+ check_result $? "dovecot start failed"
fi
-# ClamAV configuration
-if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
- wget $CHOST/$VERSION/clamd.conf -O /etc/clamd.conf
- wget $CHOST/$VERSION/freshclam.conf -O /etc/freshclam.conf
+
+#----------------------------------------------------------#
+# Configure ClamAV #
+#----------------------------------------------------------#
+
+if [ "$clamd" = 'yes' ]; then
+ useradd clam -s /sbin/nologin -d /var/lib/clamav 2>/dev/null
gpasswd -a clam exim
gpasswd -a clam mail
+ wget $vestacp/clamav/clamd.conf -O /etc/clamd.conf
+ wget $vestacp/clamav/freshclam.conf -O /etc/freshclam.conf
+ mkdir -p /var/log/clamav
+ mkdir -p /var/run/clamav
+ chown clam:clam /var/log/clamav
+ chown -R clam:clam /var/lib/clamav
+ if [ "$release" -eq '7' ]; then
+ wget $vestacp/clamav/clamd.service -O \
+ /usr/lib/systemd/system/clamd.service
+ systemctl --system daemon-reload
+ fi
/usr/bin/freshclam
chkconfig clamd on
service clamd start
- if [ "$?" -ne 0 ]; then
- echo "Error: clamd start failed"
- exit 1
- fi
+ #check_result $? "clamd start failed"
fi
-# SpamAssassin configuration
-if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
+
+#----------------------------------------------------------#
+# Configure SpamAssassin #
+#----------------------------------------------------------#
+
+if [ "$spamd" = 'yes' ]; then
chkconfig spamassassin on
service spamassassin start
- if [ "$?" -ne 0 ]; then
- echo "Error: spamassassin start failed"
- exit 1
+ check_result $? "spamassassin start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure RoundCube #
+#----------------------------------------------------------#
+
+if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/roundcube/roundcubemail.conf \
+ -O /etc/httpd/conf.d/roundcubemail.conf
+ fi
+ wget $vestacp/roundcube/main.inc.php -O /etc/roundcubemail/config.inc.php
+ cd /usr/share/roundcubemail/plugins/password
+ wget $vestacp/roundcube/vesta.php -O drivers/vesta.php
+ wget $vestacp/roundcube/config.inc.php -O config.inc.php
+ chmod a+r /etc/roundcubemail/*
+ chmod -f 777 /var/log/roundcubemail
+ r="$(gen_pass)"
+ mysql -e "CREATE DATABASE roundcube"
+ mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
+ sed -i "s/%password%/$r/g" /etc/roundcubemail/config.inc.php
+ if [ -e "/usr/share/roundcubemail/SQL/mysql.initial.sql" ]; then
+ mysql roundcube < /usr/share/roundcubemail/SQL/mysql.initial.sql
+ else
+ mysql roundcube < /usr/share/doc/roundcubemail-*/SQL/mysql.initial.sql
fi
fi
-# Fail2ban configuration
-if [ -z "$disable_fail2ban" ]; then
+
+#----------------------------------------------------------#
+# Configure Fail2Ban #
+#----------------------------------------------------------#
+
+if [ "$fail2ban" = 'yes' ]; then
cd /etc
- wget $CHOST/$VERSION/fail2ban.tar.gz -O fail2ban.tar.gz
+ wget $vestacp/fail2ban.tar.gz -O fail2ban.tar.gz
tar -xzf fail2ban.tar.gz
rm -f fail2ban.tar.gz
+ if [ "$dovecot" = 'no' ]; then
+ fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
+ fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+ sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
+ fi
+ if [ "$exim" = 'no' ]; then
+ fline=$(cat /etc/fail2ban/jail.local |grep -n exim-iptables -A 2)
+ fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+ sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
+ fi
chkconfig fail2ban on
service fail2ban start
-else
- sed -i "s/fail2ban//" $VESTA/conf/vestac.conf
+ check_result $? "fail2ban start failed"
fi
-# php configuration
-sed -i 's/short_open_tag = Off/short_open_tag = On/g' /etc/php.ini
-sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php.ini
-# phpMyAdmin configuration
-wget $CHOST/$VERSION/httpd-pma.conf -O /etc/httpd/conf.d/phpMyAdmin.conf
-wget $CHOST/$VERSION/pma.conf -O /etc/phpMyAdmin/config.inc.php
-sed -i "s/%blowfish_secret%/$(gen_pass)/g" /etc/phpMyAdmin/config.inc.php
+#----------------------------------------------------------#
+# Configure Admin User #
+#----------------------------------------------------------#
-# Roundcube configuration
-wget $CHOST/$VERSION/httpd-webmail.conf -O /etc/httpd/conf.d/roundcubemail.conf
-wget $CHOST/$VERSION/roundcube-main.conf -O /etc/roundcubemail/main.inc.php
-wget $CHOST/$VERSION/roundcube-db.conf -O /etc/roundcubemail/db.inc.php
-wget $CHOST/$VERSION/roundcube-driver.php -O \
- /usr/share/roundcubemail/plugins/password/drivers/vesta.php
-wget $CHOST/$VERSION/roundcube-pw.conf -O \
- /usr/share/roundcubemail/plugins/password/config.inc.php
-r="$(gen_pass)"
-mysql -e "CREATE DATABASE roundcube"
-mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
-sed -i "s/%password%/$r/g" /etc/roundcubemail/db.inc.php
-if [ -e "/usr/share/roundcubemail/SQL/mysql.initial.sql" ]; then
- mysql roundcube < /usr/share/roundcubemail/SQL/mysql.initial.sql
-else
- mysql roundcube < /usr/share/doc/roundcubemail-*/SQL/mysql.initial.sql
-fi
-
-# Adding admin user
+# Deleting old admin user
if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
chattr -i /home/admin/conf > /dev/null 2>&1
- userdel -f admin
- chattr -i /home/admin/conf
- mv -f /home/admin $vst_backups/home/
- rm -f /tmp/sess_*
+ userdel -f admin >/dev/null 2>&1
+ chattr -i /home/admin/conf >/dev/null 2>&1
+ mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
+ rm -f /tmp/sess_* >/dev/null 2>&1
fi
if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
groupdel admin > /dev/null 2>&1
fi
-# Generating admin password if it wasn't set
-if [ -z "$vpass" ]; then
- vpass=$(gen_pass)
-fi
-
# Adding vesta account
$VESTA/bin/v-add-user admin $vpass $email default System Administrator
-if [ $? -ne 0 ]; then
- echo "Error: can't create admin user"
- exit 1
-fi
+check_result $? "can't create admin user"
$VESTA/bin/v-change-user-shell admin bash
-$VESTA/bin/v-change-user-language admin en
-
-# Configuring mysql host
-$VESTA/bin/v-add-database-host mysql localhost root $mpass
-$VESTA/bin/v-add-database admin default default $(gen_pass) mysql
+$VESTA/bin/v-change-user-language admin $lang
# Configuring system ips
$VESTA/bin/v-update-sys-ip
-# Firewall configuration
-wget $CHOST/$VERSION/firewall.tar.gz -O firewall.tar.gz
-tar -xzf firewall.tar.gz
-rm -f firewall.tar.gz
-if [ "$disable_iptables" = 'yes' ]; then
- sed -i "s/iptables//" $VESTA/conf/vesta.conf
- chkconfig iptables off
- service iptables stop
-else
- /usr/local/vesta/bin/v-update-firewall
-fi
-
# Get main ip
-main_ip=$(ifconfig |grep 'inet addr:' |grep -v 127.0.0.1 |head -n1 | \
- cut -f2 -d: | cut -f1 -d ' ')
+ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
-# Get remote ip
-vst_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
-if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then
- # Set NAT association
- $VESTA/bin/v-change-sys-ip-nat $main_ip $vst_ip
+# Get public ip
+pub_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
+if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
+ $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
fi
-if [ -z "$vst_ip" ]; then
- vst_ip=$main_ip
+if [ -z "$pub_ip" ]; then
+ ip=$main_ip
fi
-# Add default web domain
-$VESTA/bin/v-add-web-domain admin default.domain $vst_ip
+# Firewall configuration
+if [ "$iptables" = 'yes' ]; then
+ $VESTA/bin/v-update-firewall
+fi
-# Add default dns domain
-$VESTA/bin/v-add-dns-domain admin default.domain $vst_ip
+# Configuring mysql host
+if [ "$mysql" = 'yes' ]; then
+ $VESTA/bin/v-add-database-host mysql localhost root $vpass
+ $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
+fi
-# Add default mail domain
-$VESTA/bin/v-add-mail-domain admin default.domain
+# Configuring pgsql host
+if [ "$postgresql" = 'yes' ]; then
+ $VESTA/bin/v-add-database-host pgsql localhost postgres $vpass
+ $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
+fi
-# Configuring crond
+# Adding default domain
+$VESTA/bin/v-add-domain admin $servername
+check_result $? "can't create $servername domain"
+
+# Adding cron jobs
command='sudo /usr/local/vesta/bin/v-update-sys-queue disk'
$VESTA/bin/v-add-cron-job 'admin' '15' '02' '*' '*' '*' "$command"
command='sudo /usr/local/vesta/bin/v-update-sys-queue traffic'
@@ -887,34 +1231,45 @@ command='sudo /usr/local/vesta/bin/v-update-user-stats'
$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command"
command='sudo /usr/local/vesta/bin/v-update-sys-rrd'
$VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
+service crond restart
-# Build inititall rrd images
+# Building inititall rrd images
$VESTA/bin/v-update-sys-rrd
-# Enable file system quota
+# Enabling file system quota
if [ "$quota" = 'yes' ]; then
$VESTA/bin/v-add-sys-quota
fi
-# Start system service
+# Starting vesta service
chkconfig vesta on
service vesta start
-if [ "$?" -ne 0 ]; then
- echo "Error: vesta start failed"
- exit 1
+check_result $? "vesta start failed"
+
+# Adding notifications
+$VESTA/upd/add_notifications.sh
+
+
+#----------------------------------------------------------#
+# Vesta Access Info #
+#----------------------------------------------------------#
+
+# Sending install notification to vestacp.com
+wget vestacp.com/notify/?$codename -O /dev/null -q
+
+# Comparing hostname and ip
+host_ip=$(host $servername| head -n 1 | awk '{print $NF}')
+if [ "$host_ip" = "$ip" ]; then
+ ip="$servername"
fi
-# Send notification to vestacp.com
-wget vestacp.com/notify/?$codename -O /dev/null
-
-# Send notification to admin email
+# Sending notification to admin email
echo -e "Congratulations, you have just successfully installed \
-the Vesta Control Panel
+Vesta Control Panel
-You can login in Vesta with following credentials:
+ https://$ip:8083
username: admin
password: $vpass
- https://$vst_ip:8083
We hope that you enjoy your installation of Vesta. Please \
feel free to contact us anytime if you have any questions.
@@ -927,12 +1282,10 @@ vestacp.com team
send_mail="$VESTA/web/inc/mail-wrapper.php"
cat $tmpfile | $send_mail -s "Vesta Control Panel" $email
-rm -f $tmpfile
# Congrats
echo '======================================================='
echo
-echo
echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_| '
echo ' _| _| _| _| _| _| _| '
echo ' _| _| _|_|_| _|_| _| _|_|_|_| '
@@ -940,16 +1293,7 @@ echo ' _| _| _| _| _| _| _| '
echo ' _| _|_|_|_| _|_|_| _| _| _| '
echo
echo
-echo '-------------------------------'
-echo " https://$vst_ip:8083"
-echo ' username: admin'
-echo " password: $vpass"
-echo '-------------------------------'
-echo
-echo
-echo 'Congratulations,'
-echo 'you have successfully installed Vesta Control Panel.'
-echo
-echo
+cat $tmpfile
+rm -f $tmpfile
# EOF
diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh
old mode 100644
new mode 100755
index da443348d..8a17a3ba5
--- a/install/vst-install-ubuntu.sh
+++ b/install/vst-install-ubuntu.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Vesta Ubuntu installer v.04
+# Vesta Ubuntu installer v.05
#----------------------------------------------------------#
# Variables&Functions #
@@ -9,32 +9,58 @@ export PATH=$PATH:/sbin
export DEBIAN_FRONTEND=noninteractive
RHOST='apt.vestacp.com'
CHOST='c.vestacp.com'
-VERSION='0.9.8/ubuntu'
-software="nginx apache2 apache2-utils apache2-suexec-custom bsdutils e2fsprogs
- libapache2-mod-ruid2 libapache2-mod-rpaf libapache2-mod-fcgid bind9 idn
- mysql-server mysql-common mysql-client php5-common php5-cgi php5-mysql
- php5-curl libapache2-mod-php5 vsftpd mc exim4 exim4-daemon-heavy
- clamav-daemon flex dovecot-imapd dovecot-pop3d phpMyAdmin awstats e2fslibs
- webalizer jwhois rssh git spamassassin roundcube roundcube-mysql quota
- roundcube-plugins apparmor-utils sudo bc ftp lsof ntpdate rrdtool
- fail2ban dnsutils vesta vesta-nginx vesta-php"
+VERSION='ubuntu'
+memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
+arch=$(uname -i)
+os='ubuntu'
+release="$(lsb_release -r|awk '{print $2}')"
+codename="$(lsb_release -c|awk '{print $2}')"
+vestacp="http://$CHOST/$VERSION/$release"
+software="nginx apache2 apache2-utils apache2.2-common
+ apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
+ libapache2-mod-fcgid libapache2-mod-php5 php5 php5-common php5-cgi
+ php5-mysql php5-curl php5-fpm php5-pgsql awstats webalizer vsftpd
+ proftpd-basic bind9 exim4 exim4-daemon-heavy clamav-daemon
+ spamassassin dovecot-imapd dovecot-pop3d roundcube-core
+ roundcube-mysql roundcube-plugins mysql-server mysql-common
+ mysql-client postgresql postgresql-contrib phppgadmin phpMyAdmin mc
+ flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
+ e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
+ bsdmainutils cron vesta vesta-nginx vesta-php"
+# Defining help function
help() {
- echo "usage: $0 [OPTIONS]
- -h, --help Print this help and exit
- -f, --force Force installation
- -i, --disable-iptables Disable iptables support
- -b, --disable-fail2ban Disable fail2ban protection
- -n, --noupdate Do not run apt-get upgrade command
- -s, --hostname Set server hostname
- -e, --email Set email address
- -p, --password Set admin password instead of generating it
- -m, --mysql-password Set MySQL password instead of generating it
- -q, --quota Enable File System Quota"
+ echo "Usage: $0 [OPTIONS]
+ -a, --apache Install Apache [yes|no] default: yes
+ -n, --nginx Install Nginx [yes|no] default: yes
+ -w, --phpfpm Install PHP-FPM [yes|no] default: no
+ -v, --vsftpd Install Vsftpd [yes|no] default: yes
+ -j, --proftpd Install ProFTPD [yes|no] default: no
+ -k, --named Install Bind [yes|no] default: yes
+ -m, --mysql Install MySQL [yes|no] default: yes
+ -g, --postgresql Install PostgreSQL [yes|no] default: no
+ -d, --mongodb Install MongoDB [yes|no] unsupported
+ -x, --exim Install Exim [yes|no] default: yes
+ -z, --dovecot Install Dovecot [yes|no] default: yes
+ -c, --clamav Install ClamAV [yes|no] default: yes
+ -t, --spamassassin Install SpamAssassin [yes|no] default: yes
+ -i, --iptables Install Iptables [yes|no] default: yes
+ -b, --fail2ban Install Fail2ban [yes|no] default: yes
+ -q, --quota Filesystem Quota [yes|no] default: no
+ -l, --lang Default language default: en
+ -y, --interactive Interactive install [yes|no] default: yes
+ -s, --hostname Set hostname
+ -e, --email Set admin email
+ -p, --password Set admin password
+ -f, --force Force installation
+ -h, --help Print this help
+
+ Example: bash $0 -e demo@vestacp.com -p p4ssw0rd --apache no --phpfpm yes"
exit 1
}
-# Password generator
+
+# Defining password-gen function
gen_pass() {
MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
LENGTH=10
@@ -45,109 +71,162 @@ gen_pass() {
echo "$PASS"
}
+# Defning return code check function
+check_result() {
+ if [ $1 -ne 0 ]; then
+ echo "Error: $2"
+ exit $1
+ fi
+}
+
+# Defining function to set default value
+set_default_value() {
+ eval variable=\$$1
+ if [ -z "$variable" ]; then
+ eval $1=$2
+ fi
+ if [ "$variable" != 'yes' ] && [ "$variable" != 'no' ]; then
+ eval $1=$2
+ fi
+}
+
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
+# Creating temporary file
+tmpfile=$(mktemp -p /tmp)
+
# Translating argument to --gnu-long-options
for arg; do
delim=""
case "$arg" in
- --help) args="${args}-h " ;;
- --force) args="${args}-f " ;;
- --disable-fail2ban) args="${args}-b " ;;
- --disable-iptables) args="${args}-i " ;;
- --noupdate) args="${args}-n " ;;
+ --apache) args="${args}-a " ;;
+ --nginx) args="${args}-n " ;;
+ --phpfpm) args="${args}-w " ;;
+ --vsftpd) args="${args}-v " ;;
+ --proftpd) args="${args}-j " ;;
+ --named) args="${args}-k " ;;
+ --mysql) args="${args}-m " ;;
+ --postgresql) args="${args}-g " ;;
+ --mongodb) args="${args}-d " ;;
+ --exim) args="${args}-x " ;;
+ --dovecot) args="${args}-z " ;;
+ --clamav) args="${args}-c " ;;
+ --spamassassin) args="${args}-t " ;;
+ --iptables) args="${args}-i " ;;
+ --fail2ban) args="${args}-b " ;;
+ --remi) args="${args}-r " ;;
+ --quota) args="${args}-q " ;;
+ --lang) args="${args}-l " ;;
+ --interactive) args="${args}-y " ;;
--hostname) args="${args}-s " ;;
--email) args="${args}-e " ;;
--password) args="${args}-p " ;;
- --mysql-password) args="${args}-m " ;;
- --quota) args="${args}-q " ;;
- *) [[ "${arg:0:1}" == "-" ]] || delim="\""
- args="${args}${delim}${arg}${delim} ";;
+ --force) args="${args}-f " ;;
+ --help) args="${args}-h " ;;
+ *) [[ "${arg:0:1}" == "-" ]] || delim="\""
+ args="${args}${delim}${arg}${delim} ";;
esac
done
eval set -- "$args"
-# Getopt
-while getopts "hfibdnqe:m:p:s:" Option; do
+# Parsing arguments
+while getopts "a:n:w:v:j:k:m:g:d:x:z:c:t:i:b:r:q:l:y:s:e:p:fh" Option; do
case $Option in
- h) help ;; # Help
- f) force='yes' ;; # Force install
- i) disable_iptables='yes' ;; # Disable iptables
- b) disable_fail2ban='yes' ;; # Disable fail2ban
- n) noupdate='yes' ;; # Disable apt-get upgrade
- s) servername=$OPTARG ;; # Server hostname
- e) email=$OPTARG ;; # Set email
- p) vpass=$OPTARG ;; # Admin password
- m) mpass=$OPTARG ;; # MySQL pasword
- q) quota='yes' ;; # Enable quota
- *) help ;; # Default
+ a) apache=$OPTARG ;; # Apache
+ n) nginx=$OPTARG ;; # Nginx
+ w) phpfpm=$OPTARG ;; # PHP-FPM
+ v) vsftpd=$OPTARG ;; # Vsftpd
+ j) proftpd=$OPTARG ;; # Proftpd
+ k) named=$OPTARG ;; # Named
+ m) mysql=$OPTARG ;; # MySQL
+ g) postgresql=$OPTARG ;; # PostgreSQL
+ d) mongodb=$OPTARG ;; # MongoDB (unsupported)
+ x) exim=$OPTARG ;; # Exim
+ z) dovecot=$OPTARG ;; # Dovecot
+ c) clamd=$OPTARG ;; # ClamAV
+ t) spamd=$OPTARG ;; # SpamAssassin
+ i) iptables=$OPTARG ;; # Iptables
+ b) fail2ban=$OPTARG ;; # Fail2ban
+ r) remi=$OPTARG ;; # Remi repo
+ q) quota=$OPTARG ;; # FS Quota
+ l) lang=$OPTARG ;; # Language
+ y) interactive=$OPTARG ;; # Interactive install
+ s) servername=$OPTARG ;; # Hostname
+ e) email=$OPTARG ;; # Admin email
+ p) vpass=$OPTARG ;; # Admin password
+ f) force='yes' ;; # Force install
+ h) help ;; # Help
+ *) help ;; # Print help (default)
esac
done
-# Am I root?
-if [ "x$(id -u)" != 'x0' ]; then
- echo 'Error: this script can only be executed by root'
- exit 1
-fi
-
-# Check supported version
-if [ -e '/etc/redhat-release' ]; then
- echo 'Error: sorry, this installer works only on Ubuntu'
- exit 1
-fi
-
-# Check supported OS
-if [ "$(arch)" != 'x86_64' ]; then
- arch='i386'
+# Defining default software stack
+set_default_value 'nginx' 'yes'
+set_default_value 'apache' 'yes'
+set_default_value 'phpfpm' 'no'
+set_default_value 'vsftpd' 'yes'
+set_default_value 'proftpd' 'no'
+set_default_value 'named' 'yes'
+set_default_value 'mysql' 'yes'
+set_default_value 'postgresql' 'no'
+set_default_value 'mongodb' 'no'
+set_default_value 'exim' 'yes'
+set_default_value 'dovecot' 'yes'
+if [ $memory -lt 1500000 ]; then
+ set_default_value 'clamd' 'no'
+ set_default_value 'spamd' 'no'
else
- arch="amd64"
+ set_default_value 'clamd' 'yes'
+ set_default_value 'spamd' 'yes'
fi
-os=$(head -n 1 /etc/issue | cut -f 1 -d ' ')
-release=$(head -n 1 /etc/issue | cut -f 2 -d ' ' )
-codename=$(lsb_release -cs | egrep "precise|quantal|raring|saucy|trusty")
-if [ -z "$codename" ]; then
- echo "Error: Ubuntu $(lsb_release -r|awk '{print $2}') is not supported"
- exit 1
+set_default_value 'iptables' 'yes'
+set_default_value 'fail2ban' 'yes'
+set_default_value 'quota' 'no'
+set_default_value 'lang' 'en'
+set_default_value 'interactive' 'yes'
+
+# Checking software conflicts
+if [ "$phpfpm" = 'yes' ]; then
+ apache='no'
+ nginx='yes'
+fi
+if [ "$proftpd" = 'yes' ]; then
+ vsftpd='no'
+fi
+if [ "$exim" = 'no' ]; then
+ clamd='no'
+ spamd='no'
+ dovecot='no'
+fi
+if [ "$iptables" = 'no' ]; then
+ fail2ban='no'
fi
-# Check admin user account
-if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" != 'yes' ]; then
- echo "Error: user admin exists"
- echo
+# Checking root permissions
+if [ "x$(id -u)" != 'x0' ]; then
+ check_error 1 "Script can be run executed only by root"
+fi
+
+# Checking admin user account
+if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
echo 'Please remove admin user account before proceeding.'
echo 'If you want to do it automatically run installer with -f option:'
- echo "Example: bash $0 --force"
- exit 1
+ echo -e "Example: bash $0 --force\n"
+ check_result 1 "User admin exists"
fi
-# Check admin group
-if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" != 'yes' ]; then
- echo "Error: group admin exists"
- echo
- echo 'Please remove admin group before proceeding.'
- echo 'If you want to do it automatically run installer with -f option:'
- echo "Example: bash $0 --force"
- exit 1
-fi
-
-# Check wget
+# Checking wget
if [ ! -e '/usr/bin/wget' ]; then
apt-get -y install wget
- if [ $? -ne 0 ]; then
- echo "Error: can't install wget"
- exit 1
- fi
+ check_result $? "Can't install wget"
fi
-# Check repo availability
-wget -q "$CHOST/$VERSION/vesta.conf" -O /dev/null
-if [ $? -ne 0 ]; then
- echo "Error: no access to repository"
- exit 1
-fi
+# Checking repository availability
+wget -q "$vestacp/deb_signing.key" -O /dev/null
+check_result $? "No access to Vesta repository"
# Check installed packages
tmpfile=$(mktemp -p /tmp)
@@ -170,206 +249,310 @@ if [ ! -z "$conflicts" ] && [ -z "$force" ]; then
echo
echo '!!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!'
echo
- exit 1
+ check_result 1 "Control Panel should be installed on clean server."
fi
-# Check server type
-memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
-if [ "$memory" -lt '350000' ] && [ -z "$force" ]; then
- echo "Error: not enough memory to install Vesta Control Panel."
- echo -e "\nMinimum RAM required: 350Mb"
- echo 'If you want to force installation run this script with -f option:'
- echo "Example: bash $0 --force"
- exit 1
-fi
-srv_type='micro'
-if [ "$memory" -gt '1000000' ]; then
- srv_type='small'
+#----------------------------------------------------------#
+# Brief Info #
+#----------------------------------------------------------#
+
+# Printing nice ascii aslogo
+clear
+echo
+echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|'
+echo ' _| _| _| _| _| _| _|'
+echo ' _| _| _|_|_| _|_| _| _|_|_|_|'
+echo ' _| _| _| _| _| _| _|'
+echo ' _| _|_|_|_| _|_|_| _| _| _|'
+echo
+echo ' Vesta Control Panel'
+echo -e "\n\n"
+
+echo 'Following software will be installed on your system:'
+
+# Web stack
+if [ "$nginx" = 'yes' ]; then
+ echo ' - Nginx Web Server'
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
+ echo ' - Apache Web Server'
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
+ echo ' - Apache Web Server (as backend)'
+fi
+if [ "$phpfpm" = 'yes' ]; then
+ echo ' - PHP-FPM Application Server'
fi
-if [ "$memory" -gt '3000000' ]; then
- srv_type='medium'
+# DNS stack
+if [ "$named" = 'yes' ]; then
+ echo ' - Bind DNS Server'
fi
-if [ "$memory" -gt '7000000' ]; then
- srv_type='large'
-fi
-
-# Are you sure ?
-if [ -z $email ]; then
- clear
- echo
- echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_| '
- echo ' _| _| _| _| _| _| _| '
- echo ' _| _| _|_|_| _|_| _| _|_|_|_| '
- echo ' _| _| _| _| _| _| _| '
- echo ' _| _|_|_|_| _|_|_| _| _| _| '
- echo
- echo ' Vesta Control Panel'
- echo
- echo
- echo 'Following software will be installed on your system:'
- echo ' - Nginx frontend web server'
- echo ' - Apache application web server'
- echo ' - Bind DNS server'
- echo ' - Exim mail server'
- echo ' - Dovecot IMAP and POP3 server'
- if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
- echo ' - Clam mail antivirus'
- echo ' - SpamAssassin antispam'
+# Mail Stack
+if [ "$exim" = 'yes' ]; then
+ echo -n ' - Exim mail server'
+ if [ "$clamd" = 'yes' ] || [ "$spamd" = 'yes' ] ; then
+ echo -n ' + '
+ if [ "$clamd" = 'yes' ]; then
+ echo -n 'Antivirus '
+ fi
+ if [ "$spamd" = 'yes' ]; then
+ echo -n 'Antispam'
+ fi
fi
- echo ' - MySQL database server'
- echo ' - Vsftpd FTP server'
- echo
- echo
+ echo
+ if [ "$dovecot" = 'yes' ]; then
+ echo ' - Dovecot POP3/IMAP Server'
+ fi
+fi
- read -p 'Do you want to proceed? [y/n]): ' answer
+# DB stack
+if [ "$mysql" = 'yes' ]; then
+ echo ' - MySQL Database Server'
+fi
+if [ "$postgresql" = 'yes' ]; then
+ echo ' - PostgreSQL Database Server'
+fi
+if [ "$mongodb" = 'yes' ]; then
+ echo ' - MongoDB Database Server'
+fi
+
+# FTP stack
+if [ "$vsftpd" = 'yes' ]; then
+ echo ' - Vsftpd FTP Server'
+fi
+if [ "$proftpd" = 'yes' ]; then
+ echo ' - ProFTPD FTP Server'
+fi
+
+# Firewall stack
+if [ "$iptables" = 'yes' ]; then
+ echo -n ' - Iptables Firewall'
+fi
+if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
+ echo -n ' + Fail2Ban'
+fi
+echo -e "\n\n"
+
+# Asking for confirmation to proceed
+if [ "$interactive" = 'yes' ]; then
+ read -p 'Would you like to continue [y/n]: ' answer
if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then
echo 'Goodbye'
exit 1
fi
- # Check email
- read -p 'Please enter valid email address: ' email
+ # Asking for contact email
+ if [ -z "$email" ]; then
+ read -p 'Please enter admin email address: ' email
+ fi
- # Define server hostname
+ # Asking to set FQDN hostname
if [ -z "$servername" ]; then
- read -p "Please enter hostname [$(hostname)]: " servername
+ read -p "Please enter FQDN hostname [$(hostname -f)]: " servername
fi
fi
-# Validate email
-local_part=$(echo $email | cut -s -f1 -d\@)
-remote_host=$(echo $email | cut -s -f2 -d\@)
-mx_failed=1
-if [ ! -z "$remote_host" ] && [ ! -z "$local_part" ]; then
- /usr/bin/host -t mx "$remote_host" > /dev/null 2>&1
- mx_failed="$?"
+# Generating admin password if it wasn't set
+if [ -z "$vpass" ]; then
+ vpass=$(gen_pass)
fi
-if [ "$mx_failed" -eq 1 ]; then
- echo "Error: email $email is not valid"
- exit 1
+# Set hostname if it wasn't set
+if [ -z "$servername" ]; then
+ servername=$(hostname -f)
+fi
+
+# Set email if it wasn't set
+if [ -z "$email" ]; then
+ email="admin@$servername"
+fi
+
+# Defining backup directory
+vst_backups="/root/vst_install_backups/$(date +%s)"
+echo "Installation backup directory: $vst_backups"
+
+# Printing start message and sleeping for 5 seconds
+echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
+sleep 5
+
+
+#----------------------------------------------------------#
+# Checking swap #
+#----------------------------------------------------------#
+
+# Checking swap on small instances
+if [ -z "$(swapon -s)" ] && [ $memory -lt 1000000 ]; then
+ fallocate -l 1G /swapfile
+ chmod 600 /swapfile
+ mkswap /swapfile
+ swapon /swapfile
+ echo "/swapfile none swap sw 0 0" >> /etc/fstab
fi
#----------------------------------------------------------#
# Install repository #
#----------------------------------------------------------#
-# Let's start
-echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
-sleep 5
-# Update system
-if [ -z "$noupdate" ]; then
- apt-get -y upgrade
- if [ $? -ne 0 ]; then
- echo 'Error: apt-get upgrade failed'
- exit 1
- fi
-fi
+# Updating system
+apt-get -y upgrade
+check_result $? 'apt-get upgrade failed'
-# Install nginx repo
+# Installing nginx repo
apt=/etc/apt/sources.list.d
echo "deb http://nginx.org/packages/ubuntu/ $codename nginx" > $apt/nginx.list
wget http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
apt-key add /tmp/nginx_signing.key
-# Install vesta repo
+# Installing vesta repo
echo "deb http://$RHOST/$codename/ $codename vesta" > $apt/vesta.list
wget $CHOST/deb_signing.key -O deb_signing.key
apt-key add deb_signing.key
#----------------------------------------------------------#
-# Backups #
+# Backup #
#----------------------------------------------------------#
-# Prepare backup tree
-vst_backups="/root/vst_install_backups/$(date +%s)"
-mkdir -p $vst_backups/nginx
-mkdir -p $vst_backups/apache2
-mkdir -p $vst_backups/mysql
-mkdir -p $vst_backups/exim4
-mkdir -p $vst_backups/dovecot
-mkdir -p $vst_backups/clamav
-mkdir -p $vst_backups/spamassassin
-mkdir -p $vst_backups/vsftpd
-mkdir -p $vst_backups/bind
-mkdir -p $vst_backups/vesta
-mkdir -p $vst_backups/home
+# Creating backup directory tree
+mkdir -p $vst_backups
+cd $vst_backups
+mkdir nginx apache2 php5 php5-fpm vsftpd proftpd bind exim4 dovecot clamd
+mkdir spamassassin mysql postgresql mongodb vesta
-# Backup nginx
+# Backing up Nginx configuration
service nginx stop > /dev/null 2>&1
-if [ -e '/etc/nginx/nginx.conf' ]; then
- cp -r /etc/nginx/* $vst_backups/nginx/
-fi
+cp -r /etc/nginx/* $vst_backups/nginx >/dev/null 2>&1
-# Backup apache2
+# Backing up Apache configuration
service apache2 stop > /dev/null 2>&1
-if [ -e '/etc/apache2/apache2.conf' ]; then
- cp -r /etc/apache2/* $vst_backups/apache2/
-fi
+cp -r /etc/apache2/* $vst_backups/apache2 > /dev/null 2>&1
+rm -f /etc/apache2/conf.d/* > /dev/null 2>&1
-# Backup bind9
+# Backing up PHP configuration
+cp /etc/php.ini $vst_backups/php > /dev/null 2>&1
+cp -r /etc/php.d $vst_backups/php > /dev/null 2>&1
+
+# Backing up PHP configuration
+service php5-fpm stop >/dev/null 2>&1
+cp /etc/php5/* $vst_backups/php5 > /dev/null 2>&1
+rm -f /etc/php5/fpm/pool.d/* >/dev/null 2>&1
+
+# Backing up Bind configuration
service bind9 stop > /dev/null 2>&1
-if [ -e '/etc/bind/named.conf' ]; then
- cp -r /etc/bind/* $vst_backups/bind/
-fi
+cp -r /etc/bind/* $vst_backups/bind > /dev/null 2>&1
-# Backup vsftpd
+# Backing up Vsftpd configuration
service vsftpd stop > /dev/null 2>&1
-if [ -e '/etc/vsftpd.conf' ]; then
- cp /etc/vsftpd.conf $vst_backups/vsftpd/
-fi
+cp /etc/vsftpd.conf $vst_backups/vsftpd > /dev/null 2>&1
-# Backup exim4
+# Backing up ProFTPD configuration
+service proftpd stop > /dev/null 2>&1
+cp /etc/proftpd.conf $vst_backups/proftpd >/dev/null 2>&1
+
+# Backing up Exim configuration
service exim4 stop > /dev/null 2>&1
-if [ -e '/etc/exim4/exim4.conf.template' ]; then
- cp -r /etc/exim4/* $vst_backups/exim4/
-fi
+cp -r /etc/exim4/* $vst_backups/exim4 > /dev/null 2>&1
-# Backup clamav
+# Backing up ClamAV configuration
service clamav-daemon stop > /dev/null 2>&1
-if [ -e '/etc/clamav/clamd.conf' ]; then
- cp -r /etc/clamav/* $vst_backups/clamav/
-fi
+cp -r /etc/clamav/* $vst_backups/clamav > /dev/null 2>&1
-# Backup SpamAssassin
+# Backing up SpamAssassin configuration
service spamassassin stop > /dev/null 2>&1
-if [ -e '/etc/spamassassin/local.cf' ]; then
- cp -r /etc/spamassassin/* $vst_backups/spamassassin/
-fi
+cp -r /etc/spamassassin/* $vst_backups/spamassassin > /dev/null 2>&1
-# Backup dovecot
+# Backing up Dovecot configuration
service dovecot stop > /dev/null 2>&1
-if [ -e '/etc/dovecot.conf' ]; then
- cp /etc/dovecot.conf $vst_backups/dovecot/
-fi
-if [ -e '/etc/dovecot' ]; then
- cp -r /etc/dovecot/* $vst_backups/dovecot/
-fi
+cp /etc/dovecot.conf $vst_backups/dovecot > /dev/null 2>&1
+cp -r /etc/dovecot/* $vst_backups/dovecot > /dev/null 2>&1
-# Backup MySQL stuff
+# Backing up MySQL/MariaDB configuration and data
service mysql stop > /dev/null 2>&1
-if [ -e '/var/lib/mysql' ]; then
- mv /var/lib/mysql $vst_backups/mysql/mysql_datadir
-fi
-if [ -e '/etc/mysql/my.cnf' ]; then
- cp -r /etc/mysql/* $vst_backups/mysql/
-fi
-if [ -e '/root/.my.cnf' ]; then
- mv /root/.my.cnf $vst_backups/mysql/
-fi
+killall -9 mysqld > /dev/null 2>&1
+mv /var/lib/mysql $vst_backups/mysql/mysql_datadir > /dev/null 2>&1
+cp -r /etc/mysql/* $vst_backups/mysql > /dev/null 2>&1
+mv -f /root/.my.cnf $vst_backups/mysql > /dev/null 2>&1
# Backup vesta
service vesta stop > /dev/null 2>&1
-if [ -e '/usr/local/vesta' ]; then
- cp -r /usr/local/vesta/* $vst_backups/vesta/
- apt-get -y remove vesta*
- apt-get -y purge vesta*
- rm -rf /usr/local/vesta
+cp -r /usr/local/vesta/* $vst_backups/vesta > /dev/null 2>&1
+apt-get -y remove vesta vesta-nginx vesta-php > /dev/null 2>&1
+apt-get -y purge vesta vesta-nginx vesta-php > /dev/null 2>&1
+rm -rf /usr/local/vesta > /dev/null 2>&1
+
+
+#----------------------------------------------------------#
+# Package Exludes #
+#----------------------------------------------------------#
+
+# Excluding packages
+if [ "$release" != "15.04" ] && [ "$release" != "15.04" ]; then
+ software=$(echo "$software" | sed -e "s/apache2.2-common//")
+fi
+
+if [ "$nginx" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/^nginx//")
+fi
+if [ "$apache" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/apache2 //")
+ software=$(echo "$software" | sed -e "s/apache2-utils//")
+ software=$(echo "$software" | sed -e "s/apache2-suexec-custom//")
+ software=$(echo "$software" | sed -e "s/apache2.2-common//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-rpaf//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-fcgid//")
+ software=$(echo "$software" | sed -e "s/libapache2-mod-php5//")
+fi
+if [ "$phpfpm" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/php5-fpm//")
+fi
+if [ "$vsftpd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/vsftpd//")
+fi
+if [ "$proftpd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/proftpd-basic//")
+ software=$(echo "$software" | sed -e "s/proftpd-mod-vroot//")
+fi
+if [ "$named" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/bind9//")
+fi
+if [ "$exim" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/exim4 //")
+ software=$(echo "$software" | sed -e "s/exim4-daemon-heavy//")
+ software=$(echo "$software" | sed -e "s/dovecot-imapd//")
+ software=$(echo "$software" | sed -e "s/dovecot-pop3d//")
+ software=$(echo "$software" | sed -e "s/clamav-daemon//")
+ software=$(echo "$software" | sed -e "s/spamassassin//")
+fi
+if [ "$clamd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/clamav-daemon//")
+fi
+if [ "$spamd" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/spamassassin//")
+fi
+if [ "$dovecot" = 'no' ]; then
+ software=$(echo "$software" | sed -e "s/dovecot-imapd//")
+ software=$(echo "$software" | sed -e "s/dovecot-pop3d//")
+fi
+if [ "$mysql" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/mysql-server//')
+ software=$(echo "$software" | sed -e 's/mysql-client//')
+ software=$(echo "$software" | sed -e 's/mysql-common//')
+ software=$(echo "$software" | sed -e 's/php5-mysql//')
+ software=$(echo "$software" | sed -e 's/phpMyAdmin//')
+fi
+if [ "$postgresql" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/postgresql-contrib//')
+ software=$(echo "$software" | sed -e 's/postgresql//')
+ software=$(echo "$software" | sed -e 's/php5-pgsql//')
+ software=$(echo "$software" | sed -e 's/phppgadmin//')
+fi
+if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
+ software=$(echo "$software" | sed -e 's/fail2ban//')
fi
@@ -377,37 +560,16 @@ fi
# Install packages #
#----------------------------------------------------------#
-# Exclude heavy packages
-if [ "$srv_type" = 'micro' ]; then
- software=$(echo "$software" | sed -e 's/libapache2-mod-fcgid//')
- software=$(echo "$software" | sed -e 's/clamav-daemon//')
- software=$(echo "$software" | sed -e 's/spamassassin//')
-fi
-
-if [ "$srv_type" = 'small' ]; then
- software=$(echo "$software" | sed -e 's/clamav-daemon//')
- software=$(echo "$software" | sed -e 's/spamassassin//')
-fi
-
-# Exclude fail2ban
-if [ "$disable_fail2ban" = 'yes' ]; then
- software=$(echo "$software" | sed -e 's/fail2ban//')
-fi
-
# Update system packages
apt-get update
-# Disable daemon autostart
-# For more details /usr/share/doc/sysv-rc/README.policy-rc.d.gz
+# Disable daemon autostart /usr/share/doc/sysv-rc/README.policy-rc.d.gz
echo -e '#!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
chmod a+x /usr/sbin/policy-rc.d
-# Install Vesta packages
+# Install apt packages
apt-get -y install $software
-if [ $? -ne 0 ]; then
- echo 'Error: apt-get install failed'
- exit 1
-fi
+check_result $? "apt-get install failed"
# Restore policy
rm -f /usr/sbin/policy-rc.d
@@ -417,108 +579,12 @@ rm -f /usr/sbin/policy-rc.d
# Configure system #
#----------------------------------------------------------#
-# Set writable permission on tmp directory
-chmod 777 /tmp
-
-# Vesta configuration
-echo "export VESTA='/usr/local/vesta'" > /etc/profile.d/vesta.sh
-chmod 755 /etc/profile.d/vesta.sh
-source /etc/profile.d/vesta.sh
-echo 'PATH=$PATH:/usr/local/vesta/bin' >> /root/.bash_profile
-echo 'export PATH' >> /root/.bash_profile
-source /root/.bash_profile
-wget $CHOST/$VERSION/vesta.log -O /etc/logrotate.d/vesta
-
-# Directory tree
-mkdir -p $VESTA/conf
-mkdir -p $VESTA/log
-mkdir -p $VESTA/ssl
-mkdir -p $VESTA/data
-mkdir -p $VESTA/data/ips
-mkdir -p $VESTA/data/queue
-mkdir -p $VESTA/data/users
-mkdir -p $VESTA/data/firewall
-touch $VESTA/data/queue/backup.pipe
-touch $VESTA/data/queue/disk.pipe
-touch $VESTA/data/queue/webstats.pipe
-touch $VESTA/data/queue/restart.pipe
-touch $VESTA/data/queue/traffic.pipe
-chmod 750 $VESTA/conf
-chmod 750 $VESTA/data/users
-chmod 750 $VESTA/data/ips
-chmod -R 750 $VESTA/data/queue
-ln -s /usr/local/vesta/log /var/log/vesta
-touch /var/log/vesta/system.log
-touch /var/log/vesta/nginx-error.log
-touch /var/log/vesta/auth.log
-chmod 660 /var/log/vesta/*
-adduser backup > /dev/null 2>&1
-mkdir -p /home/backup
-chown backup:backup /home/backup
-ln -s /home/backup /backup
-chmod a+x /backup
-
-# vesta.conf
-wget $CHOST/$VERSION/vesta.conf -O $VESTA/conf/vesta.conf
-if [ "$srv_type" = 'micro' ] || [ "$srv_type" = 'small' ]; then
- sed -i "s/clamav-daemon//g" $VESTA/conf/vesta.conf
- sed -i "s/spamassassin//g" $VESTA/conf/vesta.conf
-fi
-
-# Set server hostname
-if [ -z "$servername" ]; then
- servername=$(hostname)
-fi
-/usr/local/vesta/bin/v-change-sys-hostname $servername 2>/dev/null
-
-# Templates, packages
-cd /usr/local/vesta/data
-wget $CHOST/$VERSION/packages.tar.gz -O packages.tar.gz
-tar -xzf packages.tar.gz
-rm -f packages.tar.gz
-cd /usr/local/vesta/data
-wget $CHOST/$VERSION/templates.tar.gz -O templates.tar.gz
-tar -xzf templates.tar.gz
-rm -f templates.tar.gz
-if [ "$codename" = 'saucy' ] || [ "$codename" = 'trusty' ]; then
- sed -i "s/Include /IncludeOptional /g" \
- $VESTA/data/templates/web/apache2/*tpl
-fi
-chmod -R 755 /usr/local/vesta/data/templates
-cp templates/web/skel/public_html/index.html /var/www/
-sed -i 's/%domain%/It worked!/g' /var/www/index.html
-if [ "$srv_type" = 'micro' ]; then
- rm -f /usr/local/vesta/data/templates/web/apache2/phpfcgid.*
-fi
-
-# Removing CGI templates
-if [ "$codename" = 'trusty' ]; then
- rm -f /usr/local/vesta/data/templates/web/apache2/phpcgi.*
-fi
-
-# Generating SSL certificate
-$VESTA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
- 'San Francisco' 'Vesta Control Panel' 'IT' > /tmp/vst.pem
-
-# Parsing merged certificate file
-crt_end=$(grep -n "END CERTIFICATE-" /tmp/vst.pem |cut -f 1 -d:)
-key_start=$(grep -n "BEGIN RSA" /tmp/vst.pem |cut -f 1 -d:)
-key_end=$(grep -n "END RSA" /tmp/vst.pem |cut -f 1 -d:)
-
-# Adding SSL certificate
-cd /usr/local/vesta/ssl
-sed -n "1,${crt_end}p" /tmp/vst.pem > certificate.crt
-sed -n "$key_start,${key_end}p" /tmp/vst.pem > certificate.key
-chown root:mail /usr/local/vesta/ssl/*
-chmod 660 /usr/local/vesta/ssl/*
-rm /tmp/vst.pem
-
# Enable SSH password auth
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
service ssh restart
# AppArmor
-aa-complain /usr/sbin/named
+#aa-complain /usr/sbin/named
# Disable awstats cron
rm -f /etc/cron.d/awstats
@@ -529,13 +595,6 @@ echo 'LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
# Register /sbin/nologin
echo "/sbin/nologin" >> /etc/shells
-# Sudo configuration
-wget $CHOST/$VERSION/sudoers.vestacp.conf -O /etc/sudoers.d/vestacp
-wget $CHOST/$VERSION/sudoers.admin.conf -O /etc/sudoers.d/admin
-chmod 440 /etc/sudoers.d/vestacp
-chmod 440 /etc/sudoers.d/admin
-echo 'Defaults:admin !syslog' >>/etc/sudoers.d/admin
-
# NTP Synchronization
echo '#!/bin/sh' > /etc/cron.daily/ntpdate
echo "$(which ntpdate) -s pool.ntp.org" >> /etc/cron.daily/ntpdate
@@ -551,295 +610,532 @@ sed -i 's/#allowsftp/allowsftp/' /etc/rssh.conf
sed -i 's/#allowrsync/allowrsync/' /etc/rssh.conf
chmod 755 /usr/bin/rssh
-# Nginx configuration
-rm -f /etc/nginx/conf.d/*.conf
-wget $CHOST/$VERSION/nginx.conf -O /etc/nginx/nginx.conf
-wget $CHOST/$VERSION/nginx-status.conf -O /etc/nginx/conf.d/status.conf
-touch /etc/nginx/conf.d/vesta.conf
-update-rc.d nginx defaults
-service nginx stop > /dev/null 2>&1
-service nginx start
-if [ "$?" -ne 0 ]; then
- echo "Error: nginx start failed"
- exit 1
+
+#----------------------------------------------------------#
+# Configure VESTA #
+#----------------------------------------------------------#
+
+# AppArmor
+aa-complain /usr/sbin/named 2>/dev/null
+
+# Downlading sudo configuration
+mkdir -p /etc/sudoers.d
+wget $vestacp/sudo/admin -O /etc/sudoers.d/admin
+chmod 440 /etc/sudoers.d/admin
+
+# Configuring system env
+echo "export VESTA='/usr/local/vesta'" > /etc/profile.d/vesta.sh
+chmod 755 /etc/profile.d/vesta.sh
+source /etc/profile.d/vesta.sh
+echo 'PATH=$PATH:/usr/local/vesta/bin' >> /root/.bash_profile
+echo 'export PATH' >> /root/.bash_profile
+source /root/.bash_profile
+
+# Configuring logrotate for vesta logs
+wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta
+
+# Buidling directory tree and creating some blank files for vesta
+mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
+ $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall
+touch $VESTA/data/queue/backup.pipe $VESTA/data/queue/disk.pipe \
+ $VESTA/data/queue/webstats.pipe $VESTA/data/queue/restart.pipe \
+ $VESTA/data/queue/traffic.pipe $VESTA/log/system.log \
+ $VESTA/log/nginx-error.log $VESTA/log/auth.log
+chmod 750 $VESTA/conf $VESTA/data/users $VESTA/data/ips $VESTA/log
+chmod -R 750 $VESTA/data/queue
+chmod 660 $VESTA/log/*
+rm -f /var/log/vesta
+ln -s /usr/local/vesta/log /var/log/vesta
+
+# Generating vesta configuration
+rm -f $VESTA/conf/vesta.conf 2>/dev/null
+touch $VESTA/conf/vesta.conf
+chmod 660 $VESTA/conf/vesta.conf
+
+# WEB stack
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
+ echo "WEB_SYSTEM='apache2'" >> $VESTA/conf/vesta.conf
+ echo "WEB_RGROUPS='www-data'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='mod_ssl'" >> $VESTA/conf/vesta.conf
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
+ echo "WEB_SYSTEM='apache2'" >> $VESTA/conf/vesta.conf
+ echo "WEB_RGROUPS='www-data'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='8080'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='8443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='mod_ssl'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_SYSTEM='nginx'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "PROXY_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$apache" = 'no' ] && [ "$nginx" = 'yes' ]; then
+ echo "WEB_SYSTEM='nginx'" >> $VESTA/conf/vesta.conf
+ echo "WEB_PORT='80'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL_PORT='443'" >> $VESTA/conf/vesta.conf
+ echo "WEB_SSL='openssl'" >> $VESTA/conf/vesta.conf
+ if [ "$phpfpm" = 'yes' ]; then
+ echo "WEB_BACKEND='php5-fpm'" >> $VESTA/conf/vesta.conf
+ fi
+ echo "STATS_SYSTEM='webalizer,awstats'" >> $VESTA/conf/vesta.conf
fi
-# Apache configuration
-wget $CHOST/$VERSION/apache2.conf -O /etc/apache2/apache2.conf
-if [ "$codename" = 'saucy' ] || [ "$codename" = 'trusty' ]; then
- sed -i "/^LockFile /d" /etc/apache2/apache2.conf
+# FTP stack
+if [ "$vsftpd" = 'yes' ]; then
+ echo "FTP_SYSTEM='vsftpd'" >> $VESTA/conf/vesta.conf
fi
-wget $CHOST/$VERSION/apache2-status.conf \
- -O /etc/apache2/mods-enabled/status.conf
-wget $CHOST/$VERSION/apache2.log -O /etc/logrotate.d/apache2
-echo "# Powered by vesta" > /etc/apache2/sites-available/default
-echo "# Powered by vesta" > /etc/apache2/sites-available/default-ssl
-echo "# Powered by vesta" > /etc/apache2/ports.conf
-mkdir -p /etc/apache2/conf.d
-rm -f /etc/apache2/conf.d/vesta.conf
-echo > /etc/apache2/conf.d/vesta.conf
-touch /var/log/apache2/access.log
-touch /var/log/apache2/error.log
-mkdir -p /var/log/apache2/domains
-chmod a+x /var/log/apache2
-chmod 640 /var/log/apache2/access.log
-chmod 640 /var/log/apache2/error.log
-chmod 751 /var/log/apache2/domains
-a2enmod rewrite
-a2enmod ssl
-a2enmod suexec
-echo -e "/home\npublic_html/cgi-bin" > /etc/apache2/suexec/www-data
-update-rc.d apache2 defaults
-service apache2 stop > /dev/null 2>&1
-service apache2 start
-if [ "$?" -ne 0 ]; then
- echo "Error: apache2 start failed"
- exit 1
+if [ "$proftpd" = 'yes' ]; then
+ echo "FTP_SYSTEM='proftpd'" >> $VESTA/conf/vesta.conf
fi
-# Vsftpd configuration
-wget $CHOST/$VERSION/vsftpd.conf -O /etc/vsftpd.conf
-update-rc.d vsftpd defaults
-service vsftpd stop > /dev/null 2>&1
-service vsftpd start
-if [ "$?" -ne 0 ]; then
- echo "Error: vsftpd start failed"
- exit 1
+# DNS stack
+if [ "$named" = 'yes' ]; then
+ echo "DNS_SYSTEM='bind9'" >> $VESTA/conf/vesta.conf
fi
-# Generating MySQL password if it wasn't set
-if [ -z "$mpass" ]; then
- mpass=$(gen_pass)
+# Mail stack
+if [ "$exim" = 'yes' ]; then
+ echo "MAIL_SYSTEM='exim4'" >> $VESTA/conf/vesta.conf
+ if [ "$clamd" = 'yes' ]; then
+ echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $VESTA/conf/vesta.conf
+ fi
+ if [ "$spamd" = 'yes' ]; then
+ echo "ANTISPAM_SYSTEM='spamassassin'" >> $VESTA/conf/vesta.conf
+ fi
+ if [ "$dovecot" = 'yes' ]; then
+ echo "IMAP_SYSTEM='dovecot'" >> $VESTA/conf/vesta.conf
+ fi
fi
-# MySQL configuration
-wget $CHOST/$VERSION/my.cnf -O /etc/mysql/my.cnf
-mysql_install_db
-if [ "$release" != '14.04' ]; then
+# CRON daemon
+echo "CRON_SYSTEM='cron'" >> $VESTA/conf/vesta.conf
+
+# Firewall stack
+if [ "$iptables" = 'yes' ]; then
+ echo "FIREWALL_SYSTEM='iptables'" >> $VESTA/conf/vesta.conf
+fi
+if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
+ echo "FIREWALL_EXTENSION='fail2ban'" >> $VESTA/conf/vesta.conf
+fi
+
+# Disk quota
+if [ "$quota" = 'yes' ]; then
+ echo "DISK_QUOTA='yes'" >> $VESTA/conf/vesta.conf
+fi
+
+# Backups
+echo "BACKUP_SYSTEM='local'" >> $VESTA/conf/vesta.conf
+
+# Language
+echo "LANGUAGE='$lang'" >> $VESTA/conf/vesta.conf
+
+# Version
+echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
+
+# Downloading hosting packages
+cd $VESTA/data
+wget $vestacp/packages.tar.gz -O packages.tar.gz
+tar -xzf packages.tar.gz
+rm -f packages.tar.gz
+
+# Downloading templates
+wget $vestacp/templates.tar.gz -O templates.tar.gz
+tar -xzf templates.tar.gz
+rm -f templates.tar.gz
+
+# Copying index.html to default documentroot
+cp templates/web/skel/public_html/index.html /var/www/
+sed -i 's/%domain%/It worked!/g' /var/www/index.html
+
+# Downloading firewall rules
+wget $vestacp/firewall.tar.gz -O firewall.tar.gz
+tar -xzf firewall.tar.gz
+rm -f firewall.tar.gz
+
+# Configuring server hostname
+$VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
+
+# Generating SSL certificate
+$VESTA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
+ 'San Francisco' 'Vesta Control Panel' 'IT' > /tmp/vst.pem
+
+# Parsing certificate file
+crt_end=$(grep -n "END CERTIFICATE-" /tmp/vst.pem |cut -f 1 -d:)
+key_start=$(grep -n "BEGIN RSA" /tmp/vst.pem |cut -f 1 -d:)
+key_end=$(grep -n "END RSA" /tmp/vst.pem |cut -f 1 -d:)
+
+# Adding SSL certificate
+cd $VESTA/ssl
+sed -n "1,${crt_end}p" /tmp/vst.pem > certificate.crt
+sed -n "$key_start,${key_end}p" /tmp/vst.pem > certificate.key
+chown root:mail $VESTA/ssl/*
+chmod 660 $VESTA/ssl/*
+rm /tmp/vst.pem
+
+
+#----------------------------------------------------------#
+# Configure Nginx #
+#----------------------------------------------------------#
+
+if [ "$nginx" = 'yes' ]; then
+ rm -f /etc/nginx/conf.d/*.conf
+ wget $vestacp/nginx/nginx.conf -O /etc/nginx/nginx.conf
+ wget $vestacp/nginx/status.conf -O /etc/nginx/conf.d/status.conf
+ wget $vestacp/nginx/phpmyadmin.inc -O /etc/nginx/conf.d/phpmyadmin.inc
+ wget $vestacp/nginx/phppgadmin.inc -O /etc/nginx/conf.d/phppgadmin.inc
+ wget $vestacp/nginx/webmail.inc -O /etc/nginx/conf.d/webmail.inc
+ wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
+ echo > /etc/nginx/conf.d/vesta.conf
+ mkdir -p /var/log/nginx/domains
+ update-rc.d nginx defaults
+ service nginx start
+ check_result $? "nginx start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure Apache #
+#----------------------------------------------------------#
+
+if [ "$apache" = 'yes' ]; then
+ wget $vestacp/apache2/apache2.conf -O /etc/apache2/apache2.conf
+ wget $vestacp/apache2/status.conf -O /etc/apache2/mods-enabled/status.conf
+ wget $vestacp/logrotate/apache2 -O /etc/logrotate.d/apache2
+ a2enmod rewrite
+ a2enmod suexec
+ a2enmod ssl
+ a2enmod actions
+ a2enmod ruid2
+ mkdir -p /etc/apache2/conf.d
+ echo > /etc/apache2/conf.d/vesta.conf
+ echo "# Powered by vesta" > /etc/apache2/sites-available/default
+ echo "# Powered by vesta" > /etc/apache2/sites-available/default-ssl
+ echo "# Powered by vesta" > /etc/apache2/ports.conf
+ echo -e "/home\npublic_html/cgi-bin" > /etc/apache2/suexec/www-data
+ touch /var/log/apache2/access.log /var/log/apache2/error.log
+ mkdir -p /var/log/apache2/domains
+ chmod a+x /var/log/apache2
+ chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
+ chmod 751 /var/log/apache2/domains
+ update-rc.d apache2 defaults
+ service apache2 start
+ check_result $? "apache2 start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure PHP-FPM #
+#----------------------------------------------------------#
+
+if [ "$phpfpm" = 'yes' ]; then
+ wget $vestacp/php5-fpm/www.conf -O /etc/php5/fpm/pool.d/www.conf
+ update-rc.d php5-fpm defaults
+ service php5-fpm start
+ check_result $? "php-fpm start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure PHP #
+#----------------------------------------------------------#
+
+ZONE=$(timedatectl 2>/dev/null|grep Timezone|awk '{print $2}')
+if [ -z "$ZONE" ]; then
+ ZONE='UTC'
+fi
+for pconf in $(find /etc/php* -name php.ini); do
+ sed -i "s/;date.timezone =/date.timezone = $ZONE/g" $pconf
+ sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
+done
+
+
+#----------------------------------------------------------#
+# Configure VSFTPD #
+#----------------------------------------------------------#
+
+if [ "$vsftpd" = 'yes' ]; then
+ wget $vestacp/vsftpd/vsftpd.conf -O /etc/vsftpd.conf
+ update-rc.d vsftpd defaults
+ service vsftpd start
+ check_result $? "vsftpd start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure ProFTPD #
+#----------------------------------------------------------#
+
+if [ "$proftpd" = 'yes' ]; then
+ echo "127.0.0.1 $servername" >> /etc/hosts
+ wget $vestacp/proftpd/proftpd.conf -O /etc/proftpd/proftpd.conf
+ update-rc.d proftpd defaults
+ service proftpd start
+ check_result $? "proftpd start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure MySQL/MariaDB #
+#----------------------------------------------------------#
+
+if [ "$mysql" = 'yes' ]; then
+ mycnf="my-small.cnf"
+ if [ $memory -gt 1200000 ]; then
+ mycnf="my-medium.cnf"
+ fi
+ if [ $memory -gt 3900000 ]; then
+ mycnf="my-large.cnf"
+ fi
+
+ # MySQL configuration
+ wget $vestacp/mysql/$mycnf -O /etc/mysql/my.cnf
+ mysql_install_db
update-rc.d mysql defaults
-fi
-service mysql stop > /dev/null 2>&1
-service mysql start
-if [ "$?" -ne 0 ]; then
- echo "Error: mysql start failed"
- exit 1
-fi
-mysqladmin -u root password $mpass
-echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
-chmod 600 /root/.my.cnf
-mysql -e "DELETE FROM mysql.user WHERE User=''"
-mysql -e "DROP DATABASE test" > /dev/null 2>&1
-mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
-mysql -e "DELETE FROM mysql.user WHERE user='' or password='';"
-mysql -e "FLUSH PRIVILEGES"
+ service mysql start
+ check_result $? "mysql start failed"
-# Bind configuration
-wget $CHOST/$VERSION/named.conf -O /etc/bind/named.conf
-sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
-chown root:bind /etc/bind/named.conf
-chmod 640 /etc/bind/named.conf
-update-rc.d bind9 defaults
-service bind9 stop > /dev/null 2>&1
-service bind9 start
-if [ "$?" -ne 0 ]; then
- echo "Error: bind9 start failed"
- exit 1
+ # Securing MySQL installation
+ mysqladmin -u root password $vpass
+ echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf
+ chmod 600 /root/.my.cnf
+ mysql -e "DELETE FROM mysql.user WHERE User=''"
+ mysql -e "DROP DATABASE test" >/dev/null 2>&1
+ mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
+ mysql -e "DELETE FROM mysql.user WHERE user='' or password='';"
+ mysql -e "FLUSH PRIVILEGES"
+
+ # Configuring phpMyAdmin
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/pma/apache.conf -O /etc/phpmyadmin/apache.conf
+ ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
+ fi
+ wget $vestacp/pma/config.inc.php -O /etc/phpmyadmin/config.inc.php
+ chmod 777 /var/lib/phpmyadmin/tmp
fi
-# Exim
-wget $CHOST/$VERSION/exim4.conf.template -O /etc/exim4/exim4.conf.template
-if [ "$srv_type" != 'micro' ] && [ "$srv_type" != 'small' ]; then
- sed -i "s/#SPAM/SPAM/g" /etc/exim4/exim4.conf.template
- sed -i "s/#CLAMD/CLAMD/g" /etc/exim4/exim4.conf.template
-fi
-wget $CHOST/$VERSION/dnsbl.conf -O /etc/exim4/dnsbl.conf
-wget $CHOST/$VERSION/spam-blocks.conf -O /etc/exim4/spam-blocks.conf
-touch /etc/exim4/white-blocks.conf
-rm -rf /etc/exim4/domains
-mkdir -p /etc/exim4/domains
-chmod 640 /etc/exim4/exim4.conf.template
-gpasswd -a Debian-exim mail
-if [ -e /etc/init.d/sendmail ]; then
- update-rc.d -f sendmail remove
- service sendmail stop
-fi
-if [ -e /etc/init.d/postfix ]; then
- update-rc.d -f postfix remove
- service postfix stop
-fi
-rm -f /etc/alternatives/mta
-ln -s /usr/sbin/exim4 /etc/alternatives/mta
-update-rc.d exim4 defaults
-service exim4 stop > /dev/null 2>&1
-service exim4 start
-if [ "$?" -ne 0 ]; then
- echo "Error: exim start failed"
- exit
+#----------------------------------------------------------#
+# Configure PostgreSQL #
+#----------------------------------------------------------#
+
+if [ "$postgresql" = 'yes' ]; then
+ wget $vestacp/postgresql/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf
+ service postgresql restart
+ sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" 2>/dev/null
+
+ # Configuring phpPgAdmin
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/pga/phppgadmin.conf -O /etc/apache2/conf.d/phppgadmin.conf
+ fi
+ wget $vestacp/pga/config.inc.php -O /etc/phppgadmin/config.inc.php
fi
-# Dovecot configuration
-wget $CHOST/$VERSION/dovecot.conf -O /etc/dovecot/dovecot.conf
-cd /etc/dovecot/
-wget $CHOST/$VERSION/dovecot-conf.d.tar.gz
-rm -rf conf.d *.ext README
-tar -xzf dovecot-conf.d.tar.gz
-rm -f dovecot-conf.d.tar.gz
-chown -R root:root /etc/dovecot
-gpasswd -a dovecot mail
-update-rc.d dovecot defaults
-service dovecot stop > /dev/null 2>&1
-service dovecot start
-if [ "$?" -ne 0 ]; then
- echo "Error: dovecot start failed"
- exit 1
+
+#----------------------------------------------------------#
+# Configure Bind #
+#----------------------------------------------------------#
+
+if [ "$named" = 'yes' ]; then
+ wget $vestacp/bind/named.conf -O /etc/bind/named.conf
+ sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
+ chown root:bind /etc/bind/named.conf
+ chmod 640 /etc/bind/named.conf
+ update-rc.d bind9 defaults
+ service bind9 start
+ check_result $? "bind9 start failed"
fi
-# ClamAV configuration
-if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
- wget $CHOST/$VERSION/clamd.conf -O /etc/clamav/clamd.conf
+#----------------------------------------------------------#
+# Configure Exim #
+#----------------------------------------------------------#
+
+if [ "$exim" = 'yes' ]; then
+ gpasswd -a Debian-exim mail
+ wget $vestacp/exim/exim4.conf.template -O /etc/exim4/exim4.conf.template
+ wget $vestacp/exim/dnsbl.conf -O /etc/exim4/dnsbl.conf
+ wget $vestacp/exim/spam-blocks.conf -O /etc/exim4/spam-blocks.conf
+ touch /etc/exim4/white-blocks.conf
+
+ if [ "$spamd" = 'yes' ]; then
+ sed -i "s/#SPAM/SPAM/g" /etc/exim4/exim4.conf.template
+ fi
+ if [ "$clamd" = 'yes' ]; then
+ sed -i "s/#CLAMD/CLAMD/g" /etc/exim4/exim4.conf.template
+ fi
+
+ chmod 640 /etc/exim4/exim4.conf.template
+ rm -rf /etc/exim4/domains
+ mkdir -p /etc/exim4/domains
+
+ rm -f /etc/alternatives/mta
+ ln -s /usr/sbin/exim4 /etc/alternatives/mta
+ update-rc.d -f sendmail remove > /dev/null 2>&1
+ service sendmail stop > /dev/null 2>&1
+ update-rc.d -f postfix remove > /dev/null 2>&1
+ service postfix stop > /dev/null 2>&1
+
+ update-rc.d exim4 defaults
+ service exim4 start
+ check_result $? "exim4 start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure Dovecot #
+#----------------------------------------------------------#
+
+if [ "$dovecot" = 'yes' ]; then
+ gpasswd -a dovecot mail
+ wget $vestacp/dovecot.tar.gz -O /etc/dovecot.tar.gz
+ cd /etc
+ rm -rf dovecot dovecot.conf
+ tar -xzf dovecot.tar.gz
+ rm -f dovecot.tar.gz
+ chown -R root:root /etc/dovecot*
+ update-rc.d dovecot defaults
+ service dovecot start
+ check_result $? "dovecot start failed"
+fi
+
+
+#----------------------------------------------------------#
+# Configure ClamAV #
+#----------------------------------------------------------#
+
+if [ "$clamd" = 'yes' ]; then
gpasswd -a clamav mail
gpasswd -a clamav Debian-exim
+ wget $vestacp/clamav/clamd.conf -O /etc/clamav/clamd.conf
/usr/bin/freshclam
update-rc.d clamav-daemon defaults
- service clamav-daemon stop > /dev/null 2>&1
service clamav-daemon start
- if [ "$?" -ne 0 ]; then
- echo "Error: clamav start failed"
- exit 1
- fi
+ check_result $? "clamav-daeom start failed"
fi
-# SpamAssassin configuration
-if [ "$srv_type" = 'medium' ] || [ "$srv_type" = 'large' ]; then
+
+#----------------------------------------------------------#
+# Configure SpamAssassin #
+#----------------------------------------------------------#
+
+if [ "$spamd" = 'yes' ]; then
update-rc.d spamassassin defaults
sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
- service spamassassin stop > /dev/null 2>&1
service spamassassin start
- if [ "$?" -ne 0 ]; then
- echo "Error: spamassassin start failed"
- exit 1
- fi
+ check_result $? "spamassassin start failed"
fi
-# Fail2ban configuration
-if [ -z "$disable_fail2ban" ]; then
+
+#----------------------------------------------------------#
+# Configure RoundCube #
+#----------------------------------------------------------#
+
+if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
+ if [ "$apache" = 'yes' ]; then
+ wget $vestacp/roundcube/apache.conf -O /etc/roundcube/apache.conf
+ ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
+ fi
+ wget $vestacp/roundcube/main.inc.php -O /etc/roundcube/main.inc.php
+ wget $vestacp/roundcube/db.inc.php -O /etc/roundcube/db.inc.php
+ wget $vestacp/roundcube/vesta.php -O \
+ /usr/share/roundcube/plugins/password/drivers/vesta.php
+ wget $vestacp/roundcube/config.inc.php -O \
+ /etc/roundcube/plugins/password/config.inc.php
+ r="$(gen_pass)"
+ mysql -e "CREATE DATABASE roundcube"
+ mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
+ sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
+ mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
+ php5enmod mcrypt 2>/dev/null
+ service apache2 restart
+fi
+
+
+#----------------------------------------------------------#
+# Configure Fail2Ban #
+#----------------------------------------------------------#
+
+if [ "$fail2ban" = 'yes' ]; then
cd /etc
- wget $CHOST/$VERSION/fail2ban.tar.gz -O fail2ban.tar.gz
+ wget $vestacp/fail2ban.tar.gz -O fail2ban.tar.gz
tar -xzf fail2ban.tar.gz
rm -f fail2ban.tar.gz
- chkconfig fail2ban on
+ if [ "$dovecot" = 'no' ]; then
+ fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
+ fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+ sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
+ fi
+ if [ "$exim" = 'no' ]; then
+ fline=$(cat /etc/fail2ban/jail.local |grep -n exim-iptables -A 2)
+ fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+ sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
+ fi
+ update-rc.d fail2ban defaults
service fail2ban start
-else
- sed -i "s/fail2ban//" $VESTA/conf/vestac.conf
+ check_result $? "fail2ban start failed"
fi
-# php configuration
-sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php5/apache2/php.ini
-sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php5/cli/php.ini
-if [ "$codename" = 'saucy' ] || [ "$codename" = 'trusty' ]; then
- ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
- php5enmod mcrypt
- service apache2 restart
-fi
-# phpMyAdmin configuration
-wget $CHOST/$VERSION/apache2-pma.conf -O /etc/phpmyadmin/apache.conf
-wget $CHOST/$VERSION/pma.conf -O /etc/phpmyadmin/config.inc.php
-ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
-mv -f /etc/phpmyadmin/config-db.php /etc/phpmyadmin/config-db.php_
-chmod 777 /var/lib/phpmyadmin/tmp
+#----------------------------------------------------------#
+# Configure Admin User #
+#----------------------------------------------------------#
-# Roundcube configuration
-wget $CHOST/$VERSION/apache2-webmail.conf -O /etc/roundcube/apache.conf
-wget $CHOST/$VERSION/roundcube-main.conf -O /etc/roundcube/main.inc.php
-wget $CHOST/$VERSION/roundcube-db.conf -O /etc/roundcube/db.inc.php
-wget $CHOST/$VERSION/roundcube-driver.php -O \
- /usr/share/roundcube/plugins/password/drivers/vesta.php
-wget $CHOST/$VERSION/roundcube-pw.conf -O \
- /etc/roundcube/plugins/password/config.inc.php
-r="$(gen_pass)"
-mysql -e "DROP DATABASE roundcube" > /dev/null 2>&1
-mysql -e "CREATE DATABASE roundcube"
-mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
-sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
-mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
-if [ "$codename" = 'saucy' ] || [ "$codename" = 'trusty' ]; then
- wget $CHOST/$VERSION/roundcube-driver-new.php -O \
- /usr/share/roundcube/plugins/password/drivers/vesta.php
- ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/
- service apache2 restart
-fi
-mkdir -p /var/log/roundcube/error
-chmod -R 777 /var/log/roundcube
-
-# Deleting old admin user account if exists
+# Deleting old admin user
if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
chattr -i /home/admin/conf > /dev/null 2>&1
- userdel -f admin
- chattr -i /home/admin/conf
- mv -f /home/admin $vst_backups/home/
- rm -f /tmp/sess_*
+ userdel -f admin >/dev/null 2>&1
+ chattr -i /home/admin/conf >/dev/null 2>&1
+ mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
+ rm -f /tmp/sess_* >/dev/null 2>&1
fi
-if [ ! -z "$(grep ^admin: /etc/group)" ]; then
+if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
groupdel admin > /dev/null 2>&1
fi
-# Generating admin password if it wasn't set
-if [ -z "$vpass" ]; then
- vpass=$(gen_pass)
-fi
-
-# Adding admin account
+# Adding vesta account
$VESTA/bin/v-add-user admin $vpass $email default System Administrator
-if [ $? -ne 0 ]; then
- echo "Error: can't create admin user"
- exit 1
-fi
+check_result $? "can't create admin user"
$VESTA/bin/v-change-user-shell admin bash
-$VESTA/bin/v-change-user-language admin en
-
-# Configure mysql host
-$VESTA/bin/v-add-database-host mysql localhost root $mpass
-$VESTA/bin/v-add-database admin default default $(gen_pass) mysql
+$VESTA/bin/v-change-user-language admin $lang
# Configuring system ips
$VESTA/bin/v-update-sys-ip
-# Firewall configuartion
-cd $VESTA/data
-wget $CHOST/$VERSION/firewall.tar.gz -O firewall.tar.gz
-tar -xzf firewall.tar.gz
-rm -f firewall.tar.gz
-if [ "$disable_iptables" = 'yes' ]; then
- sed -i "s/iptables//" $VESTA/conf/vesta.conf
-else
- /usr/local/vesta/bin/v-update-firewall
-fi
-
# Get main ip
-main_ip=$(ifconfig |grep 'inet addr:' |grep -v 127.0.0.1 |head -n1 | \
- cut -f2 -d: | cut -f1 -d ' ')
+ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
-# Get remote ip
-vst_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
-if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then
- # Set NAT association
- $VESTA/bin/v-change-sys-ip-nat $main_ip $vst_ip
+# Get public ip
+pub_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
+if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
+ $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
fi
-if [ -z "$vst_ip" ]; then
- vst_ip=$main_ip
+if [ -z "$pub_ip" ]; then
+ ip=$main_ip
fi
-# Add default web domain
-$VESTA/bin/v-add-web-domain admin default.domain $vst_ip
+# Firewall configuration
+if [ "$iptables" = 'yes' ]; then
+ $VESTA/bin/v-update-firewall
+fi
-# Add default dns domain
-$VESTA/bin/v-add-dns-domain admin default.domain $vst_ip
+# Configuring mysql host
+if [ "$mysql" = 'yes' ]; then
+ $VESTA/bin/v-add-database-host mysql localhost root $vpass
+ $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
+fi
-# Add default mail domain
-$VESTA/bin/v-add-mail-domain admin default.domain
+# Configuring pgsql host
+if [ "$postgresql" = 'yes' ]; then
+ $VESTA/bin/v-add-database-host pgsql localhost postgres $vpass
+ $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
+fi
-# Configuring cron jobs
+# Adding default domain
+$VESTA/bin/v-add-domain admin $servername
+check_result $? "can't create $servername domain"
+
+# Adding cron jobs
command='sudo /usr/local/vesta/bin/v-update-sys-queue disk'
$VESTA/bin/v-add-cron-job 'admin' '15' '02' '*' '*' '*' "$command"
command='sudo /usr/local/vesta/bin/v-update-sys-queue traffic'
@@ -854,35 +1150,45 @@ command='sudo /usr/local/vesta/bin/v-update-user-stats'
$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command"
command='sudo /usr/local/vesta/bin/v-update-sys-rrd'
$VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
+service cron restart
# Building inititall rrd images
$VESTA/bin/v-update-sys-rrd
-# Enable file system quota
+# Enabling file system quota
if [ "$quota" = 'yes' ]; then
$VESTA/bin/v-add-sys-quota
fi
-# Start system service
+# Starting vesta service
update-rc.d vesta defaults
-service vesta stop > /dev/null 2>&1
service vesta start
-if [ "$?" -ne 0 ]; then
- echo "Error: vesta start failed"
- exit 1
+check_result $? "vesta start failed"
+
+# Adding notifications
+$VESTA/upd/add_notifications.sh
+
+
+#----------------------------------------------------------#
+# Vesta Access Info #
+#----------------------------------------------------------#
+
+# Sending install notification to vestacp.com
+wget vestacp.com/notify/?$codename -O /dev/null -q
+
+# Comparing hostname and ip
+host_ip=$(host $servername| head -n 1 | awk '{print $NF}')
+if [ "$host_ip" = "$ip" ]; then
+ ip="$servername"
fi
-# Send notification to vestacp.com
-wget vestacp.com/notify/?$codename -O /dev/null
-
-# Send notification to admin email
+# Sending notification to admin email
echo -e "Congratulations, you have just successfully installed \
-the Vesta Control Panel
+Vesta Control Panel
-You can login in Vesta with following credentials:
+ https://$ip:8083
username: admin
password: $vpass
- https://$vst_ip:8083
We hope that you enjoy your installation of Vesta. Please \
feel free to contact us anytime if you have any questions.
@@ -895,12 +1201,10 @@ vestacp.com team
send_mail="$VESTA/web/inc/mail-wrapper.php"
cat $tmpfile | $send_mail -s "Vesta Control Panel" $email
-rm -f $tmpfile
# Congrats
echo '======================================================='
echo
-echo
echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_| '
echo ' _| _| _| _| _| _| _| '
echo ' _| _| _|_|_| _|_| _| _|_|_|_| '
@@ -908,20 +1212,7 @@ echo ' _| _| _| _| _| _| _| '
echo ' _| _|_|_|_| _|_|_| _| _| _| '
echo
echo
-echo '-------------------------------'
-echo " https://$vst_ip:8083"
-echo ' username: admin'
-echo " password: $vpass"
-echo '-------------------------------'
-echo
-echo
-echo 'Congratulations,'
-echo 'you have successfully installed Vesta Control Panel.'
-echo
-echo
+cat $tmpfile
+rm -f $tmpfile
-# Tricky way to get new PATH variable
-cd
-bash
-
-#EOF
+# EOF
diff --git a/install/vst-install.sh b/install/vst-install.sh
old mode 100644
new mode 100755
index 9c064ab01..9e05feea1
--- a/install/vst-install.sh
+++ b/install/vst-install.sh
@@ -5,10 +5,10 @@
#
# Currently Supported Operating Systems:
#
-# RHEL 5, RHEL 6
-# CentOS 5, CentOS 6
-# Debian 7
-# Ubuntu LTS, Ubuntu 13.04, Ubuntu 13.10
+# RHEL 5, 6, 7
+# CentOS 5, 6, 7
+# Debian 7, 8
+# Ubuntu 12.04 - 15.04
#
# Am I root?
diff --git a/src/deb/nginx/control b/src/deb/nginx/control
index c9aa82857..708e501f9 100644
--- a/src/deb/nginx/control
+++ b/src/deb/nginx/control
@@ -1,7 +1,7 @@
Source: vesta-nginx
Package: vesta-nginx
Priority: optional
-Version: 0.9.7-3
+Version: 0.9.8-15
Section: admin
Maintainer: Serghey Rodin
Homepage: http://vestacp.com
diff --git a/src/deb/php/control b/src/deb/php/control
index 31260d5ff..6a1094e61 100644
--- a/src/deb/php/control
+++ b/src/deb/php/control
@@ -1,7 +1,7 @@
Source: vesta-php
Package: vesta-php
Priority: optional
-Version: 0.9.7-3
+Version: 0.9.8-15
Section: admin
Maintainer: Serghey Rodin
Homepage: http://vestacp.com
diff --git a/src/deb/vesta/control b/src/deb/vesta/control
index 795d64dc7..d33f84677 100644
--- a/src/deb/vesta/control
+++ b/src/deb/vesta/control
@@ -1,7 +1,7 @@
Source: vesta
Package: vesta
Priority: optional
-Version: 0.9.8-14
+Version: 0.9.8-15
Section: admin
Maintainer: Serghey Rodin
Homepage: http://vestacp.com
diff --git a/src/deb/vesta/postinst b/src/deb/vesta/postinst
index 5e102c55d..e600138cc 100755
--- a/src/deb/vesta/postinst
+++ b/src/deb/vesta/postinst
@@ -1,34 +1,13 @@
#!/bin/bash
-# Run fwd_only trigger
-if [ -x "/usr/local/vesta/upd/add_fwd_only.sh" ]; then
- /usr/local/vesta/upd/add_fwd_only.sh
-fi
-
-# Run exim permission fixer
-if [ -x "/usr/local/vesta/upd/fix_exim_permissions.sh" ]; then
- /usr/local/vesta/upd/fix_exim_permissions.sh
-fi
-
-# Run vesta permission fixer
-if [ -x "/usr/local/vesta/upd/fix_vesta_ssl_permissions.sh" ]; then
- /usr/local/vesta/upd/fix_vesta_ssl_permissions.sh
-fi
-
-# Run MySQL autostart fixed
-if [ -x "/usr/local/vesta/upd/fix_mysql_startup.sh" ]; then
- /usr/local/vesta/upd/fix_mysql_startup.sh
-fi
-
# Run SUDO trigger
if [ -x "/usr/local/vesta/upd/add_sudo.sh" ]; then
/usr/local/vesta/upd/add_sudo.sh
fi
-# Run Firewall trigger
-if [ -x "/usr/local/vesta/upd/add_firewall.sh" ]; then
- /usr/local/vesta/upd/add_firewall.sh
+# Run Notification trigger
+if [ -x "/usr/local/vesta/upd/add_notifications.sh" ]; then
+ /usr/local/vesta/upd/add_notifications.sh
fi
-
exit 0
diff --git a/src/rpm/conf/nginx.conf b/src/rpm/conf/nginx.conf
index bf3618969..d055bd694 100644
--- a/src/rpm/conf/nginx.conf
+++ b/src/rpm/conf/nginx.conf
@@ -37,7 +37,8 @@ http {
# SSL PCI Compliance
- ssl_ciphers RC4:HIGH:!aNULL:!MD5:!kEDH;
+ ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
+ ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_session_cache shared:SSL:10m;
ssl_prefer_server_ciphers on;
@@ -53,7 +54,7 @@ http {
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/plain text/css text/javascript
- application/x-javascript;
+ application/x-javascript application/javascript;
gzip_proxied any;
@@ -82,7 +83,7 @@ http {
root /usr/local/vesta/web;
charset utf-8;
- // Fix error "The plain HTTP request was sent to HTTPS port"
+ # Fix error "The plain HTTP request was sent to HTTPS port"
error_page 497 https://$host:$server_port$request_uri;
ssl on;
diff --git a/src/rpm/conf/php-fpm.conf b/src/rpm/conf/php-fpm.conf
index deb95582e..7283dfdd2 100755
--- a/src/rpm/conf/php-fpm.conf
+++ b/src/rpm/conf/php-fpm.conf
@@ -490,8 +490,11 @@ env[LANG] = en_US.UTF-8
; Default Value: nothing is defined by default except the values in php.ini and
; specified at startup with the -d argument
-;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
-;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
-;php_admin_flag[log_errors] = on
-;php_admin_value[memory_limit] = 32M
+php_flag[display_errors] = off
+php_admin_value[error_log] = /usr/local/vesta/log/fpm-php.log
+php_admin_flag[log_errors] = on
+php_admin_value[memory_limit] = 256M
+php_admin_value[post_max_size] = 512M
+php_admin_value[upload_max_filesize] = 512M
+php_admin_value[max_execution_time] = 600
+php_admin_value[max_input_time] = 600
diff --git a/src/rpm/specs/vesta-nginx.spec b/src/rpm/specs/vesta-nginx.spec
index 944c399b7..9741d75eb 100644
--- a/src/rpm/specs/vesta-nginx.spec
+++ b/src/rpm/specs/vesta-nginx.spec
@@ -1,6 +1,6 @@
Name: vesta-nginx
Version: 0.9.8
-Release: 3
+Release: 15
Summary: Vesta Control Panel
Group: System Environment/Base
License: BSD-like
diff --git a/src/rpm/specs/vesta-php.spec b/src/rpm/specs/vesta-php.spec
index 2d0213505..5dcfd28b4 100644
--- a/src/rpm/specs/vesta-php.spec
+++ b/src/rpm/specs/vesta-php.spec
@@ -1,6 +1,6 @@
Name: vesta-php
Version: 0.9.8
-Release: 2
+Release: 15
Summary: Vesta Control Panel
Group: System Environment/Base
License: GPL
diff --git a/src/rpm/specs/vesta.spec b/src/rpm/specs/vesta.spec
index 62c7ec50f..38eae0b77 100644
--- a/src/rpm/specs/vesta.spec
+++ b/src/rpm/specs/vesta.spec
@@ -1,6 +1,6 @@
Name: vesta
Version: 0.9.8
-Release: 14
+Release: 15
Summary: Vesta Control Panel
Group: System Environment/Base
License: GPL
@@ -30,23 +30,11 @@ rm -rf %{buildroot}
%post
if [ $1 -ge 2 ]; then
- if [ -e /usr/local/vesta/upd/convert_templates.sh ]; then
- /usr/local/vesta/upd/convert_templates.sh
- fi
- if [ -e /usr/local/vesta/upd/convert_webip.sh ]; then
- /usr/local/vesta/upd/convert_webip.sh
- fi
- if [ -e /usr/local/vesta/upd/add_fwd_only.sh ]; then
- /usr/local/vesta/upd/add_fwd_only.sh
- fi
- if [ -e /usr/local/vesta/upd/fix_vesta_ssl_permissions.sh ]; then
- /usr/local/vesta/upd/fix_vesta_ssl_permissions.sh
- fi
if [ -e /usr/local/vesta/upd/add_sudo.sh ]; then
/usr/local/vesta/upd/add_sudo.sh
fi
- if [ -e /usr/local/vesta/upd/add_firewall.sh ]; then
- /usr/local/vesta/upd/add_firewall.sh
+ if [ -e /usr/local/vesta/upd/add_notifications.sh ]; then
+ /usr/local/vesta/upd/add_notifications.sh
fi
fi
%files
@@ -62,6 +50,32 @@ fi
%config(noreplace) %{_vestadir}/web/css/uploadify.css
%changelog
+* Fri Nov 06 2015 Serghey Rodin - 0.9.8-15
+- File Manager (commercial plugin)
+- SFTP Chroot (commercial plugin)
+- Monitoring Tools: top/free/df/server-status/mysql-status/etc
+- New installer
+- Improved PHP-FPM support
+- UI: Notification center
+- UI: Starred objects
+- UI: Object sorting
+- UI: HotKeys suport
+- UI: Mail account settings JS hint
+- UI: Autofocus on first input when adding/editing
+- UI: Up to 8 nameserver dns support
+- Core: Improved system logger, domain adding api and backup routine
+- Japanese language support. Thanks to Flatta
+- Polish language support. Thanks to MarPiRK
+- Vietnamese language support. Thanks to Nguyen Ngoc Phuong
+- Security Fix: Command Injection and XSS Thanks to Global IT
+- BugFix: DNS Cluster SOA synchronization
+- BugFix: Bulk Operation
+- BugFix: Backup exclusions
+- BugFix: Domain validation
+- BugFix: FTP user name prefix
+- BugFix: Fail2Ban manager
+- BugFix: Service manager
+
* Wed Jun 03 2015 Serghey Rodin - 0.9.8-13
- New UI
- PHP-FPM support
diff --git a/upd/add_fwd_only.sh b/upd/add_fwd_only.sh
index dccf17597..80cc3a58a 100755
--- a/upd/add_fwd_only.sh
+++ b/upd/add_fwd_only.sh
@@ -41,6 +41,6 @@ if [ -e "/etc/exim4/exim4.conf.template" ]; then
fi
# Restart mail server
-/usr/local/vesta/bin/v-restart-mail
+/usr/local/vesta/bin/v-restart-mail > /dev/null 2>&1
exit
diff --git a/upd/add_notifications.sh b/upd/add_notifications.sh
new file mode 100755
index 000000000..ca2dc49c4
--- /dev/null
+++ b/upd/add_notifications.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Add notifications
+
+if [ ! -e '/usr/local/vesta/data/users/admin/notifications.conf' ]; then
+ /usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, coppy, edit, view, and retrieve all of your web domain files using fully featured File Manager . Plugin is avaiable for purchase ." 'filemanager'
+ /usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want have SFTP accounts that will be used only to transfer files (and not to ssh), you can purchase and enable SFTP Chroot . "
+ /usr/local/vesta/bin/v-add-user-notification admin "Starred Objects" "Use stars to easily mark certain object as important or to indicate that you need to do something about it later." 'starred'
+ /usr/local/vesta/bin/v-add-user-notification admin "Monitoring Tools" "This module answers common performance, health, usage and monitoring questions. Server -> Show CPU, Memory, Disk usage "
+ /usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-15" "New version is cool. A lot of work has been put in the user experience and stability. Check out release notes "
+fi
diff --git a/upd/add_sudo.sh b/upd/add_sudo.sh
index dfe5ff2b8..d65ee9d7c 100755
--- a/upd/add_sudo.sh
+++ b/upd/add_sudo.sh
@@ -1,10 +1,19 @@
#!/bin/bash
+# New sudoers format
-if [ ! -e /etc/sudoers.d/admin ]; then
- echo "# Created by vesta update-trigger" > /etc/sudoers.d/admin
- echo "# $(date)" >> /etc/sudoers.d/admin
- echo "admin ALL=(ALL) ALL" >> /etc/sudoers.d/admin
- echo "admin ALL=NOPASSWD:/usr/local/vesta/bin/*" >> /etc/sudoers.d/admin
+if [ ! -e '/etc/sudoers.d/admin' ]; then
+ if [ ! -d '/etc/sudoers.d' ]; then
+ mkidr /etc/sudoers.d
+ chmod 750 /etc/sudoers.d
+ fi
+ echo '# Created by vesta update-trigger' > /etc/sudoers.d/admin
+ echo 'Defaults env_keep="VESTA"' >> /etc/sudoers.d/admin
+ echo 'Defaults:admin !syslog' >> /etc/sudoers.d/admin
+ echo 'Defaults:admin !requiretty' >> /etc/sudoers.d/admin
+ echo 'Defaults:root !requiretty' >> /etc/sudoers.d/admin
+ echo '' >> /etc/sudoers.d/admin
+ echo 'admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin
+ echo 'admin ALL=NOPASSWD:/usr/local/vesta/bin/*' >> /etc/sudoers.d/admin
chmod 440 /etc/sudoers.d/admin
if [ -z "$(grep /etc/sudoers.d /etc/sudoers)" ]; then
diff --git a/upd/fix_vesta_ssl_permissions.sh b/upd/fix_vesta_ssl_permissions.sh
index 5137631f5..931a1195d 100755
--- a/upd/fix_vesta_ssl_permissions.sh
+++ b/upd/fix_vesta_ssl_permissions.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-chown root:mail /usr/local/vesta/ssl/*
-chmod 660 /usr/local/vesta/ssl/*
+chown root:mail /usr/local/vesta/ssl/* >/dev/null 2>&1
+chmod 660 /usr/local/vesta/ssl/* >/dev/null 2>&1
diff --git a/web/add/dns/index.php b/web/add/dns/index.php
index ee41bdb52..629e2ec57 100644
--- a/web/add/dns/index.php
+++ b/web/add/dns/index.php
@@ -39,14 +39,19 @@ if (!empty($_POST['ok'])) {
if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']);
if (!empty($_POST['v_ns3'])) $v_ns3 = escapeshellarg($_POST['v_ns3']);
if (!empty($_POST['v_ns4'])) $v_ns4 = escapeshellarg($_POST['v_ns4']);
+ if (!empty($_POST['v_ns5'])) $v_ns5 = escapeshellarg($_POST['v_ns5']);
+ if (!empty($_POST['v_ns6'])) $v_ns6 = escapeshellarg($_POST['v_ns6']);
+ if (!empty($_POST['v_ns7'])) $v_ns7 = escapeshellarg($_POST['v_ns7']);
+ if (!empty($_POST['v_ns8'])) $v_ns8 = escapeshellarg($_POST['v_ns8']);
// Add dns domain
if (empty($_SESSION['error_msg'])) {
- exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$v_ns4." no", $output, $return_var);
+ exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$v_ns4." ".$v_ns5." ".$v_ns6." ".$v_ns7." ".$v_ns8." no", $output, $return_var);
check_return_code($return_var,$output);
unset($output);
}
+
// Set expiriation date
if (empty($_SESSION['error_msg'])) {
if ((!empty($_POST['v_exp'])) && ($_POST['v_exp'] != date('Y-m-d', strtotime('+1 year')))) {
@@ -139,6 +144,16 @@ include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
// Panel
top_panel($user,$TAB);
+$v_ns1 = str_replace("'", "", $v_ns1);
+$v_ns2 = str_replace("'", "", $v_ns2);
+$v_ns3 = str_replace("'", "", $v_ns3);
+$v_ns4 = str_replace("'", "", $v_ns4);
+$v_ns5 = str_replace("'", "", $v_ns5);
+$v_ns6 = str_replace("'", "", $v_ns6);
+$v_ns7 = str_replace("'", "", $v_ns7);
+$v_ns8 = str_replace("'", "", $v_ns8);
+
+
// Display body for dns domain
if (empty($_GET['domain'])) {
if (empty($v_ttl)) $v_ttl = 14400;
@@ -146,10 +161,14 @@ if (empty($_GET['domain'])) {
if (empty($v_ns1)) {
exec (VESTA_CMD."v-list-user-ns ".$user." json", $output, $return_var);
$nameservers = json_decode(implode('', $output), true);
- $v_ns1 = $nameservers[0];
- $v_ns2 = $nameservers[1];
- $v_ns3 = $nameservers[2];
- $v_ns4 = $nameservers[3];
+ $v_ns1 = str_replace("'", "", $nameservers[0]);
+ $v_ns2 = str_replace("'", "", $nameservers[1]);
+ $v_ns3 = str_replace("'", "", $nameservers[2]);
+ $v_ns4 = str_replace("'", "", $nameservers[3]);
+ $v_ns5 = str_replace("'", "", $nameservers[4]);
+ $v_ns6 = str_replace("'", "", $nameservers[5]);
+ $v_ns7 = str_replace("'", "", $nameservers[6]);
+ $v_ns8 = str_replace("'", "", $nameservers[7]);
unset($output);
}
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_dns.html');
diff --git a/web/add/favorite/index.php b/web/add/favorite/index.php
new file mode 100644
index 000000000..e9f2e828d
--- /dev/null
+++ b/web/add/favorite/index.php
@@ -0,0 +1,23 @@
+
+
+error_reporting(NULL);
+session_start();
+
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+// Check token
+// if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
+// header('location: /login/');
+// exit();
+// }
+
+ // Protect input
+ $v_section = escapeshellarg($_REQUEST['v_section']);
+ $v_unit_id = escapeshellarg($_REQUEST['v_unit_id']);
+
+ $_SESSION['favourites'][strtoupper($_REQUEST['v_section'])][$_REQUEST['v_unit_id']] = 1;
+
+ exec (VESTA_CMD."v-add-user-favourites ".$_SESSION['user']." ".$v_section." ".$v_unit_id, $output, $return_var);
+// check_return_code($return_var,$output);
+?>
\ No newline at end of file
diff --git a/web/add/firewall/index.php b/web/add/firewall/index.php
index 917da0671..caae650ce 100644
--- a/web/add/firewall/index.php
+++ b/web/add/firewall/index.php
@@ -26,7 +26,7 @@ if (!empty($_POST['ok'])) {
// Check empty fields
if (empty($_POST['v_action'])) $errors[] = __('action');
if (empty($_POST['v_protocol'])) $errors[] = __('protocol');
- if (empty($_POST['v_port'])) $errors[] = __('port');
+ if (!isset($_POST['v_port'])) $errors[] = __('port');
if (empty($_POST['v_ip'])) $errors[] = __('ip address');
if (!empty($errors[0])) {
foreach ($errors as $i => $error) {
diff --git a/web/add/package/index.php b/web/add/package/index.php
index b38b7b23a..f620b4711 100644
--- a/web/add/package/index.php
+++ b/web/add/package/index.php
@@ -79,9 +79,17 @@ if (!empty($_POST['ok'])) {
$v_ns2 = trim($_POST['v_ns2'], '.');
$v_ns3 = trim($_POST['v_ns3'], '.');
$v_ns4 = trim($_POST['v_ns4'], '.');
+ $v_ns5 = trim($_POST['v_ns5'], '.');
+ $v_ns6 = trim($_POST['v_ns6'], '.');
+ $v_ns7 = trim($_POST['v_ns7'], '.');
+ $v_ns8 = trim($_POST['v_ns8'], '.');
$v_ns = $v_ns1.",".$v_ns2;
if (!empty($v_ns3)) $v_ns .= ",".$v_ns3;
if (!empty($v_ns4)) $v_ns .= ",".$v_ns4;
+ if (!empty($v_ns5)) $v_ns .= ",".$v_ns5;
+ if (!empty($v_ns6)) $v_ns .= ",".$v_ns6;
+ if (!empty($v_ns7)) $v_ns .= ",".$v_ns7;
+ if (!empty($v_ns8)) $v_ns .= ",".$v_ns8;
$v_ns = escapeshellarg($v_ns);
$v_time = escapeshellarg(date('H:i:s'));
$v_date = escapeshellarg(date('Y-m-d'));
diff --git a/web/add/web/index.php b/web/add/web/index.php
index 2606c0742..0be71f635 100644
--- a/web/add/web/index.php
+++ b/web/add/web/index.php
@@ -40,34 +40,39 @@ if (!empty($_POST['ok'])) {
}
}
- // Default proxy extention list
- $v_proxy_ext = 'jpeg, jpg, png, gif, bmp, ico, svg, tif, tiff, css, js, htm, html, ttf, ';
- $v_proxy_ext .= 'otf, webp, woff, txt, csv, rtf, doc, docx, xls, xlsx, ppt, pptx, odf, ';
- $v_proxy_ext .= 'odp, ods, odt, pdf, psd, ai, eot, eps, ps, zip, tar, tgz, gz, rar, ';
- $v_proxy_ext .= 'bz2, 7z, aac, m4a, mp3, mp4, ogg, wav, wma, 3gp, avi, flv, m4v, mkv, ';
- $v_proxy_ext .= 'mov, mp4, mpeg, mpg, wmv, exe, iso, dmg, swf';
-
- // Set advanced option checkmark
- if (empty($_POST['v_proxy'])) $v_adv = 'yes';
- if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
- if ($_POST['v_proxy_ext'] != $v_proxy_ext) $v_adv = 'yes';
-
- // Set domain name to lowercase and remove www prefix
+ // Set domain to lowercase and remove www prefix
$v_domain = preg_replace("/^www\./i", "", $_POST['v_domain']);
$v_domain = escapeshellarg($v_domain);
$v_domain = strtolower($v_domain);
- // Prepare domain values
+ // Define domain ip address
$v_ip = escapeshellarg($_POST['v_ip']);
- if ((!empty($_POST['v_aliases'])) && ($_POST['v_aliases'] != 'www.'.$_POST['v_domain'])) $v_adv = 'yes';
- if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
- if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
- if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
- if (!empty($v_domain)) $v_ftp_user_prepath .= $v_domain;
- if (empty($_POST['v_dns'])) $v_dns = 'off';
- if (empty($_POST['v_mail'])) $v_mail = 'off';
- if (empty($_POST['v_proxy'])) $v_proxy = 'off';
+
+ // Define domain aliases
$v_aliases = $_POST['v_aliases'];
+ $aliases = preg_replace("/\n/", ",", $v_aliases);
+ $aliases = preg_replace("/\r/", ",", $aliases);
+ $aliases = preg_replace("/\t/", ",", $aliases);
+ $aliases = preg_replace("/ /", ",", $aliases);
+ $aliases_arr = explode(",", $aliases);
+ $aliases_arr = array_unique($aliases_arr);
+ $aliases_arr = array_filter($aliases_arr);
+ $aliases = implode(",",$aliases_arr);
+ $aliases = escapeshellarg($aliases);
+
+ // Define proxy extentions
+ $v_proxy_ext = $_POST['v_proxy_ext'];
+ $proxy_ext = preg_replace("/\n/", ",", $v_proxy_ext);
+ $proxy_ext = preg_replace("/\r/", ",", $proxy_ext);
+ $proxy_ext = preg_replace("/\t/", ",", $proxy_ext);
+ $proxy_ext = preg_replace("/ /", ",", $proxy_ext);
+ $proxy_ext_arr = explode(",", $proxy_ext);
+ $proxy_ext_arr = array_unique($proxy_ext_arr);
+ $proxy_ext_arr = array_filter($proxy_ext_arr);
+ $proxy_ext = implode(",",$proxy_ext_arr);
+ $proxy_ext = escapeshellarg($proxy_ext);
+
+ // Define other options
$v_elog = $_POST['v_elog'];
$v_ssl = $_POST['v_ssl'];
$v_ssl_crt = $_POST['v_ssl_crt'];
@@ -77,20 +82,29 @@ if (!empty($_POST['ok'])) {
$v_stats = escapeshellarg($_POST['v_stats']);
$v_stats_user = $data[$v_domain]['STATS_USER'];
$v_stats_password = $data[$v_domain]['STATS_PASSWORD'];
- $v_proxy_ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
- $v_proxy_ext = preg_replace("/,/", " ", $v_proxy_ext);
- $v_proxy_ext = preg_replace('/\s+/', ' ',$v_proxy_ext);
- $v_proxy_ext = trim($v_proxy_ext);
- $v_proxy_ext = str_replace(' ', ", ", $v_proxy_ext);
$v_ftp = $_POST['v_ftp'];
$v_ftp_user = $_POST['v_ftp_user'];
$v_ftp_password = $_POST['v_ftp_password'];
$v_ftp_email = $_POST['v_ftp_email'];
+ if (!empty($v_domain)) $v_ftp_user_prepath .= $v_domain;
+ // Set advanced option checkmark
+ if (empty($_POST['v_proxy'])) $v_adv = 'yes';
+ if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
+ if ($_POST['v_proxy_ext'] != $v_proxy_ext) $v_adv = 'yes';
+ if ((!empty($_POST['v_aliases'])) && ($_POST['v_aliases'] != 'www.'.$_POST['v_domain'])) $v_adv = 'yes';
+ if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
+ if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
+ if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
+
+ // Check advanced features
+ if (empty($_POST['v_dns'])) $v_dns = 'off';
+ if (empty($_POST['v_mail'])) $v_mail = 'off';
+ if (empty($_POST['v_proxy'])) $v_proxy = 'off';
// Add web domain
if (empty($_SESSION['error_msg'])) {
- exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." 'no'", $output, $return_var);
+ exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." 'no' ".$aliases." ".$proxy_ext, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
$domain_added = empty($_SESSION['error_msg']);
@@ -103,6 +117,18 @@ if (!empty($_POST['ok'])) {
unset($output);
}
+ // Add DNS for domain aliases
+ if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
+ foreach ($aliases_arr as $alias) {
+ if ($alias != "www.".$_POST['v_domain']) {
+ $alias = escapeshellarg($alias);
+ exec (VESTA_CMD."v-add-dns-on-web-alias ".$user." ".$alias." ".$v_ip." 'no'", $output, $return_var);
+ check_return_code($return_var,$output);
+ unset($output);
+ }
+ }
+ }
+
// Add mail domain
if (($_POST['v_mail'] == 'on') && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-add-mail-domain ".$user." ".$v_domain, $output, $return_var);
@@ -110,47 +136,10 @@ if (!empty($_POST['ok'])) {
unset($output);
}
- // Add domain aliases
- if ((!empty($_POST['v_aliases'])) && (empty($_SESSION['error_msg']))) {
- $valiases = preg_replace("/\n/", " ", $_POST['v_aliases']);
- $valiases = preg_replace("/,/", " ", $valiases);
- $valiases = preg_replace('/\s+/', ' ',$valiases);
- $valiases = trim($valiases);
- $aliases = explode(" ", $valiases);
- foreach ($aliases as $alias) {
- if ($alias == 'www.'.$_POST['v_domain']) {
- $www_alias = 'yes';
- } else {
- $alias = escapeshellarg($alias);
- if (empty($_SESSION['error_msg'])) {
- exec (VESTA_CMD."v-add-web-domain-alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
- check_return_code($return_var,$output);
- unset($output);
- }
- if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
- exec (VESTA_CMD."v-add-dns-on-web-alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
- check_return_code($return_var,$output);
- unset($output);
- }
- }
- }
- }
-
- // Delete www. alias if it wasn't found
- if ((empty($www_alias)) && (empty($_SESSION['error_msg']))) {
- $alias = preg_replace("/^www./i", "", $_POST['v_domain']);
- $alias = 'www.'.$alias;
- $alias = escapeshellarg($alias);
- exec (VESTA_CMD."v-delete-web-domain-alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
- check_return_code($return_var,$output);
- unset($output);
- }
-
- // Add proxy support
- if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
- $ext = str_replace(' ', '', $v_proxy_ext);
+ // Delete proxy support
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'off') && (empty($_SESSION['error_msg']))) {
$ext = escapeshellarg($ext);
- exec (VESTA_CMD."v-add-web-domain-proxy ".$user." ".$v_domain." '' ".$ext." 'no'", $output, $return_var);
+ exec (VESTA_CMD."v-delete-web-domain-proxy ".$user." ".$v_domain." 'no'", $output, $return_var);
check_return_code($return_var,$output);
unset($output);
}
@@ -228,11 +217,11 @@ if (!empty($_POST['ok'])) {
}
// Restart backend server
- if ((!empty($_SESSION['WEB_BACKEND'])) && (empty($_SESSION['error_msg']))) {
- exec (VESTA_CMD."v-restart-web-backend", $output, $return_var);
- check_return_code($return_var,$output);
- unset($output);
- }
+ //if ((!empty($_SESSION['WEB_BACKEND'])) && (empty($_SESSION['error_msg']))) {
+ // exec (VESTA_CMD."v-restart-web-backend", $output, $return_var);
+ // check_return_code($return_var,$output);
+ // unset($output);
+ //}
// Restart proxy server
if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
@@ -283,7 +272,7 @@ if (!empty($_POST['ok'])) {
$fp = fopen($v_ftp_password, "w");
fwrite($fp, $v_ftp_user_data['v_ftp_password']."\n");
fclose($fp);
- exec (VESTA_CMD."v-add-web-domain-ftp ".$user." ".$v_domain." ".$v_ftp_username." ".$v_ftp_password . " " . $v_ftp_path, $output, $return_var);
+ exec (VESTA_CMD."v-add-web-domain-ftp ".$user." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password . " " . $v_ftp_path, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($v_ftp_password);
diff --git a/web/api/index.php b/web/api/index.php
index cfa74ff76..633352d5b 100644
--- a/web/api/index.php
+++ b/web/api/index.php
@@ -31,42 +31,48 @@ if (isset($_POST['user']) || isset($_POST['hash'])) {
echo 'Error: authentication failed';
exit;
}
-
- // Prepare arguments
- if (isset($_POST['cmd'])) $cmd = escapeshellarg($_POST['cmd']);
- if (isset($_POST['arg1'])) $arg1 = escapeshellarg($_POST['arg1']);
- if (isset($_POST['arg2'])) $arg2 = escapeshellarg($_POST['arg2']);
- if (isset($_POST['arg3'])) $arg3 = escapeshellarg($_POST['arg3']);
- if (isset($_POST['arg4'])) $arg4 = escapeshellarg($_POST['arg4']);
- if (isset($_POST['arg5'])) $arg5 = escapeshellarg($_POST['arg5']);
- if (isset($_POST['arg6'])) $arg6 = escapeshellarg($_POST['arg6']);
- if (isset($_POST['arg7'])) $arg7 = escapeshellarg($_POST['arg7']);
- if (isset($_POST['arg8'])) $arg8 = escapeshellarg($_POST['arg8']);
- if (isset($_POST['arg9'])) $arg9 = escapeshellarg($_POST['arg9']);
+
+ // Define the command to use
+ if (isset($_POST['cmd']))
+ {
+ $cmd = escapeshellarg($_POST['cmd']);
+ } else
+ {
+ // If there's no command, just exit.
+ echo 'No command specified.';
+ exit;
+ }
+
+ // Prepare for iteration
+ $args = [];
+ $i = 0;
+
+ // Loop through args until there isn't another.
+ while (true)
+ {
+ $i++;
+ if (!empty($_POST['arg' . $i]))
+ {
+ $args[] = escapeshellarg($_POST['arg' . $i]);
+ continue;
+ }
+ break;
+ }
// Build query
- $cmdquery = VESTA_CMD.$cmd." ";
- if(!empty($arg1)){
- $cmdquery = $cmdquery.$arg1." "; }
- if(!empty($arg2)){
- $cmdquery = $cmdquery.$arg2." "; }
- if(!empty($arg3)){
- $cmdquery = $cmdquery.$arg3." "; }
- if(!empty($arg4)){
- $cmdquery = $cmdquery.$arg4." "; }
- if(!empty($arg5)){
- $cmdquery = $cmdquery.$arg5." "; }
- if(!empty($arg6)){
- $cmdquery = $cmdquery.$arg6." "; }
- if(!empty($arg7)){
- $cmdquery = $cmdquery.$arg7." "; }
- if(!empty($arg8)){
- $cmdquery = $cmdquery.$arg8." "; }
- if(!empty($arg9)){
- $cmdquery = $cmdquery.$arg9; }
+ $cmdquery = VESTA_CMD . $cmd . " " . implode(" ", $args);
- // Run query
- exec ($cmdquery, $output, $return_var);
+ // Check command
+ if ($cmd == "'v-make-tmp-file'") {
+ // Used in DNS Cluster
+ $fp = fopen($_POST['arg2'], 'w');
+ fwrite($fp, $_POST['arg1']."\n");
+ fclose($fp);
+ $return_var = 0;
+ } else {
+ // Run normal cmd query
+ exec ($cmdquery, $output, $return_var);
+ }
if ((!empty($_POST['returncode'])) && ($_POST['returncode'] == 'yes')) {
echo $return_var;
@@ -78,5 +84,3 @@ if (isset($_POST['user']) || isset($_POST['hash'])) {
}
}
}
-
-?>
diff --git a/web/bulk/firewall/banlist/index.php b/web/bulk/firewall/banlist/index.php
index f63e0a068..fe7308a53 100644
--- a/web/bulk/firewall/banlist/index.php
+++ b/web/bulk/firewall/banlist/index.php
@@ -19,13 +19,14 @@ if ($_SESSION['user'] != 'admin') {
exit;
}
-if (!empty($_POST['ipchain'])) {
+$ipchain = $_POST['ipchain'];
+/*if (!empty($_POST['ipchain'])) {
$ipchain = $_POST['ipchain'];
list($ip,$chain) = split(":",$ipchain);
$v_ip = escapeshellarg($ip);
$v_chain = escapeshellarg($chain);
-}
+}*/
$action = $_POST['action'];
@@ -36,6 +37,9 @@ switch ($action) {
}
foreach ($ipchain as $value) {
+ list($ip,$chain) = split(":",$value);
+ $v_ip = escapeshellarg($ip);
+ $v_chain = escapeshellarg($chain);
exec (VESTA_CMD.$cmd." ".$v_ip." ".$v_chain, $output, $return_var);
}
diff --git a/web/bulk/service/index.php b/web/bulk/service/index.php
index 3bcaacb85..70ce660c7 100644
--- a/web/bulk/service/index.php
+++ b/web/bulk/service/index.php
@@ -23,14 +23,14 @@ if ($_SESSION['user'] == 'admin') {
break;
case 'restart': $cmd='v-restart-service';
break;
- default: header("Location: /list/services/"); exit;
+ default: header("Location: /list/server/"); exit;
}
if ((!empty($_POST['system'])) && ($action == 'restart')) {
exec (VESTA_CMD."v-restart-system yes", $output, $return_var);
$_SESSION['error_srv'] = 'The system is going down for reboot NOW!';
unset($output);
- header("Location: /list/services/");
+ header("Location: /list/server/");
exit;
}
@@ -40,4 +40,4 @@ if ($_SESSION['user'] == 'admin') {
}
}
-header("Location: /list/services/");
+header("Location: /list/server/");
diff --git a/web/bulk/web/index.php b/web/bulk/web/index.php
index debeda53f..4a661a1ff 100644
--- a/web/bulk/web/index.php
+++ b/web/bulk/web/index.php
@@ -17,59 +17,31 @@ $action = $_POST['action'];
if ($_SESSION['user'] == 'admin') {
switch ($action) {
- case 'delete': $cmd='v-delete-web-domain';
- $cmd_dns='v-delete-dns-domain';
- $cmd_mail='v-delete-mail-domain';
+ case 'delete': $cmd='v-delete-domain';
break;
- case 'suspend': $cmd='v-suspend-web-domain';
- $cmd_dns='v-suspend-dns-domain';
- $cmd_mail='v-suspend-mail-domain';
+ case 'suspend': $cmd='v-suspend-domain';
break;
- case 'unsuspend': $cmd='v-unsuspend-web-domain';
- $cmd_dns='v-unsuspend-dns-domain';
- $cmd_mail='v-unsuspend-mail-domain';
+ case 'unsuspend': $cmd='v-unsuspend-domain';
break;
default: header("Location: /list/web/"); exit;
}
} else {
switch ($action) {
- case 'delete': $cmd='v-delete-web-domain';
- $cmd_dns='v-delete-dns-domain';
- $cmd_mail='v-delete-mail-domain';
+ case 'delete': $cmd='v-delete-domain';
break;
default: header("Location: /list/web/"); exit;
}
}
foreach ($domain as $value) {
- // WEB
$value = escapeshellarg($value);
exec (VESTA_CMD.$cmd." ".$user." ".$value." no", $output, $return_var);
- $restart_web = 'yes';
-
- // DNS
- if ($return_var == 0) {
- exec (VESTA_CMD."v-list-dns-domain ".$user." ".$value." json", $output, $lreturn_var);
- if ($lreturn_var == 0 ) {
- exec (VESTA_CMD.$cmd_dns." ".$user." ".$value." no", $output, $return_var);
- $restart_dns = 'yes';
- }
- }
-
- // Mail
- if ($return_var == 0) {
- exec (VESTA_CMD."v-list-mail-domain ".$user." ".$value." json", $output, $lreturn_var);
- if ($lreturn_var == 0 ) {
- exec (VESTA_CMD.$cmd_mail." ".$user." ".$value." no", $output, $return_var);
- }
- }
+ $restart='yes';
}
-if (!empty($restart_web)) {
+if (isset($restart)) {
exec (VESTA_CMD."v-restart-web", $output, $return_var);
-}
-
-if (!empty($restart_dns)) {
+ exec (VESTA_CMD."v-restart-proxy", $output, $return_var);
exec (VESTA_CMD."v-restart-dns", $output, $return_var);
}
diff --git a/web/css/file_manager.css b/web/css/file_manager.css
index 4dd374e0f..f6c364710 100644
--- a/web/css/file_manager.css
+++ b/web/css/file_manager.css
@@ -1,41 +1,83 @@
body { margin: 0; padding: 0; }
.hidden { display: none; }
+.l-logo {
+ background-color: #7B7B7B;
+ background-image: url("/images/sprite.png?1446554103");
+ background-position: -117px -57px;
+ background-repeat: no-repeat;
+ border: 9px solid #7B7B7B;
+ display: inline-block;
+ float: left;
+ height: 22px;
+ margin-left: 0;
+ margin-top: 0;
+ width: 59px;
+}
+
#main{ display: inline-block; font-family: Arial; font-size: 15px; color: #777; width: 100%; }
.window { display: inline-block; float: left; /*border: 1px solid #eee;*/ width: 50%; height: 100%; background-color: #ececec; /*background: url(/images/background-dots.png) #ececec;*/ }
.window.active { background: #fff; }
-.pwd { background-color: #7b7b7b; height: 31px; padding: 12px 0 0 17px; }
-.window.active .pwd { background-color: #333; }
+.window.active .l-logo { background-color: #333; border-color: #333; }
+
+
+.pwd { background-color: #7b7b7b; height: 28px; padding: 12px 0 0 17px; color: #eee; font-size: 14px; overflow: hidden; }
+.window.active .pwd { background-color: #333; box-shadow: -2px 0 5px -3px rgba(0, 0, 0, 0.7); }
.window.active .pwd a { color: #FFF; }
-.pwd a { color: #CFCFCF; margin-right: 6px; padding: 0 7px; cursor: pointer; text-decoration: none; }
+.pwd a { color: #CFCFCF; cursor: pointer; text-decoration: none; }
.window.active .pwd a:hover, .pwd a:hover { color: #FFCC00; }
-.menu { background-color: #E2E2E0; display: inline-block; color: #999999; width: 100%; padding: 8px 0 7px 0; border-bottom: 1px solid #CFCFCD; border-left: 1px solid #CFCFCD; margin-left: -1px; }
+.active .menu { box-shadow: 0 1px 11px -5px rgba(0, 0, 0, 0.5); }
+.menu { /*background-color: #EEE;*/ display: inline-block; color: #999999; width: 100%; padding: 8px 0 7px 0; border-bottom: 1px solid #CFCFCD; border-left: 1px solid #CFCFCD; margin-left: -1px; }
+
+
+.menu div { display: inline-block; float: left; padding: 6px 5px 5px; font-size: 11px; margin: 0 3px; line-height: 14px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
+.window.active .menu div.button { color: #777; }
+
+.menu div.button.small { display: none; width: 19px; height: 12px; }
+.menu div.button.small.mkfile { background: url("/images/flat_icons.png") no-repeat scroll -176px -97px; margin-left: 10px; }
+.menu div.button.small.mkdir { background: url("/images/flat_icons.png") no-repeat scroll -176px -123px; }
+.menu div.button.small.del { background: url("/images/flat_icons.png") no-repeat scroll -176px -149px; }
+.menu div.button.small.rename { background: url("/images/flat_icons.png") no-repeat scroll -180px -180px; width: 12px; }
+.menu div.button.small.copy { background: url("/images/flat_icons.png") no-repeat scroll -177px -210px; }
+.menu div.button.small.download { background: url("/images/flat_icons.png") no-repeat scroll -176px -243px; }
+.menu div.button.small.extract { background: url("/images/flat_icons.png") no-repeat scroll -232px -35px; }
+.menu div.button.small.archive { background: url("/images/flat_icons.png") no-repeat scroll -175px -58px; }
+
+
+.menu div.button.small.mkfile:hover { background-position: -203px -97px; }
+.menu div.button.small.mkdir:hover { background-position: -203px -123px; }
+.menu div.button.small.del:hover { background-position: -203px -149px; }
+.menu div.button.small.rename:hover { background-position: -207px -180px; }
+.menu div.button.small.copy:hover { background-position: -204px -210px; }
+.menu div.button.small.download:hover { background-position: -204px -243px; }
+.menu div.button.small.extract:hover { background: url("/images/flat_icons.png") no-repeat scroll -255px -35px; }
+.menu div.button.small.archive:hover { background: url("/images/flat_icons.png") no-repeat scroll -201px -35px; }
+
+
+
+
+
+.menu div.button.disabled:hover,
+.menu div.button { cursor: pointer; transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; box-shadow: none; color: #999; }
+.window.active .menu div.button:hover,
+.menu div.button:hover { text-decoration: none; color: #1FB9CA; }
+
+.window.active .menu div.button.del:hover,
+.menu div.button.del:hover { color: #FF5A5A; }
+
-.menu div { display: inline-block; float: left; padding: 5px 9px; font-size: 11px; margin: 0 3px; line-height: 14px; }
-.menu div.button.disabled:hover,
-.menu div.button { cursor: pointer; border: 1px solid #E2E2E0; border-radius: 3px; text-decoration: underline; background-color: #E2E2E0;
- transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s;
- -webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s;
- box-shadow: none; color: #999;
-}
-.menu div.button:hover { border: 1px solid #B7B7B7; text-decoration: none; background-color: #FFF; /*#EAEAE8;*/ color: #333;
-/* box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.64); */
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.29);
-/* box-shadow: 0 6px 15px rgba( 0, 0, 0, 0.23), 0 10px 18px rgba( 0, 0, 0, 0.16);*/
-/* box-shadow: 0 3px 10px rgba(0, 0, 0, 0.23), 0 3px 10px rgba(0, 0, 0, 0.16);*/
-}
.menu div.button.disabled:hover,
.menu div.button.disabled { opacity: 0.5; cursor: default; text-decoration: none; }
.menu .upload.button { color: #777; border: 1px solid #B7B7B7; background-color: #EAEAE8; text-transform: uppercase; font-size: 12px; text-decoration: none; margin-left: 8px; padding: 5px 12px; margin-right: 10px; border-radius: 3px; float: left; transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; font-size: 11px; line-height: 14px; }
-.window.active .menu .upload { border: 1px solid #F79B44; background-color: #F79B44; color: #FFF; }
+.window.active .menu .upload { border: 1px solid #AACC0D; background-color: #AACC0D; color: #FFF; }
.menu .upload.button.progress { background: url(/images/progress.gif) no-repeat /*-98px*/ -60px 0px #EBEBEB; border-color: #8A9079; color: transparent; padding: 3px 12px; height: 0; margin-top: 9px; transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s;
-webkit-transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s;
@@ -43,32 +85,33 @@ body { margin: 0; padding: 0; }
.menu .upload.button.progress.done { background-color: #d1ff66; border-color: #8a9079; box-shadow: 0 0 9px 0 #d1ff38; color: transparent; height: 0; margin-top: 9px; padding: 3px 12px; transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; }
-.menu .upload.button:hover, .window.active .menu .upload:hover { border: 1px solid #469D8D; background-color: #54bdaa; /*border: 1px solid #6DB8D3; background-color: #6DB8D3;*/ color: #fff; box-shadow: 0 2px 5px 0 rgba( 47, 106, 95, 0.8); }
+.menu .upload.button:hover, .window.active .menu .upload:hover { border: 1px solid #C0E60F; background-color: #C0E60F; color: #fff; }
.menu .upload.button:active, .window.active .menu .upload:active { border: 1px solid #FFCC00; background-color: #FFCC00; color: #FFF; }
.menu .not-writable { color: #BD846A; font-size: 12px; text-decoration: none; margin-left: 10px; padding: 5px 12px; margin-right: 20px; }
-.menu .sort-by { border-bottom: 1px solid #b7b7b7; border-radius: 0; cursor: pointer; float: right; height: 17px; line-height: 10px; margin-right: 8px; padding: 8px 10px 0; text-decoration: none; width: 100px; }
-.menu .sort-by .direction { background: url("/images/flat_icons.png") repeat scroll -245px -76px; display: inline-block; float:right; width: 12px; height: 20px; margin-top: -10px; }
-.menu .sort-by.desc .direction { background-position: -270px -76px; }
+.menu .sort-by { border-radius: 0; cursor: pointer; float: right; height: 17px; line-height: 10px; margin-right: 8px; padding: 8px 10px 0; text-decoration: none; }
+.menu .sort-by .direction { background: url("/images/flat_icons.png") repeat scroll -390px -76px; display: inline-block; float:right; width: 12px; height: 20px; margin-top: -10px; }
+.menu .sort-by.desc .direction { background-position: -415px -76px; }
.menu .sort-by span { font-size: 12px; color: #555; text-decoration: none; border: none; }
.menu .sort-by span.entity { color: #555; text-decoration: none; border: none; float: right; display: inline-block; }
-.menu .sort-by:hover span { color: #429586; }
+.menu .sort-by:hover span { color: #43B2BE; }
.menu .total-size { padding: 7px 0 0 0; }
.menu .not-writable:hover { border: 1px solid #E2E2E0; }
-ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left: 1px solid #DDDDDD; margin-left: -1px; overflow: auto; }
-.listing li { color: #999999; display: block; height: 32px; margin: 1px 0 0; line-height: 30px; border: 1px solid transparent; }
-.listing li span { display: inline-block; float: right; }
+ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; border-left: 1px solid #DDDDDD; overflow: auto; }
+.listing li { color: #999999; display: block; height: 34px; margin: 1px 0 0; line-height: 30px; padding: 0; }
+.listing li span { display: inline-block; float: right; height: 32px; overflow: hidden; }
.listing li .marker { width: 4px; float: left; height: 100%; margin-right: 31px; }
.listing li.back { }
.listing li.file { }
/* .listing li .icon { background: url("/images/document.png") no-repeat scroll -2px 6px; float: left; margin-left: -17px; width: 13px; height: 24px; }*/
-.listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px/*-97px -100px*/; float: left; margin-left: -17px; width: 31px; height: 31px; }
-.listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -99px /*-99px 0px 25px -69px */; }
+.listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; float: left; margin-left: -17px; width: 31px; height: 31px; margin-top: 1px; }
+.listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -98px; }
+.listing li .icon.filetype-link { background: url("/images/flat_icons.png") no-repeat scroll -97px -121px; }
.listing li .icon.filetype-tif,
.listing li .icon.filetype-gif,
@@ -80,7 +123,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.listing li .icon.filetype-yuv,
.listing li .icon.filetype-ai,
.listing li .icon.filetype-svg,
-.listing li .icon.filetype-png { background: url("/images/flat_icons.png") no-repeat scroll -138px -69px; }
+.listing li .icon.filetype-png { background: url("/images/flat_icons.png") no-repeat scroll -138px -68px; }
.listing li .icon.filetype-txt,
.listing li .icon.filetype-csv,
@@ -92,12 +135,12 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.listing li .icon.filetype-ppt,
.listing li .icon.filetype-sdf,
.listing li .icon.filetype-vcf,
-.listing li .icon.filetype-db { background: url("/images/flat_icons.png") no-repeat scroll -97px -150px; }
+.listing li .icon.filetype-db { background: url("/images/flat_icons.png") no-repeat scroll -97px -149px; }
.listing li .icon.filetype-xlr,
.listing li .icon.filetype-xls,
-.listing li .icon.filetype-xlsx { background: url("/images/flat_icons.png") no-repeat scroll -138px -147px; }
+.listing li .icon.filetype-xlsx { background: url("/images/flat_icons.png") no-repeat scroll -138px -146px; }
.listing li .icon.filetype-jar,
.listing li .icon.filetype-tar,
@@ -111,12 +154,12 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.listing li .icon.filetype-sitx,
.listing li .icon.filetype-zip,
.listing li .icon.filetype-zipx,
-.listing li .icon.filetype-jar { background: url("/images/flat_icons.png") no-repeat scroll -176px -34px; }
+.listing li .icon.filetype-jar { background: url("/images/flat_icons.png") no-repeat scroll -176px -33px; }
.listing li .icon.filetype-fnt,
.listing li .icon.filetype-otf,
.listing li .icon.filetype-ttf,
-.listing li .icon.filetype-fon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; }
+.listing li .icon.filetype-fon { background: url("/images/flat_icons.png") no-repeat scroll -97px -99px; }
.listing li .icon.filetype-3g2,
.listing li .icon.filetype-3gp,
@@ -131,7 +174,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.listing li .icon.filetype-rm,
.listing li .icon.filetype-swf,
.listing li .icon.filetype-vob,
-.listing li .icon.filetype-wmv { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; }
+.listing li .icon.filetype-wmv { background: url("/images/flat_icons.png") no-repeat scroll -97px -99px; }
.listing li .icon.filetype-aif,
.listing li .icon.filetype-iff,
@@ -142,69 +185,91 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.listing li .icon.filetype-mpa,
.listing li .icon.filetype-ra,
.listing li .icon.filetype-wav,
-.listing li .icon.filetype-wma { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; }
+.listing li .icon.filetype-wma { background: url("/images/flat_icons.png") no-repeat scroll -97px -99px; }
.listing li .icon.filetype-rtf,
.listing li .icon.filetype-doc,
-.listing li .icon.filetype-docx { background: url("/images/flat_icons.png") no-repeat scroll -138px -123px; }
-.listing li .icon.filetype-pdf { background: url("/images/flat_icons.png") no-repeat scroll -138px -96px; }
+.listing li .icon.filetype-docx { background: url("/images/flat_icons.png") no-repeat scroll -138px -122px; }
+.listing li .icon.filetype-pdf { background: url("/images/flat_icons.png") no-repeat scroll -138px -95px; }
-.listing li .icon.filetype-js { background: url("/images/flat_icons.png") no-repeat scroll -138px -204px; }
-.listing li .icon.filetype-css { background: url("/images/flat_icons.png") no-repeat scroll -138px -254px; }
-.listing li .icon.filetype-php { background: url("/images/flat_icons.png") no-repeat scroll -138px -179px; }
+.listing li .icon.filetype-js { background: url("/images/flat_icons.png") no-repeat scroll -138px -203px; }
+.listing li .icon.filetype-css { background: url("/images/flat_icons.png") no-repeat scroll -138px -253px; }
+.listing li .icon.filetype-php { background: url("/images/flat_icons.png") no-repeat scroll -138px -178px; }
.listing li .icon.filetype-html,
.listing li .icon.filetype-htm,
-.listing li .icon.filetype-xhtml { background: url("/images/flat_icons.png") no-repeat scroll -138px -228px; }
+.listing li .icon.filetype-xhtml { background: url("/images/flat_icons.png") no-repeat scroll -138px -227px; }
-.listing li .filename { color: #555; cursor: pointer; height: 32px; float: left; padding: 0 7px 0 7px; border-radius: 3px; transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; }
+.listing li .filename-holder { max-width: 40%; overflow: hidden; float: left; height: 35px; }
+.listing li .filename { color: #555; cursor: pointer; height: 32px; float: left; padding: 2px 7px 0 7px; border-radius: 3px; transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; }
+
/* .listing li .filename { background: url("/images/folder_.png") no-repeat scroll -2px 6px; color: #555; cursor: pointer; float: left; margin-left: -27px; padding-left: 19px; }*/
-
+.listing li .filename:hover { color: #333; background-color: #D1D0CF; }
+/*
.listing li .filename:hover { color: #FFF; background-color: #6CB6B9; }
.listing li.selected .filename:hover { color: #FFF; }
.listing li.active .filename:hover { color: #FFF; background-color: #CAA335; }
.listing li.active.selected .filename:hover { color: #FFF; background-color: #60A885; }
-
+*/
.listing li .filename a { color: #7D7D7D; text-decoration: none; }
-.listing li .mode { width: 51px; font-size: 11px; }
-.listing li .owner { width: 11%; font-style: italic; color: #81A64F; font-size: 12px; }
-.listing li .size { width: 8%; color: #44a8b3; font-size: 12px; padding-right: 7px; text-align: right; }
-.listing li .size-unit { width: 5%; font-size: 11px; font-weight: bold; color: #A7A7A7; padding-top: 1px; }
-.listing li .date { width: 11%; font-size: 11px; }
-.listing li .time { width: 8%; font-size: 11px; }
+.listing li .mode { width: 51px; font-size: 11px; padding-top: 2px; }
+.listing li .owner { width: 11%; font-style: italic; color: #81A64F; font-size: 12px; padding-top: 2px; }
+.listing li .size-value { width: 70px; color: #44a8b3; font-size: 12px; padding-right: 7px; text-align: right; padding-top: 2px; }
+.listing li .size-unit { width: 30px; font-size: 11px; font-weight: bold; color: #A7A7A7; text-align: left; padding-top: 2px; }
+.listing li .date { width: 50px; font-size: 11px; padding-top: 2px; }
+.listing li .time { width: 50px; font-size: 11px; padding-top: 2px; }
+.window.active .listing li.selected .mode { color: #7F7550; }
+.window.active .listing li.selected .owner { /* color: #7F7550; */ }
+.window.active .listing li.selected .size-value { color: #7F7550; }
+.window.active .listing li.selected .size-unit { color: #7F7550; }
+.window.active .listing li.selected .date { color: #7F7550; }
+.window.active .listing li.selected .time { color: #7F7550; }
+
+
+/*
.listing li.selected-inactive.selected { background-color: #e9e9e9; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; }
.listing li.selected-inactive .mode,
.listing li.selected-inactive .time,
.listing li.selected-inactive .date { color: #999 !important; }
-.listing li.selected { background-color: #7FD5D9; }
-.window.active .listing li.selected.active { background-color: #73CAA0; }
+*/
+
+.listing li.selected { background-color: #DEDEDE; }
+.listing.active li.selected { background-color: #ffd437 /*#7FD5D9*/; }
+.listing li.selected .filename:hover { color: #333; background-color: #F0B607; }
-.listing li.selected-inactive.selected.active { background-color: #dfc891; border-top: 1px solid #cdb885; border-bottom: 1px solid #cdb885; }
-.listing li.active { background-color: #e7cf96; }
-.window.active .listing li.active { background-color: #ffe06c; }
-.listing li.active .filename{ color: #31775A; }
+
+
+/* ///.listing li.selected-inactive.selected.active { background-color: #dfc891; border-top: 1px solid #cdb885; border-bottom: 1px solid #cdb885; }*/
+
+/*
.listing li.selected .filename { color: #333; }
.listing li.selected .date,
.listing li.selected .mode,
-.listing li.selected .time { color: #FFF; }
+.listing li.selected .time { color: #777; }
.listing li.selected .owner { color: #31775A; }
.listing li.selected .size { color: #31775A; }
+*/
+.window.active .listing li.active { background-color: #FFDC5A; }
+.window.active .listing li.active .marker { background-color: #C2A84B; }
+.listing li.active { background-color: #DEDEDE; }
+.listing li.active .marker { background-color: #C2C2C2; }
-.listing li.selected.active .filename { color: #fff29c; }
+/* ///.listing li.selected.active .filename { color: #fff29c; } */
.listing li.selected.active .marker { background-color: #3a8a96; }
-.listing li.selected-inactive .marker { background-color: #7FD5D9; }
-.listing li.selected-inactive .filename { color: #54A9A9; }
+.listing li.selected-inactive { background-color: #DEDEDE; }
+/*///.listing li.selected-inactive .marker { background-color: #7FD5D9; }
+.listing li.selected-inactive .filename { color: #54A9A9; } */
.listing li .filename a:hover { color: #3399FF; }
-.listing li:hover { background-color: #F4F4F2; }
-.listing li.active:hover { background-color: #FFD63F; }
-.listing li.selected:hover { background-color: #89E6EA; }
-.listing li.selected.active:hover { background-color: #77D1A6; }
+.listing li:hover { background-color: #E5E5E5; cursor: pointer; }
+.window.active .listing li.active:hover { background-color: #FFE570; }
+.listing li.selected:hover { background-color: /*#89E6EA*/#FFE570; }
+.listing li.selected.active:hover { background-color: #FFE570; }
@@ -226,8 +291,13 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.context-menu.sort-order li.last { border: none; }
.context-menu.sort-order li:hover { background-color: #333; }
.context-menu.sort-order span { padding: 12px 12px 12px 12px; background: ulr(/images/flat_icons.png) }
-.context-menu.sort-order span.up { background: url(/images/flat_icons.png) -255px -141px; padding: 12px 14px; display: inline-block; width: 16px; }
-.context-menu.sort-order span.name { background: url("/images/flat_icons.png") repeat scroll -162px -105px; display: inline-block; padding: 12px 28px 12px 12px; width: 64px; }
+.context-menu.sort-order span.up { background: url(/images/flat_icons.png) -399px -141px; padding: 12px 14px; display: inline-block; width: 16px; }
+.context-menu.sort-order span.name,
+.context-menu.sort-order span.date,
+.context-menu.sort-order span.size,
+.context-menu.sort-order span.type
+ { background: url("/images/flat_icons.png") repeat scroll -308px -105px; display: inline-block; padding: 12px 28px 12px 12px; width: 64px; }
+
.context-menu.sort-order span.active { background-color: #FFCC00; color: #FFF; }
@@ -264,7 +334,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
/*.confirm-box.delete { height: 183px; }*/
-.confirm-box .new-title { background-color: #292929; border: 1px solid #111; color: #fff; font-family: Arial; font-size: 16px; margin-bottom: 73px; margin-left: 27px; padding: 10px 14px; width: 396px; }
+.confirm-box .new-title { background-color: #292929; border: 1px solid #111; color: #eee; font-family: Arial; font-size: 16px; margin-bottom: 73px; margin-left: 27px; padding: 10px 14px; width: 396px; }
.confirm-box .new-title:focus { border: 1px solid #FFCC00; box-shadow: 0 0 5px 0 rgba(255, 204, 0 , 0.3); }
/*.confirm-box.rename { height: 209px; } */
@@ -286,8 +356,17 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.confirm-box.archive.warning .warning { display: inline-block; }
.confirm-box.archive.warning .message { margin-bottom: -31px; }
+.confirm-box.copy .message { margin-bottom: 0; }
+.confirm-box.unpack .message { margin-bottom: 0; }
+.confirm-box.pack .message { margin-bottom: 0; }
+
+
.confirm-box .actions select { background-color: #333333; border: 1px solid #ccc; color: #fff; font-family: Arial; font-size: 16px; margin-bottom: 27px; margin-left: 27px; padding: 10px 14px; }
.confirm-box .actions .title { color: #ccc; font-family: Arial; line-height: 33px; padding-left: 27px; text-transform: capitalize; }
+.confirm-box .actions label { cursor: pointer; padding-left: 27px; color: #ebe697; }
+.confirm-box.unpack .actions { padding-bottom: 30px; }
+.confirm-box.unpack .actions input { margin-right: 5px; }
+
/*.confirm-box.owner-mode { height: 484px; }*/
.confirm-box.owner-mode .warning { display: none; }
@@ -301,12 +380,17 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
.confirm-box.owner-mode .recursive { margin-top: 30px; margin-bottom: 25px; }
+
+
.warning-box { width: 60%; background-color: #ff9f89; border-bottom: 5px solid #ff6c6e; color: #FFF; font-family: arial; margin-left: auto; margin-right: auto; padding-bottom: 30px; margin-bottom: 50px; left: 20%; position: absolute; top: 0; box-shadow: 0 2px 11px 0 rgba(0, 0, 0, 0.5); }
.warning-box.inform { background-color: #72c5b2; border-color: #019174; }
+.warning-box.reload { width: 100px; background-color: #333; border-color: #222; z-index: 5000; left: 45%; opacity: 0.9; padding: 17px 27px; border-radius: 0 0 6px 6px; border: none; opacity: 0.9; }
.warning-box .message { width: 100%; padding: 30px 0 5px; text-align: center; font-size: 14px; text-transform: uppercase; font-weight: bold; }
+.warning-box.reload .message-small { color: #ccc; }
+.warning-box.reload .message-small span { color: #72C5B2; font-weight: bold; }
.warning-box .message-small { width: 100%; text-align: center; font-size: 13px; color: #9D3407; }
.warning-box.inform .message-small { color: #555; }
-.warning-box .close { width: 30px; height: 30px; top: 5px; right: -5px; background-color: #FFF; float: right; cursor: pointer; background: url("/images/flat_icons.png") repeat scroll -258px -174px; }
+.warning-box .close { width: 30px; height: 30px; top: 5px; right: -5px; background-color: #FFF; float: right; cursor: pointer; background: url("/images/flat_icons.png") repeat scroll -382px -174px; }
.warning-box .close:hover { background-color: #DC5D5F; }
.warning-box.inform .close:hover { background-color: #019174; }
@@ -328,17 +412,319 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: 0; border-left:
/*
- Для Дмитрия (удалить после прочтения):
-
- Аплоад прячет инпут, делая его прозрачным, и помещая поверх кнопку html (сделано для кроссбраузерности)
- При стилизации кнопки для аплоада, важно задать такие же размеры для инпута с типом файла,
- иначе он может быть больше или меньше стилизованной кнопки, что приведёт к вызову аплоад диалогового окна
- при клике на неправильную область
-
-
- вот файл инпут ----> .fileinput-button input
+
+ Прочёл. Похоже проблема уже решена, не понял, что нужно сделать, проверить правильность решения?
+ Вроде всё в порядке, инпут уже максимльно близко вкладывается в спан.
+
+
+ -- Для Дмитрия (удалить после прочтения):
+
+ -- Аплоад прячет инпут, делая его прозрачным, и помещая поверх кнопку html (сделано для кроссбраузерности)
+ -- При стилизации кнопки для аплоада, важно задать такие же размеры для инпута с типом файла,
+ -- иначе он может быть больше или меньше стилизованной кнопки, что приведёт к вызову аплоад диалогового окна
+ -- при клике на неправильную область
+
+
+ -- вот файл инпут ----> .fileinput-button input
*/
.fileinput-button input {
font-size: 14px !important;
width: 90px;
}
+
+.progress-container {
+ width: 100%;
+ position: fixed;
+ bottom: 1px;
+}
+.progress-container .progress-elm {
+ background-color: rgba(0, 0, 0, 0.5);
+ border-radius: 3px;
+ display: block;
+ height: 12px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 7px;
+ width: 212px;
+}
+
+.progress-container .progress-elm .title {
+ color: #fff;
+ display: inline-block;
+ float: left;
+ font-family: arial;
+ font-size: 11px;
+ margin-left: 4px;
+ padding-right: 14px;
+ padding-top: 0;
+ text-transform: uppercase;
+}
+
+.progress-container .progress-elm .progress {
+ background: #ebebeb url("/images/progress.gif") no-repeat scroll 0px 0;
+ border-color: #8a9079;
+ border-radius: 3px;
+ color: transparent;
+ display: inline-block;
+ height: 0;
+ margin-top: 3px;
+ padding: 3px 12px;
+ transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s;
+ width: 60px;
+ float: left;
+}
+
+.progress-container .progress-elm .close {
+ background: rgba(0, 0, 0, 0) url("/images/sprite.png?1446554103") repeat scroll -428px -487px;
+ cursor: pointer;
+ display: inline-block;
+ float: right;
+ height: 7px;
+ margin-right: 3px;
+ margin-top: 3px;
+ width: 7px;
+}
+.progress-container .progress-elm .close:hover {
+ border: 7px solid #333;
+ margin-top: -4px;
+ margin-right: -4px;
+ background-color: #333;
+}
+.progress-container .progress-elm .close:active {
+ border: 7px solid #FFCC00;
+ margin-top: -4px;
+ margin-right: -4px;
+ background-color: #FFCC00;
+}
+
+
+
+
+
+.checkbox-toolbar {
+ float: left !important;
+}
+/*W
+.check-label::before {
+ background-image: url("/images/sprite.png?1446554103");
+ background-position: -232px -9px;
+ background-repeat: no-repeat;
+ background-size: 450px auto;
+ content: "";
+ display: inline-block;
+ height: 16px;
+ width: 16px;
+ margin-top: -25px;
+
+ border: 1px solid red;
+}
+input[type="checkbox"] {
+ display: none;
+}
+
+.clicked-on.check-label::before, .checkbox-selected .check-label {
+ background-position: -225px -42px;
+ content: "";
+ display: inline-block;
+ height: 27px;
+ left: -6px;
+ top: -6px;
+ width: 27px;
+}
+*/
+
+@media (max-width: 1400px) {
+ .listing li .filename-holder { width: 35%; }
+}
+
+
+@media (max-width: 1320px) {
+ .menu div.button.mkfile,
+ .menu div.button.mkdir { display: none; }
+ .menu div.button.mkfile.small,
+ .menu div.button.mkdir.small { display: inline-block; }
+ .listing li .filename-holder { max-width: 30%; }
+}
+
+@media (max-width: 1210px) {
+ .menu div.button.del { display: none; }
+ .menu div.button.del.small { display: inline-block; }
+ .listing li .filename-holder { max-width: 25%; }
+}
+
+
+@media (max-width: 1180px) {
+ .menu div.button { display: none; }
+ .menu div.button.medium,
+ .menu div.button.small { display: inline-block; }
+}
+
+@media (max-width: 1080px) {
+ .listing li .filename-holder { max-width: 36%; }
+ .listing li .owner { display: none; }
+ .listing li .mode { display: none; }
+}
+
+@media (max-width: 890px) {
+ .window { width: 100%; }
+ .window:nth-of-type(2){ display: none; }
+ .listing li .owner { display: inline-block; }
+
+ .menu div.button { display: inline-block; }
+ .menu div.button.small { display: none; }
+ .menu div.copy.button { display: none; }
+ .listing li .filename-holder { max-width: 40%; }
+}
+
+@media (max-width: 720px) {
+ .listing li .filename-holder { max-width: 30%; }
+}
+
+@media (max-width: 600px) {
+ .menu div.button { display: none; }
+ .menu div.button.medium,
+ .menu div.button.small { display: inline-block; }
+ .menu div.copy.button.small { display: none; }
+ .listing li .filename-holder { max-width: 20%; }
+}
+
+@media (max-width: 520px) {
+ .listing li .owner { display: none; }
+ .listing li .filename-holder { max-width: 15%; }
+}
+
+@media (max-width: 400px) {
+ .listing li .mode { display: none; }
+ .listing li .time { display: none; }
+ .listing li .filename-holder { max-width: 30%; }
+}
+
+@media (max-width: 360px) {
+ .listing li .date { display: none; }
+}
+
+@media (max-width: 310px) {
+ .listing li .size { display: none; }
+}
+
+
+.subcontext-control.hidden {
+ display: none !important;
+}
+
+.subcontext-control {
+ color: red;
+}
+.subcontext-menu-hidden {
+ display: none;
+}
+
+.subcontext-menu {
+ position: absolute;
+ background-color: yellow;
+ padding: 10px;
+ border: 1px solid red;
+}
+
+.subcontext-menu li {
+ /*float: left;*/
+}
+
+
+.shortcuts {
+ background: rgba(50, 50, 50, 0.9);
+ display: inline-block;
+ position: fixed;
+ right: 20%;
+ bottom: 0;
+ color: #eee;
+ width: 810px;
+ border: 1px solid #333;
+ font-family: arial;
+ font-size: 13px;
+}
+.shortcuts .header {
+ border-bottom: 1px solid #333;
+ height: 43px;
+}
+.shortcuts .title {
+ text-transform: uppercase;
+ color: #ffcc00;
+ padding: 7px 0 7px 14px;
+ display: inline-block;
+ float: left;
+ font-size: 11px;
+ letter-spacing: 3px;
+ font-weight: bold;
+ line-height: 30px;
+}
+.shortcuts .close {
+ background: url("/images/sprite.png?1446554103") repeat scroll -408px -469px;
+ cursor: pointer;
+ display: inline-block;
+ float: right;
+ height: 32px;
+ padding-top: 11px;
+ width: 46px;
+}
+.shortcuts .close:hover {
+ background-color: #000;
+..
+}
+.shortcuts .close:active {
+ background-color: #55c9c0;
+}
+.shortcuts ul {
+ list-style-type: none;
+ padding: 30px 20px;
+ display: inline-block;
+ float: left;
+ width: 360px;
+}
+.shortcuts ul li {
+ padding: 5px 20px;
+}
+.shortcuts ul li.step-top {
+ padding-top: 30px;
+}
+.shortcuts ul li span {
+ color: #48F4EF;
+ display: inline-block;
+ font-weight: bold;
+ padding: 0 20px 0 0;
+ text-align: right;
+}
+.shortcuts ul li span.bigger {
+ font-size: 18px;
+}
+.shortcuts ul.note {
+ font-style: italic;
+ color: #9CA484;
+ width: 700px;
+ padding-left: 50px;
+}
+.shortcuts ul.note a {
+ color: #9CA484;
+}
+
+.to-shortcuts {
+ display: inline-block;
+ position: fixed;
+ top: 95%;
+ right: 1%;
+}
+.l-icon-shortcuts {
+ display: inline-block;
+ vertical-align: middle;
+ background-image: url("/images/sprite.png?1446554103");
+ width: 35px;
+ height: 35px;
+ background-position: -122px -283px;
+ border-radius: 18px;
+}
+.l-icon-shortcuts:hover {
+ background-position: -160px -283px;
+}
+.l-icon-shortcuts:active {
+ background-position: -198px -283px;
+}
diff --git a/web/css/file_manager_editor.css b/web/css/file_manager_editor.css
index 9db4931af..858d0d167 100644
--- a/web/css/file_manager_editor.css
+++ b/web/css/file_manager_editor.css
@@ -1,11 +1,10 @@
body, form { padding: 0; margin: 0; background: #333; }
-input.save {
+input.save {
background-color: rgba(247, 165, 48, 0.8);
border: 1px solid #f79b44;
border-radius: 3px;
-/* bottom: 17px;*/
top: 9px;
color: #fafafa;
cursor: pointer;
@@ -28,17 +27,9 @@ input.save:active { border: 1px solid #FFCC00; background-color: #FFCC00; color:
.ace_gutter,
-.ace_scroller { padding-top: 10px; }
-.ace-twilight .ace_gutter-active-line { margin-top: 10px; }
+.ace_scroller { padding-top: 0px; }
+/*.ace-twilight .ace_gutter-active-line { margin-top: 10px; } */
.ace_gutter-cell { color: #777; }
-/*
-.ace_gutter-cell { color: #777; padding: 9px 0px 0px 4px; }
-.ace_line { padding: 9px 0px 0px 4px; }
-.ace_editor,
-.ace-twilight .ace_cursor,
-.ace_text-input { font-size: 17px; }
-*/
-
-.ace_editor { font-size: 19px !important; }
+.ace_editor { font-size: 17px !important; font-family: "Courier New", Courier, "Lucida Console", Monaco, monospace !important; }
diff --git a/web/css/styles.min.css b/web/css/styles.min.css
index 5de4a63b5..3dae45c82 100644
--- a/web/css/styles.min.css
+++ b/web/css/styles.min.css
@@ -255,7 +255,7 @@ abbr[title] {
b,
strong {
font-weight: bold;
- color: #777;
+ color: #5f5f5f;
}
/**
@@ -629,10 +629,11 @@ a {
left: 0;
top: 0;
display: inline-block;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-size: 450px auto;
background-repeat: no-repeat;
background-position: -232px -9px;
+ z-index: 99;
}
input[type="checkbox"] {
@@ -655,15 +656,17 @@ input[type="checkbox"] {
}
.l-logo {
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -117px -7px;
+/* background-position: -125px -478px; */
background-repeat: no-repeat;
display: inline-block;
float: left;
height: 22px;
margin-top: 4px;
width: 73px;
- margin-left: -11px;
+/* width: 42px; */
+ margin-left: -2px;
}
.l-header {
@@ -672,14 +675,14 @@ input[type="checkbox"] {
margin-bottom: 28px;
position: fixed;
width: 100%;
- z-index: 11;
+ z-index: 100;
}
.l-header a {
font-size: 12px;
}
.l-menu__item--active {
- background-color: #fff;
+ //background-color: #fff;
}
.l-menu__item.l-menu__item--active a {
@@ -687,6 +690,7 @@ input[type="checkbox"] {
font-size: 10px;
font-weight: bold;
text-transform: uppercase;
+ background-color: #fff;
}
.l-menu {
@@ -699,7 +703,7 @@ input[type="checkbox"] {
color: #f7f7f7;
position: relative;
line-height: 34px;
- padding: 11px 20px;
+ padding: 11px 18px;
}
.l-menu__item a:hover {
background-color: #f79b44;
@@ -710,6 +714,15 @@ input[type="checkbox"] {
background-color: #ff6701;
}
+.l-menu.active .l-menu__item.focus a {
+ text-decoration: underline;
+ color: #5edad0;
+}
+.l-menu.active .l-menu__item.focus a:hover {
+ background-color: #f79b44;
+ color: #fff;
+}
+
.lang-ua .l-menu__item a,
.lang-nl .l-menu__item a,
@@ -721,10 +734,18 @@ input[type="checkbox"] {
.lang-ar .l-menu__item a {
padding: 11px 15px;
}
+.lang-ar .l-menu__item a {
+ line-height: 35px;
+}
+
.lang-de .l-menu__item a {
padding: 11px 12px;
}
+.lang-tw .l-menu__item a {
+ padding: 13px 18px;
+}
+
.l-profile {
overflow: hidden;
float: right;
@@ -733,7 +754,8 @@ input[type="checkbox"] {
float: left;
color: #a4abad;
font-weight: 700;
- padding: 10px 5px;
+ padding: 10px 0 0 10px;
+ margin-right: 12px;
}
.l-profile__username:hover {
color: #ffd62e;
@@ -746,8 +768,8 @@ input[type="checkbox"] {
.l-profile__logout {
float: left;
color: #fff;
- margin-left: 40px;
- padding: 10px 5px;
+/* margin-left: 40px; */
+ padding: 10px 0 0 10px;
}
.l-profile__logout:hover {
color: #C0E60E;
@@ -755,6 +777,134 @@ input[type="checkbox"] {
.l-profile__logout:active {
color: #ffd62e;
}
+.lang-cn .l-profile__logout {
+ padding: 8px 5px;
+}
+.lang-tw .l-profile__logout {
+ padding: 8px 5px;
+}
+
+.l-profile__notifications {
+ background: url("/images/sprite.png?1446554103") no-repeat scroll -129px -135px;
+ border-radius: 30px;
+ color: #fff;
+ cursor: pointer;
+ float: left;
+ font-weight: bold;
+ height: 15px;
+ margin-right: 4px;
+ margin-top: 5px;
+ padding: 10px 5px 0;
+ width: 15px;
+}
+.l-profile__notifications.active {
+ background-color: #454545;
+}
+.l-profile__notifications:hover {
+ background-color: #333;
+}
+.l-profile__notifications:active {
+ background-color: #c4da5e;
+}
+.l-profile__notifications.updates {
+ background-position: -202px -157px;
+}
+
+.notification-container {
+ background-color: #454545;
+ box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.3);
+ list-style-type: none;
+ margin: 0;
+ overflow: hidden;
+ padding-left: 0;
+ position: fixed;
+ top: 34px;
+ width: 351px;
+ z-index: 200;
+ font-size: 12px;
+ padding: 0;
+ color: #7f7f7f;
+}
+.notification-container .unseen {
+ color: #ABABAB;
+}
+
+
+.notification-container li {
+ border-bottom: 1px solid #555;
+ padding: 10px 15px 24px;
+}
+.notification-container .mark-seen {
+ background-color: #abc04b;
+ border: 2px solid #454545;
+ border-radius: 10px;
+ cursor: pointer;
+ display: none;
+ float: right;
+ height: 7px;
+ margin-right: -5px;
+ margin-top: 0;
+ width: 7px;
+}
+.notification-container .mark-seen:hover {
+ background-color: #333;
+ border-color: #abc04b;
+}
+.notification-container .mark-seen:active {
+ background-color: #777;
+ border-color: #777;
+}
+.notification-container .unseen .mark-seen{
+ display: inline-block;
+}
+.notification-container .title {
+ color: #9e9e9e;
+ font-weight: bold;
+ line-height: 30px;
+ padding: 0;
+ text-transform: none;
+ float: none;
+ display: block;
+}
+.notification-container .title a {
+ color: #9e9e9e;
+}
+
+.notification-container .unseen .title a,
+.notification-container .unseen .title {
+ color: #C4DA5E;
+}
+.notification-container .unseen .title a:hover {
+ color: #ffcc00;
+}
+.notification-container .unseen .title a:active {
+ color: #dacf2e;
+}
+
+.notification-container a {
+ color: #5ABDB5;/* #eee;*/
+}
+.notification-container a:hover {
+ color: #2CA99B;
+}
+.notification-container a:active {
+ color: #00C0C0;
+}
+
+.notification-container .icon {
+ display: inline-block;
+ width: 0;
+}
+.notification-container .icon.filemanager {
+ display: inline-block;
+ width: 22px;
+ background: url("/images/flat_icons.png") repeat scroll -31px -100px;
+}
+.notification-container .icon.starred {
+ display: inline-block;
+ width: 21px;
+ background: url("/images/sprite.png?1446554103") repeat scroll -184px 556px;
+}
@@ -764,7 +914,7 @@ input[type="checkbox"] {
margin: 34px auto;
position: fixed;
background-color: #fff;
- z-index: 10;
+ z-index: 100;
padding-top: 30px;
}
.l-stat__col {
@@ -793,6 +943,15 @@ input[type="checkbox"] {
border-bottom: 3px solid #ff6e42;
}
+.l-stat.active .l-stat__col.focus a {
+ border-bottom: 3px solid #5edad0;
+}
+.l-stat.active .l-stat__col.focus a .l-stat__col-title {
+ color: #36B3A9;
+}
+
+
+
.l-stat__col a:hover .l-stat__col-title {
color: #ff6701;
}
@@ -838,25 +997,25 @@ div.l-content > div.l-separator:nth-of-type(2) {
margin-top: 214px;
width: 100%;
position: fixed;
- z-index: 20;
+ z-index: 120;
}
div.l-content > div.l-separator:nth-of-type(4) {
margin-top: 259px;
width: 100%;
position: fixed;
- z-index: 5;
+ z-index: 100;
}
.l-sort {
position: fixed;
width: 998px;
background-color: #fff;
- z-index: 10;
+ z-index: 110;
margin-top: 215px;
}
.l-sort__create-btn {
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -331px -107px;
background-repeat: no-repeat;
bottom: -23px;
@@ -907,7 +1066,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
margin: 0;
overflow: hidden;
top: 42px;
- width: 148px;
+ width: 201px;
background-color: #959593;
list-style-type: none;
padding-left: 0;
@@ -924,15 +1083,15 @@ div.l-content > div.l-separator:nth-of-type(4) {
padding: 12px;
}
.context-menu.sort-order span.name {
- background: url("/images/flat_icons.png") repeat scroll -162px -105px rgba(0, 0, 0, 0);
+ background: url("/images/sprite.png?1446554103") no-repeat scroll -292px -361px rgba(0, 0, 0, 0);
display: inline-block;
padding: 12px 28px 12px 12px;
- width: 64px;
+ width: 117px;
text-transform: uppercase;
font-weight: bold;
}
.context-menu.sort-order span.up {
- background: url("/images/flat_icons.png") repeat scroll -255px -141px rgba(0, 0, 0, 0);
+ background: url("/images/sprite.png?1446554103") no-repeat scroll -434px -417px rgba(0, 0, 0, 0);
display: inline-block;
padding: 12px 14px;
width: 16px;
@@ -970,7 +1129,6 @@ div.l-content > div.l-separator:nth-of-type(4) {
cursor: pointer;
padding-top: 7px;
padding-right: 40px;
- display: none;
}
.l-sort-toolbar .sort-by:hover {
color: #555;
@@ -985,6 +1143,12 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #55c9c0;
}
+.l-sort-toolbar .sort-by b {
+ text-transform: uppercase;
+ padding-left: 3px;
+ font-size: 12px;
+}
+
.l-sort-toolbar .toggle-all:hover {
color: #555;
}
@@ -1013,7 +1177,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
float: left;
width: 30px;
height: 30px;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -333px -1px;
border: none;
}
@@ -1034,7 +1198,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
float: left;
width: 25px;
height: 25px;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -333px -37px;
border: none;
}
@@ -1087,7 +1251,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
.l-select:after {
pointer-events: none;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -245px -175px;
width: 7px;
height: 4px;
@@ -1117,10 +1281,32 @@ div.l-content > div.l-separator:nth-of-type(4) {
}
.l-unit {
- color: #929292;
+ color: #888;
padding: 0 0 0 15px;
overflow: hidden;
+ font-size: 13px;
}
+.units .l-unit {
+ border-bottom: 1px solid #ddd;
+ border-left: 2px solid #fff;
+}
+.units .l-unit.l-unit--starred {
+ border-left: 2px solid #ff6701;
+}
+.units.active .l-unit.focus {
+ border-left: 2px solid #5edad0;
+}
+.units.active .l-unit.focus .l-unit__name {
+ color: #36b3a9;
+}
+.units.active .l-unit.focus .l-unit-toolbar__col--right {
+ display: block;
+}
+
+.units > div:last-child {
+ border-bottom: none;
+}
+
.l-unit-ftl {
color: #929292;
padding: 0 0 0 15px;
@@ -1129,9 +1315,6 @@ div.l-content > div.l-separator:nth-of-type(4) {
.l-unit:hover .l-unit-toolbar__col--right {
display: block;
}
-.l-unit--orange {
- border-left: 2px solid #ff6701;
-}
.l-unit--blue {
border-left: 2px solid #55c9c0;
}
@@ -1202,8 +1385,9 @@ div.l-content > div.l-separator:nth-of-type(4) {
background-color: #d1eddc;
}
.l-unit-toolbar{
- height: 51px;
+ height: 39px;
}
+
.l-unit label {
margin-bottom: 20px;
}
@@ -1214,15 +1398,28 @@ div.l-content > div.l-separator:nth-of-type(4) {
.l-unit__col {
display: table-cell;
padding-top: 1px;
+ vertical-align: top;
}
.l-unit__col--left {
width: 124px;
padding-right: 10px;
}
+.units.compact .l-unit__col--left {
+ vertical-align: top;
+}
+
.l-unit__col--left.step-left {
padding-left: 30px;
}
+.l-unit__col--right.total {
+ padding-left: 16px;
+}
+
+.l-unit__col--right.back {
+ padding-left: 78px
+}
+
.l-sort-toolbar .step-left {
padding-left: 40px;
}
@@ -1233,7 +1430,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
.l-unit__date {
font-size: 12px;
letter-spacing: 1px;
- margin-top: -13px;
+ margin-top: 10px;
padding-bottom: 30px;
}
@@ -1247,6 +1444,10 @@ div.l-content > div.l-separator:nth-of-type(4) {
margin-bottom: 14px;
}
+.units.compact .l-unit__suspended {
+ margin-top: 1px;
+}
+
.l-unit--outdated .l-unit__suspended,
.l-unit--suspended .l-unit__suspended {
display: block;
@@ -1270,13 +1471,13 @@ div.l-content > div.l-separator:nth-of-type(4) {
}
.l-unit__name {
- color: #343434;
+ color: #111;
font-size: 32px;
margin-bottom: 10px;
}
.l-unit__stats.separate,
.l-unit__name.separate {
- padding-bottom: 20px;
+ padding-bottom: 15px;
}
.l-unit__name.small {
@@ -1303,7 +1504,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
}
.l-unit__ip {
- margin-bottom: 34px;
+ margin-bottom: 26px;
font-size: 12px;
letter-spacing: 1px;
}
@@ -1311,25 +1512,37 @@ div.l-content > div.l-separator:nth-of-type(4) {
padding-left: 3px;
padding-right: 3px;
}
+.display-ip {
+ font-size: 12px;
+ letter-spacing: 1px;
+}
+.display-ip span {
+ padding-left: 3px;
+ padding-right: 3px;
+}
+
.l-unit__stats {
- margin-bottom: 53px;
+ margin-bottom: 50px;
}
.l-unit__stats table {
width: 100%;
table-layout: fixed;
}
.l-unit__stats td {
- height: 25px;
+ height: 22px;
padding-bottom: 3px;
vertical-align: top;
}
.l-unit__stat-col--left {
float: left;
- width: 130px;
+ width: 124px;
}
.l-unit__stat-col--left.compact {
width: 70px;
}
+.l-unit__stat-col--left.compact-2 {
+ width: 95px;
+}
.l-unit__stat-col--left.wide {
width: 190px;
}
@@ -1340,7 +1553,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
width: 250px;
}
.l-unit__stat-col--left.wide-4 {
- width: 575px;
+ width: 550px;
}
@@ -1366,7 +1579,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
float: left;
margin-left: -15px;
margin-top: 0;
- padding-bottom: 8px;
+ padding-bottom: 0px;/* 8px */
padding-left: 15px;
padding-top: 15px;
width: 30px;
@@ -1378,6 +1591,41 @@ div.l-content > div.l-separator:nth-of-type(4) {
display: none;
}
+.l-unit-toolbar .shortcut {
+ display: none;
+}
+
+.units.active .l-unit.focus .l-unit-toolbar .shortcut {
+ display: block;
+ background-color: #c8c7c6;
+ border-radius: 13px;
+ color: #fff;
+ cursor: pointer;
+ display: block;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 25px;
+ padding-left: 7px;
+ padding-right: 9px;
+ position: absolute;
+ right: 3px;
+ top: 3px;
+}
+.units.active .l-unit.focus .l-unit-toolbar .shortcut.delete {
+ font-size: 10px;
+ padding-left: 2px;
+ padding-right: 5px;
+ text-transform: capitalize;
+}
+.units.active .l-unit.focus .l-unit-toolbar .shortcut.enter {
+ font-size: 17px;
+ padding-left: 1px;
+ padding-right: 7px;
+}
+.units.active .l-unit.focus .l-unit-toolbar i {
+ background: none;
+}
+
.l-unit__stat-col.volume {
font-size: 12px;
line-height: 17px;
@@ -1387,26 +1635,26 @@ div.l-content > div.l-separator:nth-of-type(4) {
.actions-panel__col {
float: left;
min-width: 95px;
- min-height: 33px;
+ min-height: 31px;
text-transform: uppercase;
background-color: #dfdedd;
border-right: 1px solid #d8d7d7;
position: relative;
}
.actions-panel__col i {
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-repeat: no-repeat;
display: inline-block;
float: right;
content: '';
- width: 33px;
- height: 33px;
+ width: 31px;
+ height: 31px;
position: absolute;
top: 0;
right: 0;
}
.actions-panel__col a {
- line-height: 33px;
+ line-height: 31px;
color: #777;
font-weight: 700;
font-size: 12px;
@@ -1418,16 +1666,17 @@ div.l-content > div.l-separator:nth-of-type(4) {
}
.lang-ru .actions-panel__col a {
font-size: 11px;
- line-height: 31px;
- padding-top: 2px;
+ padding-top: 1px;
}
.lang-tw .actions-panel__col a {
font-size: 15px;
font-weight: normal;
+ line-height: 29px;
}
.lang-ar .actions-panel__col a {
font-size: 15px;
font-weight: normal;
+ line-height: 29px;
}
@@ -1440,7 +1689,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
}
.actions-panel__edit i {
- background-position: -1px -168px;
+ background-position: -1px -169px;
}
.actions-panel__edit:hover a {
background-color: #9fbf0c;
@@ -1451,21 +1700,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #555;
}
.actions-panel__edit:hover a i {
- background-position: -41px -168px;
+ background-position: -41px -169px;
}
.actions-panel__edit:active a i {
- background-position: -81px -168px;
+ background-position: -81px -169px;
}
.actions-panel__edit--active a {
background-color: #c0e60f;
color: #fff;
}
.actions-panel__edit--active i {
- background-position: -78px -168px;
+ background-position: -78px -169px;
}
.actions-panel__restart i {
- background-position: -1px -519px;
+ background-position: -1px -520px;
}
.actions-panel__restart:hover a {
background-color: #9fbf0c;
@@ -1476,21 +1725,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #555;
}
.actions-panel__restart:hover a i {
- background-position: -41px -519px;
+ background-position: -41px -520px;
}
.actions-panel__restart:active a i {
- background-position: -81px -519px;
+ background-position: -81px -520px;
}
.actions-panel__restart--active a {
background-color: #c0e60f;
color: #fff;
}
.actions-panel__restart--active i {
- background-position: -78px -519px;
+ background-position: -78px -520px;
}
.actions-panel__add i {
- background-position: -1px -284px;
+ background-position: -1px -285px;
}
.actions-panel__add:hover a {
background-color: #9fbf0c;
@@ -1501,10 +1750,10 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #555;
}
.actions-panel__add:hover a i {
- background-position: -41px -284px;
+ background-position: -41px -285px;
}
.actions-panel__add:active a i {
- background-position: -81px -284px;
+ background-position: -81px -285px;
}
.actions-panel__add--active a {
@@ -1512,11 +1761,11 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__add--active i {
- background-position: -78px -284px;
+ background-position: -78px -285px;
}
.actions-panel__update i {
- background-position: -1px -480px;
+ background-position: -1px -481px;
}
.actions-panel__update:hover a {
background-color: #9fbf0c;
@@ -1527,21 +1776,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #555;
}
.actions-panel__update:hover a i {
- background-position: -41px -480px;
+ background-position: -41px -481px;
}
.actions-panel__update:active a i {
- background-position: -81px -480px;
+ background-position: -81px -481px;
}
.actions-panel__update--active a {
background-color: #c0e60f;
color: #fff;
}
.actions-panel__update--active i {
- background-position: -78px -480px;
+ background-position: -78px -481px;
}
.actions-panel__logs i {
- background-position: -2px -129px;
+ background-position: -2px -130px;
}
.actions-panel__logs:hover a {
background-color: #afafac;
@@ -1552,21 +1801,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__logs:hover a i {
- background-position: -42px -129px;
+ background-position: -42px -130px;
}
.actions-panel__logs:active a i {
- background-position: -82px -129px;
+ background-position: -82px -130px;
}
.actions-panel__logs--active a {
background-color: #55c9c0;
color: #fff;
}
.actions-panel__logs--active i {
- background-position: -79px -129px;
+ background-position: -79px -130px;
}
.actions-panel__db i {
- background-position: -2px -362px;
+ background-position: -2px -363px;
}
.actions-panel__db:hover a {
background-color: #afafac;
@@ -1577,10 +1826,10 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__db:hover a i {
- background-position: -42px -362px;
+ background-position: -42px -363px;
}
.actions-panel__db:active a i {
- background-position: -82px -362px;
+ background-position: -82px -363px;
}
.actions-panel__db--active a {
background-color: #55c9c0;
@@ -1591,7 +1840,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
}
.actions-panel__suspend i {
- background-position: -1px -50px;
+ background-position: -1px -51px;
}
.actions-panel__suspend:hover a {
background-color: #afafac;
@@ -1602,21 +1851,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__suspend:hover a i {
- background-position: -41px -50px;
+ background-position: -41px -51px;
}
.actions-panel__suspend:active a i {
- background-position: -81px -50px;
+ background-position: -81px -51px;
}
.actions-panel__suspend--active a {
background-color: #55c9c0;
color: #fff;
}
.actions-panel__suspend--active i {
- background-position: -78px -50px;
+ background-position: -78px -51px;
}
.actions-panel__unsuspend i {
- background-position: -1px -11px;
+ background-position: -1px -12px;
}
.actions-panel__unsuspend:hover a {
background-color: #afafac;
@@ -1627,22 +1876,22 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__unsuspend:hover a i {
- background-position: -41px -11px;
+ background-position: -41px -12px;
}
.actions-panel__unsuspend:active a i {
- background-position: -81px -11px;
+ background-position: -81px -12px;
}
.actions-panel__unsuspend--active a {
background-color: #55c9c0;
color: #fff;
}
.actions-panel__unsuspend--active i {
- background-position: -78px -11px;
+ background-position: -78px -12px;
}
.actions-panel__loginas i {
- background-position: -1px -244px;
+ background-position: -1px -245px;
}
.actions-panel__loginas:hover a {
background-color: #afafac;
@@ -1653,21 +1902,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__loginas:hover a i {
- background-position: -41px -244px;
+ background-position: -41px -245px;
}
.actions-panel__loginas:active a i {
- background-position: -81px -244px;
+ background-position: -81px -245px;
}
.actions-panel__loginas--active a {
background-color: #55c9c0;
color: #fff;
}
.actions-panel__loginas--active i {
- background-position: -78px -244px;
+ background-position: -78px -245px;
}
.actions-panel__download i {
- background-position: -1px -401px;
+ background-position: -1px -402px;
}
.actions-panel__download:hover a {
background-color: #9fbf0c;
@@ -1678,21 +1927,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #555;
}
.actions-panel__download:hover a i {
- background-position: -41px -401px;
+ background-position: -41px -402px;
}
.actions-panel__download:active a i {
- background-position: -81px -401px;
+ background-position: -81px -402px;
}
.actions-panel__download--active a {
background-color: #c0e60f;
color: #fff;
}
.actions-panel__download--active i {
- background-position: -78px -401px;
+ background-position: -78px -402px;
}
.actions-panel__configure i {
- background-position: -1px -441px;
+ background-position: -1px -442px;
}
.actions-panel__configure:hover a {
background-color: #afafac;
@@ -1703,21 +1952,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__configure:hover a i {
- background-position: -41px -441px;
+ background-position: -41px -442px;
}
.actions-panel__configure:active a i {
- background-position: -81px -441px;
+ background-position: -81px -442px;
}
.actions-panel__configure--active a {
background-color: #55c9c0;
color: #fff;
}
.actions-panel__configure--active i {
- background-position: -78px -441px;
+ background-position: -78px -442px;
}
-.actions-panel__mail i {
- background-position: -1px -323px;
+.actions-panel__.l-icon-starmail i {
+ background-position: -1px -324px;
}
.actions-panel__mail:hover a {
background-color: #afafac;
@@ -1728,21 +1977,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__mail:hover a i {
- background-position: -41px -323px;
+ background-position: -41px -324px;
}
.actions-panel__mail:active a i {
- background-position: -81px -323px;
+ background-position: -81px -324px;
}
.actions-panel__mail--active a {
background-color: #55c9c0;
color: #fff;
}
.actions-panel__mail--active i {
- background-position: -78px -323px;
+ background-position: -78px -324px;
}
.actions-panel__delete i {
- background-position: -1px -206px;
+ background-position: -1px -207px;
}
.actions-panel__delete:hover a {
background-color: #ff3438;
@@ -1753,21 +2002,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__delete:hover a i {
- background-position: -41px -206px;
+ background-position: -41px -207px;
}
.actions-panel__delete:active a i {
- background-position: -81px -206px;
+ background-position: -81px -207px;
}
.actions-panel__delete--active a {
background-color: #ff5f5f;
color: #fff;
}
.actions-panel__delete--active i {
- background-position: -78px -206px;
+ background-position: -78px -207px;
}
.actions-panel__stop i {
- background-position: -1px -560px;
+ background-position: -1px -561px;
}
.actions-panel__stop:hover a {
background-color: #ff3438;
@@ -1778,21 +2027,21 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #fff;
}
.actions-panel__stop:hover a i {
- background-position: -41px -560px;
+ background-position: -41px -561px;
}
.actions-panel__stop:active a i {
- background-position: -81px -560px;
+ background-position: -81px -561px;
}
.actions-panel__stop--active a {
background-color: #ff5f5f;
color: #fff;
}
.actions-panel__stop--active i {
- background-position: -78px -560px;
+ background-position: -78px -561px;
}
.actions-panel__start i {
- background-position: -1px -481px;
+ background-position: -1px -482px;
}
.actions-panel__start:hover a {
background-color: #9fbf0c;
@@ -1803,24 +2052,24 @@ div.l-content > div.l-separator:nth-of-type(4) {
color: #555;
}
.actions-panel__start:hover a i {
- background-position: -41px -481px;
+ background-position: -41px -482px;
}
.actions-panel__start:active a i {
- background-position: -81px -481px;
+ background-position: -81px -482px;
}
.actions-panel__start--active a {
background-color: #c0e60f;
color: #fff;
}
.actions-panel__start--active i {
- background-position: -78px -481px;
+ background-position: -78px -482px;
}
-.l-icon-down-arrow, .l-icon-star, .l-icon-to-top, .l-icon-star-orange, .l-icon-star-blue {
+.l-icon-up-arrow, .l-icon-down-arrow, .l-icon-star, .l-icon-to-top, .l-icon-shortcuts, .l-icon-star-orange, .l-icon-star-blue {
display: inline-block;
vertical-align: middle;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
}
.l-icon-down-arrow {
@@ -1829,12 +2078,43 @@ div.l-content > div.l-separator:nth-of-type(4) {
background-position: -280px -128px;
}
-.l-icon-star {
- width: 35px;
- height: 35px;
- background-position: 0 -85px;
+.l-icon-up-arrow {
+ width: 7px;
+ height: 15px;
+ background-position: -299px -129px;
}
+
+.l-icon-star {
+ width: 36px;
+ height: 36px;
+ background-position: -216px 560px;
+ cursor: pointer;
+ display: none;
+}
+.l-unit--starred .l-icon-star {
+ display: inline-block;
+ background-position: -174px 560px;
+}
+
+.units.compact .l-icon-star {
+ margin-top: -14px;
+}
+
+.l-icon-star:hover {
+ background-position: 0px 560px;
+}
+
+.l-icon-star:active {
+ -background-position: -174px 560px;
+ background-position: -80px 562px;
+}
+
+.l-unit:hover .l-icon-star {
+ display: inline-block;
+}
+
+
.l-icon-to-top {
width: 35px;
height: 35px;
@@ -1847,6 +2127,22 @@ div.l-content > div.l-separator:nth-of-type(4) {
background-position: -402px -68px;
}
+.l-icon-shortcuts {
+ width: 35px;
+ height: 35px;
+ background-position: -240px -281px;
+ border-radius: 18px;
+}
+.l-icon-shortcuts:hover {
+ background-position: -160px -281px;
+}
+.l-icon-shortcuts:active {
+ background-position: -198px -281px;
+}
+
+
+
+
.l-icon-star-orange {
width: 13px;
height: 13px;
@@ -1893,12 +2189,22 @@ div.l-content > div.l-separator:nth-of-type(4) {
display: inline-block;
position: fixed;
top: 92%;
- right: 3%;
+ right: 1%;
}
+.to-shortcuts {
+ display: inline-block;
+ position: fixed;
+ top: 92%;
+ right: 4%;
+}
+
+
+/*
#vstobjects {
margin-top: -1px;
}
+*/
#vstobjects .l-center {
padding-top: 20px;
@@ -2003,7 +2309,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
height: 16px;
overflow: hidden;
padding-top: 6px;
- width: 630px;
+ width: 593px;
}
.vst-ok {
@@ -2061,6 +2367,13 @@ div.l-content > div.l-separator:nth-of-type(4) {
.step-top {
padding-top: 42px;
}
+.step-top-small {
+ padding-top: 22px;
+}
+.jump-top {
+ margin-top: -60px;
+}
+
.data a {
text-decoration: none;
}
@@ -2088,8 +2401,10 @@ label {
background-color: #D7F9FF;
color: #333;
}
-.vst-input:disabled {
- background-color: #ebebeb;
+
+.vst-input:disabled,
+.vst-list:disabled {
+ background-color: #e0e0e0;
}
.vst-input:focus:disabled {
border-color: #f1f1f1;
@@ -2112,7 +2427,7 @@ label {
margin: 2px 6px 0 0;
min-width: 138px;
padding: 8px 1px 6px 10px;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -185px -604px;
width: 270px;
appearance:none;
@@ -2256,14 +2571,30 @@ a.vst-text:active b{
.additional-control.ftp-remove-user {
padding: 2px 0 0 0;
}
+
+.additional-control.delete:hover,
.additional-control.ftp-remove-user:hover {
background-color: #FF3438;
border-color: #FF3438;
}
+.additional-control.delete:active,
.additional-control.ftp-remove-user:active {
background-color: #FF5F5F;
border-color: #FF5F5F;
}
+.additional-control.add:hover {
+ background-color: #9FBF0C;
+ border-color: #9FBF0C;
+}
+.additional-control.add:active{
+ background-color: #c0e60f;
+ border-color: #c0e60f;
+}
+
+.additional-control.remove-ns {
+ display: none;
+}
+
.data .step-left {
padding-left: 50px;
}
@@ -2338,6 +2669,26 @@ td.hint {
border: 1px solid #D1D70D;
background-color: #D1D70D;
}
+
+.ui-dialog button.cancel {
+ color: #000;
+ border: 1px solid #555;
+ background-color: #555;
+}
+/*
+.ui-dialog button.cancel:hover {
+ color: #fff;
+ border: 1px solid #999;
+ background-color: #999;
+}
+.ui-dialog button.cancel:active {
+ border: 1px solid #D1D70D;
+ background-color: #D1D70D;
+}
+*/
+
+
+
.ui-button span {
color: #fff;
}
@@ -2357,6 +2708,9 @@ td.hint {
color: #fff;
}
+.ui-dialog button.cancel span {
+ color: #ccc;
+}
.unlim-trigger {
@@ -2377,19 +2731,39 @@ td.hint {
text-transform: uppercase;
}
.data-suspended b {
- color: #de5543;
+ color: #A3A3A3;
font-size: 11px;
- letter-spacing: 1px;
+ letter-spacing: 3px;
+ font-weight: bold;
+ text-transform: uppercase;
}
.data-date {
font-weight: normal;
- color: #555;
- font-size: 11px;
+ color: #777;
+ font-size: 12px;
letter-spacing: 1px;
+ line-height: 23px;
}
.data-dotted {
vertical-align: top;
}
+.mail-infoblock-td {
+ vertical-align: top;
+}
+.mail-infoblock {
+ padding-top: 76px;
+ margin-left: -100px;
+ font-size: 12px;
+ color: #777;
+}
+.mail-infoblock td {
+ color: #777;
+ font-size: 14px;
+ height: 20px;
+ padding-right: 25px;
+ font-weight: normal;
+}
+
:focus {outline:none;}
::-moz-focus-inner {border:0;}
@@ -2431,6 +2805,7 @@ td.hint {
.l-unit.selected {
background-color: #feef9a;
color: #555;
+ border-bottom: 1px solid #c0b990;
}
.l-unit.selected b,
@@ -2488,7 +2863,7 @@ form#vstobjects.suspended {
#add-icon {
width: 45px;
height: 45px;
- background-image: url("/images/sprite.png");
+ background-image: url("/images/sprite.png?1446554103");
background-position: -378px -107px;
background-repeat: no-repeat;
display: inline-block;
@@ -2516,6 +2891,7 @@ form#vstobjects.suspended {
padding: 3px 14px 3px 27px;
position: absolute;
text-transform: uppercase;
+ word-break: keep-all;
z-index: -1;
}
@@ -2554,13 +2930,14 @@ form#vstobjects.suspended {
}
.search-input {
+ background-color: #fff;
border: 1px solid #ddd;
height: 21px;
line-height: 28px;
padding-left: 7px;
float: left;
- width: 0px;
- visibility: hidden;
+ width: 74px;
+/* visibility: hidden;*/
-webkit-transition: width .2s ease-out;
-moz-transition: width .2s ease-out;
-o-transition: width .2s ease-out;
@@ -2571,9 +2948,9 @@ form#vstobjects.suspended {
visibility: visible;
}
.search-input:focus {
- background-color: #d7f9ff;
- border-color: #55c9c0;
- color: #333;
+// background-color: #e8fcff;
+// border-color: #75c9c2;
+// color: #333;
}
.float-left {
@@ -2596,3 +2973,161 @@ form#vstobjects.suspended {
float: right !important;
padding-top: 3px;
}
+.ui-dialog .ui-dialog-buttonpane button:nth-of-type(2) {
+ -background-color: #dfdedd;
+}
+
+.shortcuts {
+ background: rgba(50, 50, 50, 0.9);
+ display: inline-block;
+ position: fixed;
+ right: 20%;
+ bottom: 0;
+ color: #eee;
+ width: 800px;
+ border: 1px solid #333;
+ font-size: 13px;
+}
+.shortcuts .header {
+ border-bottom: 1px solid #333;
+ height: 43px;
+}
+.shortcuts .title {
+ text-transform: uppercase;
+ color: #ffcc00;
+ padding: 7px 0 7px 14px;
+ display: inline-block;
+ float: left;
+ font-size: 11px;
+ letter-spacing: 3px;
+}
+.shortcuts .close {
+ background: url("/images/sprite.png?1446554103") repeat scroll -408px -469px;
+ cursor: pointer;
+ display: inline-block;
+ float: right;
+ height: 32px;
+ padding-top: 11px;
+ width: 46px;
+}
+.shortcuts .close:hover {
+ background-color: #000;
+
+}
+.shortcuts .close:active {
+ background-color: #55c9c0;
+}
+.shortcuts ul {
+ list-style-type: none;
+ padding: 30px 20px;
+ display: inline-block;
+ float: left;
+ width: 360px;
+}
+.shortcuts ul li {
+ padding: 5px 20px;
+}
+.shortcuts ul li.step-top {
+ padding-top: 30px;
+}
+.shortcuts ul li span {
+ color: #48F4EF;
+ display: inline-block;
+ font-weight: bold;
+ padding: 0 20px 0 0;
+ text-align: right;
+/* width: 140px;*/
+}
+.shortcuts ul li span.bigger {
+ font-size: 18px;
+}
+
+.description {
+ font-weight: normal;
+ line-height: 25px;
+ padding-bottom: 45px;
+ margin-left: 50px;
+}
+.description ul{
+ margin-top: 15px;
+ list-style: none;
+ padding-left: 0;
+}
+
+.description li{
+ margin: 10px 0;
+}
+
+.description a {
+ line-height: 30px;
+ text-decoration: underline;
+ color: #2c9491;
+}
+.description a.purchase {
+ color: #FFF;
+ background-color: #9fbf0c;
+ border: none;
+ border-radius: 3px;
+ font-size: 13px;
+ font-weight: bold;
+ padding: 7px 15px;;
+ text-transform: capitalize;
+ text-decoration: none;
+}
+.description a.purchase:hover {
+ background-color: #c0e60f;
+ color: #555;
+}
+.description a.purchase:active {
+ background-color: #D9F210;
+ color: #555;
+}
+
+.description a.cancel {
+ background-color: #999;
+ border: none;
+ border-radius: 3px;
+ color: #fff;
+ font-size: 13px;
+ font-weight: bold;
+ padding: 7px 15px;
+ text-transform: capitalize;
+ text-decoration: none;
+}
+.description a.cancel:hover {
+ background-color: #2c9491;
+}
+.description a.cancel:active {
+ background-color: #5f9491;
+}
+
+.description.cancel-success {
+ color: #8fac0a;
+ font-weight: bold;
+}
+
+.description .licence {
+ padding: 20px 0;
+ color: #2c9491;
+}
+
+.description .licence input {
+ margin-left: 17px;
+ width: 137px;
+}
+
+.description span {
+ font-style: italic;
+ line-height: 45px;
+ padding-top: 20px;
+}
+
+.description .twoco {
+ font-style: italic;
+ line-height: 15px;
+ font-size: 12px;
+}
+
+.ui-dialog .ui-dialog-content {
+ padding: 10px 26px 30px !important;
+}
diff --git a/web/delete/favorite/index.php b/web/delete/favorite/index.php
new file mode 100644
index 000000000..9f471b9bd
--- /dev/null
+++ b/web/delete/favorite/index.php
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/web/delete/notification/index.php b/web/delete/notification/index.php
new file mode 100644
index 000000000..fa3a14f10
--- /dev/null
+++ b/web/delete/notification/index.php
@@ -0,0 +1,30 @@
+
diff --git a/web/download/file/index.php b/web/download/file/index.php
new file mode 100644
index 000000000..5322185b1
--- /dev/null
+++ b/web/download/file/index.php
@@ -0,0 +1,27 @@
+
diff --git a/web/edit/backup/exclusions/index.php b/web/edit/backup/exclusions/index.php
index 4c67de264..8bac32c16 100644
--- a/web/edit/backup/exclusions/index.php
+++ b/web/edit/backup/exclusions/index.php
@@ -3,7 +3,7 @@
error_reporting(NULL);
ob_start();
session_start();
-$TAB = 'BACKUP EXCLUSIONS';
+$TAB = 'BACKUP';
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
diff --git a/web/edit/cron/index.php b/web/edit/cron/index.php
index d78b4eb6e..b2e82d287 100644
--- a/web/edit/cron/index.php
+++ b/web/edit/cron/index.php
@@ -53,6 +53,7 @@ if (!empty($_POST['save'])) {
}
$v_username = $user;
+ $v_job = escapeshellarg($_GET['job']);
$v_min = escapeshellarg($_POST['v_min']);
$v_hour = escapeshellarg($_POST['v_hour']);
$v_day = escapeshellarg($_POST['v_day']);
diff --git a/web/edit/file/index.php b/web/edit/file/index.php
new file mode 100644
index 000000000..d6ae8dcee
--- /dev/null
+++ b/web/edit/file/index.php
@@ -0,0 +1,148 @@
+
+
+Edit file = htmlspecialchars($_REQUEST['path']) ?>
+
+
+
+
+
+
+
+
+
+
+
+
+Error while saving file
');
+ exit;
+ }
+ }
+ unlink($fn);
+ }
+ }
+
+ exec (VESTA_CMD . "v-open-fs-file {$user} ".escapeshellarg($path), $content, $return_var);
+ if ($return_var != 0) {
+ print 'Error while opening file'; // todo: handle this more styled
+ exit;
+ }
+ $content = implode("\n", $content)."\n";
+ } else {
+ $content = '';
+ }
+?>
+
+
+
+
+
diff --git a/web/edit/mail/index.php b/web/edit/mail/index.php
index 1010b07f8..28d4da9b5 100644
--- a/web/edit/mail/index.php
+++ b/web/edit/mail/index.php
@@ -233,7 +233,7 @@ if ((!empty($_POST['save'])) && (!empty($_GET['domain'])) && (!empty($_GET['acco
$result = array_diff($aliases, $valiases);
foreach ($result as $alias) {
if ((empty($_SESSION['error_msg'])) && (!empty($alias))) {
- exec (VESTA_CMD."v-add-mail-account-alias ".$v_username." ".$v_domain." ".$v_account." '".$alias."'", $output, $return_var);
+ exec (VESTA_CMD."v-add-mail-account-alias ".$v_username." ".$v_domain." ".$v_account." ".escapeshellarg($alias), $output, $return_var);
check_return_code($return_var,$output);
unset($output);
}
@@ -259,7 +259,7 @@ if ((!empty($_POST['save'])) && (!empty($_GET['domain'])) && (!empty($_GET['acco
$result = array_diff($fwd, $vfwd);
foreach ($result as $forward) {
if ((empty($_SESSION['error_msg'])) && (!empty($forward))) {
- exec (VESTA_CMD."v-add-mail-account-forward ".$v_username." ".$v_domain." ".$v_account." '".$forward."'", $output, $return_var);
+ exec (VESTA_CMD."v-add-mail-account-forward ".$v_username." ".$v_domain." ".$v_account." ".escapeshellarg($forward), $output, $return_var);
check_return_code($return_var,$output);
unset($output);
}
diff --git a/web/edit/package/index.php b/web/edit/package/index.php
index 5662d19c9..e8ecaf686 100644
--- a/web/edit/package/index.php
+++ b/web/edit/package/index.php
@@ -50,6 +50,10 @@ $v_ns1 = $nameservers[0];
$v_ns2 = $nameservers[1];
$v_ns3 = $nameservers[2];
$v_ns4 = $nameservers[3];
+$v_ns5 = $nameservers[4];
+$v_ns6 = $nameservers[5];
+$v_ns7 = $nameservers[6];
+$v_ns8 = $nameservers[7];
$v_backups = $data[$v_package]['BACKUPS'];
$v_date = $data[$v_package]['DATE'];
$v_time = $data[$v_package]['TIME'];
@@ -155,9 +159,17 @@ if (!empty($_POST['save'])) {
$v_ns2 = trim($_POST['v_ns2'], '.');
$v_ns3 = trim($_POST['v_ns3'], '.');
$v_ns4 = trim($_POST['v_ns4'], '.');
+ $v_ns5 = trim($_POST['v_ns5'], '.');
+ $v_ns6 = trim($_POST['v_ns6'], '.');
+ $v_ns7 = trim($_POST['v_ns7'], '.');
+ $v_ns8 = trim($_POST['v_ns8'], '.');
$v_ns = $v_ns1.",".$v_ns2;
if (!empty($v_ns3)) $v_ns .= ",".$v_ns3;
if (!empty($v_ns4)) $v_ns .= ",".$v_ns4;
+ if (!empty($v_ns5)) $v_ns .= ",".$v_ns5;
+ if (!empty($v_ns6)) $v_ns .= ",".$v_ns6;
+ if (!empty($v_ns7)) $v_ns .= ",".$v_ns7;
+ if (!empty($v_ns8)) $v_ns .= ",".$v_ns8;
$v_ns = escapeshellarg($v_ns);
$v_time = escapeshellarg(date('H:i:s'));
$v_date = escapeshellarg(date('Y-m-d'));
diff --git a/web/edit/server/index.php b/web/edit/server/index.php
index dde038c55..a47056991 100644
--- a/web/edit/server/index.php
+++ b/web/edit/server/index.php
@@ -1,8 +1,6 @@
'The uploaded file exceeds the upload_max_filesize directive in php.ini',
- 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
- 3 => 'The uploaded file was only partially uploaded',
- 4 => 'No file was uploaded',
- 6 => 'Missing a temporary folder',
- 7 => 'Failed to write file to disk',
- 8 => 'A PHP extension stopped the file upload',
- 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini',
- 'max_file_size' => 'File is too big',
- 'min_file_size' => 'File is too small',
- 'accept_file_types' => 'Filetype not allowed',
- 'max_number_of_files' => 'Maximum number of files exceeded',
- 'max_width' => 'Image exceeds maximum width',
- 'min_width' => 'Image requires a minimum width',
- 'max_height' => 'Image exceeds maximum height',
- 'min_height' => 'Image requires a minimum height',
- 'abort' => 'File upload aborted',
- 'image_resize' => 'Failed to resize image'
- );
-
- protected $image_objects = array();
-
- function __construct($options = null, $initialize = true, $error_messages = null) {
- $this->options = array(
- 'script_url' => $this->get_full_url().'/',
- 'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
- 'upload_url' => $this->get_full_url().'/files/',
- 'user_dirs' => false,
- 'mkdir_mode' => 0755,
- 'param_name' => 'files',
- // Set the following option to 'POST', if your server does not support
- // DELETE requests. This is a parameter sent to the client:
- 'delete_type' => 'DELETE',
- 'access_control_allow_origin' => '*',
- 'access_control_allow_credentials' => false,
- 'access_control_allow_methods' => array(
- 'OPTIONS',
- 'HEAD',
- 'GET',
- 'POST',
- 'PUT',
- 'PATCH',
- 'DELETE'
- ),
- 'access_control_allow_headers' => array(
- 'Content-Type',
- 'Content-Range',
- 'Content-Disposition'
- ),
- // Enable to provide file downloads via GET requests to the PHP script:
- // 1. Set to 1 to download files via readfile method through PHP
- // 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache
- // 3. Set to 3 to send a X-Accel-Redirect header for nginx
- // If set to 2 or 3, adjust the upload_url option to the base path of
- // the redirect parameter, e.g. '/files/'.
- 'download_via_php' => false,
- // Read files in chunks to avoid memory limits when download_via_php
- // is enabled, set to 0 to disable chunked reading of files:
- 'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB
- // Defines which files can be displayed inline when downloaded:
- 'inline_file_types' => '/\.(gif|jpe?g|png)$/i',
- // Defines which files (based on their names) are accepted for upload:
- 'accept_file_types' => '/.+$/i',
- // The php.ini settings upload_max_filesize and post_max_size
- // take precedence over the following max_file_size setting:
- 'max_file_size' => null,
- 'min_file_size' => 1,
- // The maximum number of files for the upload directory:
- 'max_number_of_files' => null,
- // Defines which files are handled as image files:
- 'image_file_types' => '/\.(gif|jpe?g|png)$/i',
- // Use exif_imagetype on all files to correct file extensions:
- 'correct_image_extensions' => false,
- // Image resolution restrictions:
- 'max_width' => null,
- 'max_height' => null,
- 'min_width' => 1,
- 'min_height' => 1,
- // Set the following option to false to enable resumable uploads:
- 'discard_aborted_uploads' => true,
- // Set to 0 to use the GD library to scale and orient images,
- // set to 1 to use imagick (if installed, falls back to GD),
- // set to 2 to use the ImageMagick convert binary directly:
- 'image_library' => 1,
- // Uncomment the following to define an array of resource limits
- // for imagick:
- /*
- 'imagick_resource_limits' => array(
- imagick::RESOURCETYPE_MAP => 32,
- imagick::RESOURCETYPE_MEMORY => 32
- ),
- */
- // Command or path for to the ImageMagick convert binary:
- 'convert_bin' => 'convert',
- // Uncomment the following to add parameters in front of each
- // ImageMagick convert call (the limit constraints seem only
- // to have an effect if put in front):
- /*
- 'convert_params' => '-limit memory 32MiB -limit map 32MiB',
- */
- // Command or path for to the ImageMagick identify binary:
- 'identify_bin' => 'identify',
- 'image_versions' => array(
- // The empty image version key defines options for the original image:
- '' => array(
- // Automatically rotate images based on EXIF meta data:
- 'auto_orient' => true
- ),
- // Uncomment the following to create medium sized images:
- /*
- 'medium' => array(
- 'max_width' => 800,
- 'max_height' => 600
- ),
- */
- 'thumbnail' => array(
- // Uncomment the following to use a defined directory for the thumbnails
- // instead of a subdirectory based on the version identifier.
- // Make sure that this directory doesn't allow execution of files if you
- // don't pose any restrictions on the type of uploaded files, e.g. by
- // copying the .htaccess file from the files directory for Apache:
- //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/',
- //'upload_url' => $this->get_full_url().'/thumb/',
- // Uncomment the following to force the max
- // dimensions and e.g. create square thumbnails:
- //'crop' => true,
- 'max_width' => 80,
- 'max_height' => 80
- )
- )
- );
- if ($options) {
- $this->options = $options + $this->options;
- }
- if ($error_messages) {
- $this->error_messages = $error_messages + $this->error_messages;
- }
- if ($initialize) {
- $this->initialize();
- }
- }
-
- protected function initialize() {
- switch ($this->get_server_var('REQUEST_METHOD')) {
- case 'OPTIONS':
- case 'HEAD':
- $this->head();
- break;
- case 'GET':
- $this->get();
- break;
- case 'PATCH':
- case 'PUT':
- case 'POST':
- $this->post();
- break;
- case 'DELETE':
- $this->delete();
- break;
- default:
- $this->header('HTTP/1.1 405 Method Not Allowed');
- }
- }
-
- protected function get_full_url() {
- $https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 ||
- !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
- strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
- return
- ($https ? 'https://' : 'http://').
- (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : '').
- (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].
- ($https && $_SERVER['SERVER_PORT'] === 443 ||
- $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
- substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
- }
-
- protected function get_user_id() {
- @session_start();
- return session_id();
- }
-
- protected function get_user_path() {
- if ($this->options['user_dirs']) {
- return $this->get_user_id().'/';
- }
- return '';
- }
-
- protected function get_upload_path($file_name = null, $version = null) {
- $file_name = $file_name ? $file_name : '';
- if (empty($version)) {
- $version_path = '';
- } else {
- $version_dir = @$this->options['image_versions'][$version]['upload_dir'];
- if ($version_dir) {
- return $version_dir.$this->get_user_path().$file_name;
- }
- $version_path = $version.'/';
- }
- return $this->options['upload_dir'].$this->get_user_path()
- .$version_path.$file_name;
- }
-
- protected function get_query_separator($url) {
- return strpos($url, '?') === false ? '?' : '&';
- }
-
- protected function get_download_url($file_name, $version = null, $direct = false) {
- if (!$direct && $this->options['download_via_php']) {
- $url = $this->options['script_url']
- .$this->get_query_separator($this->options['script_url'])
- .$this->get_singular_param_name()
- .'='.rawurlencode($file_name);
- if ($version) {
- $url .= '&version='.rawurlencode($version);
- }
- return $url.'&download=1';
- }
- if (empty($version)) {
- $version_path = '';
- } else {
- $version_url = @$this->options['image_versions'][$version]['upload_url'];
- if ($version_url) {
- return $version_url.$this->get_user_path().rawurlencode($file_name);
- }
- $version_path = rawurlencode($version).'/';
- }
- return $this->options['upload_url'].$this->get_user_path()
- .$version_path.rawurlencode($file_name);
- }
-
- protected function set_additional_file_properties($file) {
- $file->deleteUrl = $this->options['script_url']
- .$this->get_query_separator($this->options['script_url'])
- .$this->get_singular_param_name()
- .'='.rawurlencode($file->name);
- $file->deleteType = $this->options['delete_type'];
- if ($file->deleteType !== 'DELETE') {
- $file->deleteUrl .= '&_method=DELETE';
- }
- if ($this->options['access_control_allow_credentials']) {
- $file->deleteWithCredentials = true;
- }
- }
-
- // Fix for overflowing signed 32 bit integers,
- // works for sizes up to 2^32-1 bytes (4 GiB - 1):
- protected function fix_integer_overflow($size) {
- if ($size < 0) {
- $size += 2.0 * (PHP_INT_MAX + 1);
- }
- return $size;
- }
-
- protected function get_file_size($file_path, $clear_stat_cache = false) {
- if ($clear_stat_cache) {
- if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
- clearstatcache(true, $file_path);
- } else {
- clearstatcache();
- }
- }
- return $this->fix_integer_overflow(filesize($file_path));
- }
-
- protected function is_valid_file_object($file_name) {
- $file_path = $this->get_upload_path($file_name);
- if (is_file($file_path) && $file_name[0] !== '.') {
- return true;
- }
- return false;
- }
-
- protected function get_file_object($file_name) {
- if ($this->is_valid_file_object($file_name)) {
- $file = new \stdClass();
- $file->name = $file_name;
- $file->size = $this->get_file_size(
- $this->get_upload_path($file_name)
- );
- $file->url = $this->get_download_url($file->name);
- foreach($this->options['image_versions'] as $version => $options) {
- if (!empty($version)) {
- if (is_file($this->get_upload_path($file_name, $version))) {
- $file->{$version.'Url'} = $this->get_download_url(
- $file->name,
- $version
- );
- }
- }
- }
- $this->set_additional_file_properties($file);
- return $file;
- }
- return null;
- }
-
- protected function get_file_objects($iteration_method = 'get_file_object') {
- $upload_dir = $this->get_upload_path();
- if (!is_dir($upload_dir)) {
- return array();
- }
- return array_values(array_filter(array_map(
- array($this, $iteration_method),
- scandir($upload_dir)
- )));
- }
-
- protected function count_file_objects() {
- return count($this->get_file_objects('is_valid_file_object'));
- }
-
- protected function get_error_message($error) {
- return array_key_exists($error, $this->error_messages) ?
- $this->error_messages[$error] : $error;
- }
-
- function get_config_bytes($val) {
- $val = trim($val);
- $last = strtolower($val[strlen($val)-1]);
- switch($last) {
- case 'g':
- $val *= 1024;
- case 'm':
- $val *= 1024;
- case 'k':
- $val *= 1024;
- }
- return $this->fix_integer_overflow($val);
- }
-
- protected function validate($uploaded_file, $file, $error, $index) {
- if ($error) {
- $file->error = $this->get_error_message($error);
- return false;
- }
- $content_length = $this->fix_integer_overflow(intval(
- $this->get_server_var('CONTENT_LENGTH')
- ));
- $post_max_size = $this->get_config_bytes(ini_get('post_max_size'));
- if ($post_max_size && ($content_length > $post_max_size)) {
- $file->error = $this->get_error_message('post_max_size');
- return false;
- }
- if (!preg_match($this->options['accept_file_types'], $file->name)) {
- $file->error = $this->get_error_message('accept_file_types');
- return false;
- }
- if ($uploaded_file && is_uploaded_file($uploaded_file)) {
- $file_size = $this->get_file_size($uploaded_file);
- } else {
- $file_size = $content_length;
- }
- if ($this->options['max_file_size'] && (
- $file_size > $this->options['max_file_size'] ||
- $file->size > $this->options['max_file_size'])
- ) {
- $file->error = $this->get_error_message('max_file_size');
- return false;
- }
- if ($this->options['min_file_size'] &&
- $file_size < $this->options['min_file_size']) {
- $file->error = $this->get_error_message('min_file_size');
- return false;
- }
- if (is_int($this->options['max_number_of_files']) &&
- ($this->count_file_objects() >= $this->options['max_number_of_files']) &&
- // Ignore additional chunks of existing files:
- !is_file($this->get_upload_path($file->name))) {
- $file->error = $this->get_error_message('max_number_of_files');
- return false;
- }
- $max_width = @$this->options['max_width'];
- $max_height = @$this->options['max_height'];
- $min_width = @$this->options['min_width'];
- $min_height = @$this->options['min_height'];
- if (($max_width || $max_height || $min_width || $min_height)
- && preg_match($this->options['image_file_types'], $file->name)) {
- list($img_width, $img_height) = $this->get_image_size($uploaded_file);
- }
- if (!empty($img_width)) {
- if ($max_width && $img_width > $max_width) {
- $file->error = $this->get_error_message('max_width');
- return false;
- }
- if ($max_height && $img_height > $max_height) {
- $file->error = $this->get_error_message('max_height');
- return false;
- }
- if ($min_width && $img_width < $min_width) {
- $file->error = $this->get_error_message('min_width');
- return false;
- }
- if ($min_height && $img_height < $min_height) {
- $file->error = $this->get_error_message('min_height');
- return false;
- }
- }
- return true;
- }
-
- protected function upcount_name_callback($matches) {
- $index = isset($matches[1]) ? intval($matches[1]) + 1 : 1;
- $ext = isset($matches[2]) ? $matches[2] : '';
- return ' ('.$index.')'.$ext;
- }
-
- protected function upcount_name($name) {
- return preg_replace_callback(
- '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/',
- array($this, 'upcount_name_callback'),
- $name,
- 1
- );
- }
-
- protected function get_unique_filename($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- while(is_dir($this->get_upload_path($name))) {
- $name = $this->upcount_name($name);
- }
- // Keep an existing filename if this is part of a chunked upload:
- $uploaded_bytes = $this->fix_integer_overflow(intval($content_range[1]));
- while(is_file($this->get_upload_path($name))) {
- if ($uploaded_bytes === $this->get_file_size(
- $this->get_upload_path($name))) {
- break;
- }
- $name = $this->upcount_name($name);
- }
- return $name;
- }
-
- protected function fix_file_extension($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- // Add missing file extension for known image types:
- if (strpos($name, '.') === false &&
- preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
- $name .= '.'.$matches[1];
- }
- if ($this->options['correct_image_extensions'] &&
- function_exists('exif_imagetype')) {
- switch(@exif_imagetype($file_path)){
- case IMAGETYPE_JPEG:
- $extensions = array('jpg', 'jpeg');
- break;
- case IMAGETYPE_PNG:
- $extensions = array('png');
- break;
- case IMAGETYPE_GIF:
- $extensions = array('gif');
- break;
- }
- // Adjust incorrect image file extensions:
- if (!empty($extensions)) {
- $parts = explode('.', $name);
- $extIndex = count($parts) - 1;
- $ext = strtolower(@$parts[$extIndex]);
- if (!in_array($ext, $extensions)) {
- $parts[$extIndex] = $extensions[0];
- $name = implode('.', $parts);
- }
- }
- }
- return $name;
- }
-
- protected function trim_file_name($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- // Remove path information and dots around the filename, to prevent uploading
- // into different directories or replacing hidden system files.
- // Also remove control characters and spaces (\x00..\x20) around the filename:
- $name = trim(basename(stripslashes($name)), ".\x00..\x20");
- // Use a timestamp for empty filenames:
- if (!$name) {
- $name = str_replace('.', '-', microtime(true));
- }
- return $name;
- }
-
- protected function get_file_name($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- $name = $this->trim_file_name($file_path, $name, $size, $type, $error,
- $index, $content_range);
- return $this->get_unique_filename(
- $file_path,
- $this->fix_file_extension($file_path, $name, $size, $type, $error,
- $index, $content_range),
- $size,
- $type,
- $error,
- $index,
- $content_range
- );
- }
-
- protected function handle_form_data($file, $index) {
- // Handle form data, e.g. $_REQUEST['description'][$index]
- }
-
- protected function get_scaled_image_file_paths($file_name, $version) {
- $file_path = $this->get_upload_path($file_name);
- if (!empty($version)) {
- $version_dir = $this->get_upload_path(null, $version);
- if (!is_dir($version_dir)) {
- mkdir($version_dir, $this->options['mkdir_mode'], true);
- }
- $new_file_path = $version_dir.'/'.$file_name;
- } else {
- $new_file_path = $file_path;
- }
- return array($file_path, $new_file_path);
- }
-
- protected function gd_get_image_object($file_path, $func, $no_cache = false) {
- if (empty($this->image_objects[$file_path]) || $no_cache) {
- $this->gd_destroy_image_object($file_path);
- $this->image_objects[$file_path] = $func($file_path);
- }
- return $this->image_objects[$file_path];
- }
-
- protected function gd_set_image_object($file_path, $image) {
- $this->gd_destroy_image_object($file_path);
- $this->image_objects[$file_path] = $image;
- }
-
- protected function gd_destroy_image_object($file_path) {
- $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ;
- return $image && imagedestroy($image);
- }
-
- protected function gd_imageflip($image, $mode) {
- if (function_exists('imageflip')) {
- return imageflip($image, $mode);
- }
- $new_width = $src_width = imagesx($image);
- $new_height = $src_height = imagesy($image);
- $new_img = imagecreatetruecolor($new_width, $new_height);
- $src_x = 0;
- $src_y = 0;
- switch ($mode) {
- case '1': // flip on the horizontal axis
- $src_y = $new_height - 1;
- $src_height = -$new_height;
- break;
- case '2': // flip on the vertical axis
- $src_x = $new_width - 1;
- $src_width = -$new_width;
- break;
- case '3': // flip on both axes
- $src_y = $new_height - 1;
- $src_height = -$new_height;
- $src_x = $new_width - 1;
- $src_width = -$new_width;
- break;
- default:
- return $image;
- }
- imagecopyresampled(
- $new_img,
- $image,
- 0,
- 0,
- $src_x,
- $src_y,
- $new_width,
- $new_height,
- $src_width,
- $src_height
- );
- return $new_img;
- }
-
- protected function gd_orient_image($file_path, $src_img) {
- if (!function_exists('exif_read_data')) {
- return false;
- }
- $exif = @exif_read_data($file_path);
- if ($exif === false) {
- return false;
- }
- $orientation = intval(@$exif['Orientation']);
- if ($orientation < 2 || $orientation > 8) {
- return false;
- }
- switch ($orientation) {
- case 2:
- $new_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2
- );
- break;
- case 3:
- $new_img = imagerotate($src_img, 180, 0);
- break;
- case 4:
- $new_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1
- );
- break;
- case 5:
- $tmp_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1
- );
- $new_img = imagerotate($tmp_img, 270, 0);
- imagedestroy($tmp_img);
- break;
- case 6:
- $new_img = imagerotate($src_img, 270, 0);
- break;
- case 7:
- $tmp_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2
- );
- $new_img = imagerotate($tmp_img, 270, 0);
- imagedestroy($tmp_img);
- break;
- case 8:
- $new_img = imagerotate($src_img, 90, 0);
- break;
- default:
- return false;
- }
- $this->gd_set_image_object($file_path, $new_img);
- return true;
- }
-
- protected function gd_create_scaled_image($file_name, $version, $options) {
- if (!function_exists('imagecreatetruecolor')) {
- error_log('Function not found: imagecreatetruecolor');
- return false;
- }
- list($file_path, $new_file_path) =
- $this->get_scaled_image_file_paths($file_name, $version);
- $type = strtolower(substr(strrchr($file_name, '.'), 1));
- switch ($type) {
- case 'jpg':
- case 'jpeg':
- $src_func = 'imagecreatefromjpeg';
- $write_func = 'imagejpeg';
- $image_quality = isset($options['jpeg_quality']) ?
- $options['jpeg_quality'] : 75;
- break;
- case 'gif':
- $src_func = 'imagecreatefromgif';
- $write_func = 'imagegif';
- $image_quality = null;
- break;
- case 'png':
- $src_func = 'imagecreatefrompng';
- $write_func = 'imagepng';
- $image_quality = isset($options['png_quality']) ?
- $options['png_quality'] : 9;
- break;
- default:
- return false;
- }
- $src_img = $this->gd_get_image_object(
- $file_path,
- $src_func,
- !empty($options['no_cache'])
- );
- $image_oriented = false;
- if (!empty($options['auto_orient']) && $this->gd_orient_image(
- $file_path,
- $src_img
- )) {
- $image_oriented = true;
- $src_img = $this->gd_get_image_object(
- $file_path,
- $src_func
- );
- }
- $max_width = $img_width = imagesx($src_img);
- $max_height = $img_height = imagesy($src_img);
- if (!empty($options['max_width'])) {
- $max_width = $options['max_width'];
- }
- if (!empty($options['max_height'])) {
- $max_height = $options['max_height'];
- }
- $scale = min(
- $max_width / $img_width,
- $max_height / $img_height
- );
- if ($scale >= 1) {
- if ($image_oriented) {
- return $write_func($src_img, $new_file_path, $image_quality);
- }
- if ($file_path !== $new_file_path) {
- return copy($file_path, $new_file_path);
- }
- return true;
- }
- if (empty($options['crop'])) {
- $new_width = $img_width * $scale;
- $new_height = $img_height * $scale;
- $dst_x = 0;
- $dst_y = 0;
- $new_img = imagecreatetruecolor($new_width, $new_height);
- } else {
- if (($img_width / $img_height) >= ($max_width / $max_height)) {
- $new_width = $img_width / ($img_height / $max_height);
- $new_height = $max_height;
- } else {
- $new_width = $max_width;
- $new_height = $img_height / ($img_width / $max_width);
- }
- $dst_x = 0 - ($new_width - $max_width) / 2;
- $dst_y = 0 - ($new_height - $max_height) / 2;
- $new_img = imagecreatetruecolor($max_width, $max_height);
- }
- // Handle transparency in GIF and PNG images:
- switch ($type) {
- case 'gif':
- case 'png':
- imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
- case 'png':
- imagealphablending($new_img, false);
- imagesavealpha($new_img, true);
- break;
- }
- $success = imagecopyresampled(
- $new_img,
- $src_img,
- $dst_x,
- $dst_y,
- 0,
- 0,
- $new_width,
- $new_height,
- $img_width,
- $img_height
- ) && $write_func($new_img, $new_file_path, $image_quality);
- $this->gd_set_image_object($file_path, $new_img);
- return $success;
- }
-
- protected function imagick_get_image_object($file_path, $no_cache = false) {
- if (empty($this->image_objects[$file_path]) || $no_cache) {
- $this->imagick_destroy_image_object($file_path);
- $image = new \Imagick();
- if (!empty($this->options['imagick_resource_limits'])) {
- foreach ($this->options['imagick_resource_limits'] as $type => $limit) {
- $image->setResourceLimit($type, $limit);
- }
- }
- $image->readImage($file_path);
- $this->image_objects[$file_path] = $image;
- }
- return $this->image_objects[$file_path];
- }
-
- protected function imagick_set_image_object($file_path, $image) {
- $this->imagick_destroy_image_object($file_path);
- $this->image_objects[$file_path] = $image;
- }
-
- protected function imagick_destroy_image_object($file_path) {
- $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ;
- return $image && $image->destroy();
- }
-
- protected function imagick_orient_image($image) {
- $orientation = $image->getImageOrientation();
- $background = new \ImagickPixel('none');
- switch ($orientation) {
- case \imagick::ORIENTATION_TOPRIGHT: // 2
- $image->flopImage(); // horizontal flop around y-axis
- break;
- case \imagick::ORIENTATION_BOTTOMRIGHT: // 3
- $image->rotateImage($background, 180);
- break;
- case \imagick::ORIENTATION_BOTTOMLEFT: // 4
- $image->flipImage(); // vertical flip around x-axis
- break;
- case \imagick::ORIENTATION_LEFTTOP: // 5
- $image->flopImage(); // horizontal flop around y-axis
- $image->rotateImage($background, 270);
- break;
- case \imagick::ORIENTATION_RIGHTTOP: // 6
- $image->rotateImage($background, 90);
- break;
- case \imagick::ORIENTATION_RIGHTBOTTOM: // 7
- $image->flipImage(); // vertical flip around x-axis
- $image->rotateImage($background, 270);
- break;
- case \imagick::ORIENTATION_LEFTBOTTOM: // 8
- $image->rotateImage($background, 270);
- break;
- default:
- return false;
- }
- $image->setImageOrientation(\imagick::ORIENTATION_TOPLEFT); // 1
- return true;
- }
-
- protected function imagick_create_scaled_image($file_name, $version, $options) {
- list($file_path, $new_file_path) =
- $this->get_scaled_image_file_paths($file_name, $version);
- $image = $this->imagick_get_image_object(
- $file_path,
- !empty($options['no_cache'])
- );
- if ($image->getImageFormat() === 'GIF') {
- // Handle animated GIFs:
- $images = $image->coalesceImages();
- foreach ($images as $frame) {
- $image = $frame;
- $this->imagick_set_image_object($file_name, $image);
- break;
- }
- }
- $image_oriented = false;
- if (!empty($options['auto_orient'])) {
- $image_oriented = $this->imagick_orient_image($image);
- }
- $new_width = $max_width = $img_width = $image->getImageWidth();
- $new_height = $max_height = $img_height = $image->getImageHeight();
- if (!empty($options['max_width'])) {
- $new_width = $max_width = $options['max_width'];
- }
- if (!empty($options['max_height'])) {
- $new_height = $max_height = $options['max_height'];
- }
- if (!($image_oriented || $max_width < $img_width || $max_height < $img_height)) {
- if ($file_path !== $new_file_path) {
- return copy($file_path, $new_file_path);
- }
- return true;
- }
- $crop = !empty($options['crop']);
- if ($crop) {
- $x = 0;
- $y = 0;
- if (($img_width / $img_height) >= ($max_width / $max_height)) {
- $new_width = 0; // Enables proportional scaling based on max_height
- $x = ($img_width / ($img_height / $max_height) - $max_width) / 2;
- } else {
- $new_height = 0; // Enables proportional scaling based on max_width
- $y = ($img_height / ($img_width / $max_width) - $max_height) / 2;
- }
- }
- $success = $image->resizeImage(
- $new_width,
- $new_height,
- isset($options['filter']) ? $options['filter'] : \imagick::FILTER_LANCZOS,
- isset($options['blur']) ? $options['blur'] : 1,
- $new_width && $new_height // fit image into constraints if not to be cropped
- );
- if ($success && $crop) {
- $success = $image->cropImage(
- $max_width,
- $max_height,
- $x,
- $y
- );
- if ($success) {
- $success = $image->setImagePage($max_width, $max_height, 0, 0);
- }
- }
- $type = strtolower(substr(strrchr($file_name, '.'), 1));
- switch ($type) {
- case 'jpg':
- case 'jpeg':
- if (!empty($options['jpeg_quality'])) {
- $image->setImageCompression(\imagick::COMPRESSION_JPEG);
- $image->setImageCompressionQuality($options['jpeg_quality']);
- }
- break;
- }
- if (!empty($options['strip'])) {
- $image->stripImage();
- }
- return $success && $image->writeImage($new_file_path);
- }
-
- protected function imagemagick_create_scaled_image($file_name, $version, $options) {
- list($file_path, $new_file_path) =
- $this->get_scaled_image_file_paths($file_name, $version);
- $resize = @$options['max_width']
- .(empty($options['max_height']) ? '' : 'X'.$options['max_height']);
- if (!$resize && empty($options['auto_orient'])) {
- if ($file_path !== $new_file_path) {
- return copy($file_path, $new_file_path);
- }
- return true;
- }
- $cmd = $this->options['convert_bin'];
- if (!empty($this->options['convert_params'])) {
- $cmd .= ' '.$this->options['convert_params'];
- }
- $cmd .= ' '.escapeshellarg($file_path);
- if (!empty($options['auto_orient'])) {
- $cmd .= ' -auto-orient';
- }
- if ($resize) {
- // Handle animated GIFs:
- $cmd .= ' -coalesce';
- if (empty($options['crop'])) {
- $cmd .= ' -resize '.escapeshellarg($resize.'>');
- } else {
- $cmd .= ' -resize '.escapeshellarg($resize.'^');
- $cmd .= ' -gravity center';
- $cmd .= ' -crop '.escapeshellarg($resize.'+0+0');
- }
- // Make sure the page dimensions are correct (fixes offsets of animated GIFs):
- $cmd .= ' +repage';
- }
- if (!empty($options['convert_params'])) {
- $cmd .= ' '.$options['convert_params'];
- }
- $cmd .= ' '.escapeshellarg($new_file_path);
- exec($cmd, $output, $error);
- if ($error) {
- error_log(implode('\n', $output));
- return false;
- }
- return true;
- }
-
- protected function get_image_size($file_path) {
- if ($this->options['image_library']) {
- if (extension_loaded('imagick')) {
- $image = new \Imagick();
- try {
- if (@$image->pingImage($file_path)) {
- $dimensions = array($image->getImageWidth(), $image->getImageHeight());
- $image->destroy();
- return $dimensions;
- }
- return false;
- } catch (Exception $e) {
- error_log($e->getMessage());
- }
- }
- if ($this->options['image_library'] === 2) {
- $cmd = $this->options['identify_bin'];
- $cmd .= ' -ping '.escapeshellarg($file_path);
- exec($cmd, $output, $error);
- if (!$error && !empty($output)) {
- // image.jpg JPEG 1920x1080 1920x1080+0+0 8-bit sRGB 465KB 0.000u 0:00.000
- $infos = preg_split('/\s+/', $output[0]);
- $dimensions = preg_split('/x/', $infos[2]);
- return $dimensions;
- }
- return false;
- }
- }
- if (!function_exists('getimagesize')) {
- error_log('Function not found: getimagesize');
- return false;
- }
- return @getimagesize($file_path);
- }
-
- protected function create_scaled_image($file_name, $version, $options) {
- if ($this->options['image_library'] === 2) {
- return $this->imagemagick_create_scaled_image($file_name, $version, $options);
- }
- if ($this->options['image_library'] && extension_loaded('imagick')) {
- return $this->imagick_create_scaled_image($file_name, $version, $options);
- }
- return $this->gd_create_scaled_image($file_name, $version, $options);
- }
-
- protected function destroy_image_object($file_path) {
- if ($this->options['image_library'] && extension_loaded('imagick')) {
- return $this->imagick_destroy_image_object($file_path);
- }
- }
-
- protected function is_valid_image_file($file_path) {
- if (!preg_match($this->options['image_file_types'], $file_path)) {
- return false;
- }
- if (function_exists('exif_imagetype')) {
- return @exif_imagetype($file_path);
- }
- $image_info = $this->get_image_size($file_path);
- return $image_info && $image_info[0] && $image_info[1];
- }
-
- protected function handle_image_file($file_path, $file) {
- $failed_versions = array();
- foreach($this->options['image_versions'] as $version => $options) {
- if ($this->create_scaled_image($file->name, $version, $options)) {
- if (!empty($version)) {
- $file->{$version.'Url'} = $this->get_download_url(
- $file->name,
- $version
- );
- } else {
- $file->size = $this->get_file_size($file_path, true);
- }
- } else {
- $failed_versions[] = $version ? $version : 'original';
- }
- }
- if (count($failed_versions)) {
- $file->error = $this->get_error_message('image_resize')
- .' ('.implode($failed_versions,', ').')';
- }
- // Free memory:
- $this->destroy_image_object($file_path);
- }
-
- protected function handle_file_upload($uploaded_file, $name, $size, $type, $error,
- $index = null, $content_range = null) {
- $file = new \stdClass();
- $file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error,
- $index, $content_range);
- $file->size = $this->fix_integer_overflow(intval($size));
- $file->type = $type;
- if ($this->validate($uploaded_file, $file, $error, $index)) {
- $this->handle_form_data($file, $index);
- $upload_dir = $this->get_upload_path();
- if (!is_dir($upload_dir)) {
- mkdir($upload_dir, $this->options['mkdir_mode'], true);
- }
- $file_path = $this->get_upload_path($file->name);
- $append_file = $content_range && is_file($file_path) &&
- $file->size > $this->get_file_size($file_path);
- if ($uploaded_file && is_uploaded_file($uploaded_file)) {
- // multipart/formdata uploads (POST method uploads)
- if ($append_file) {
- file_put_contents(
- $file_path,
- fopen($uploaded_file, 'r'),
- FILE_APPEND
- );
- } else {
- move_uploaded_file($uploaded_file, $file_path);
- }
- } else {
- // Non-multipart uploads (PUT method support)
- file_put_contents(
- $file_path,
- fopen('php://input', 'r'),
- $append_file ? FILE_APPEND : 0
- );
- }
- $file_size = $this->get_file_size($file_path, $append_file);
- if ($file_size === $file->size) {
- $file->url = $this->get_download_url($file->name);
- if ($this->is_valid_image_file($file_path)) {
- $this->handle_image_file($file_path, $file);
- }
- } else {
- $file->size = $file_size;
- if (!$content_range && $this->options['discard_aborted_uploads']) {
- unlink($file_path);
- $file->error = $this->get_error_message('abort');
- }
- }
- $this->set_additional_file_properties($file);
- }
- return $file;
- }
-
- protected function readfile($file_path) {
- $file_size = $this->get_file_size($file_path);
- $chunk_size = $this->options['readfile_chunk_size'];
- if ($chunk_size && $file_size > $chunk_size) {
- $handle = fopen($file_path, 'rb');
- while (!feof($handle)) {
- echo fread($handle, $chunk_size);
- @ob_flush();
- @flush();
- }
- fclose($handle);
- return $file_size;
- }
- return readfile($file_path);
- }
-
- protected function body($str) {
- echo $str;
- }
-
- protected function header($str) {
- header($str);
- }
-
- protected function get_server_var($id) {
- return isset($_SERVER[$id]) ? $_SERVER[$id] : '';
- }
-
- protected function generate_response($content, $print_response = true) {
- if ($print_response) {
- $json = json_encode($content);
- $redirect = isset($_REQUEST['redirect']) ?
- stripslashes($_REQUEST['redirect']) : null;
- if ($redirect) {
- $this->header('Location: '.sprintf($redirect, rawurlencode($json)));
- return;
- }
- $this->head();
- if ($this->get_server_var('HTTP_CONTENT_RANGE')) {
- $files = isset($content[$this->options['param_name']]) ?
- $content[$this->options['param_name']] : null;
- if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) {
- $this->header('Range: 0-'.(
- $this->fix_integer_overflow(intval($files[0]->size)) - 1
- ));
- }
- }
- $this->body($json);
- }
- return $content;
- }
-
- protected function get_version_param() {
- return isset($_GET['version']) ? basename(stripslashes($_GET['version'])) : null;
- }
-
- protected function get_singular_param_name() {
- return substr($this->options['param_name'], 0, -1);
- }
-
- protected function get_file_name_param() {
- $name = $this->get_singular_param_name();
- return isset($_REQUEST[$name]) ? basename(stripslashes($_REQUEST[$name])) : null;
- }
-
- protected function get_file_names_params() {
- $params = isset($_REQUEST[$this->options['param_name']]) ?
- $_REQUEST[$this->options['param_name']] : array();
- foreach ($params as $key => $value) {
- $params[$key] = basename(stripslashes($value));
- }
- return $params;
- }
-
- protected function get_file_type($file_path) {
- switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) {
- case 'jpeg':
- case 'jpg':
- return 'image/jpeg';
- case 'png':
- return 'image/png';
- case 'gif':
- return 'image/gif';
- default:
- return '';
- }
- }
-
- protected function download() {
- switch ($this->options['download_via_php']) {
- case 1:
- $redirect_header = null;
- break;
- case 2:
- $redirect_header = 'X-Sendfile';
- break;
- case 3:
- $redirect_header = 'X-Accel-Redirect';
- break;
- default:
- return $this->header('HTTP/1.1 403 Forbidden');
- }
- $file_name = $this->get_file_name_param();
- if (!$this->is_valid_file_object($file_name)) {
- return $this->header('HTTP/1.1 404 Not Found');
- }
- if ($redirect_header) {
- return $this->header(
- $redirect_header.': '.$this->get_download_url(
- $file_name,
- $this->get_version_param(),
- true
- )
- );
- }
- $file_path = $this->get_upload_path($file_name, $this->get_version_param());
- // Prevent browsers from MIME-sniffing the content-type:
- $this->header('X-Content-Type-Options: nosniff');
- if (!preg_match($this->options['inline_file_types'], $file_name)) {
- $this->header('Content-Type: application/octet-stream');
- $this->header('Content-Disposition: attachment; filename="'.$file_name.'"');
- } else {
- $this->header('Content-Type: '.$this->get_file_type($file_path));
- $this->header('Content-Disposition: inline; filename="'.$file_name.'"');
- }
- $this->header('Content-Length: '.$this->get_file_size($file_path));
- $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path)));
- $this->readfile($file_path);
- }
-
- protected function send_content_type_header() {
- $this->header('Vary: Accept');
- if (strpos($this->get_server_var('HTTP_ACCEPT'), 'application/json') !== false) {
- $this->header('Content-type: application/json');
- } else {
- $this->header('Content-type: text/plain');
- }
- }
-
- protected function send_access_control_headers() {
- $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']);
- $this->header('Access-Control-Allow-Credentials: '
- .($this->options['access_control_allow_credentials'] ? 'true' : 'false'));
- $this->header('Access-Control-Allow-Methods: '
- .implode(', ', $this->options['access_control_allow_methods']));
- $this->header('Access-Control-Allow-Headers: '
- .implode(', ', $this->options['access_control_allow_headers']));
- }
-
- public function head() {
- $this->header('Pragma: no-cache');
- $this->header('Cache-Control: no-store, no-cache, must-revalidate');
- $this->header('Content-Disposition: inline; filename="files.json"');
- // Prevent Internet Explorer from MIME-sniffing the content-type:
- $this->header('X-Content-Type-Options: nosniff');
- if ($this->options['access_control_allow_origin']) {
- $this->send_access_control_headers();
- }
- $this->send_content_type_header();
- }
-
- public function get($print_response = true) {
- if ($print_response && isset($_GET['download'])) {
- return $this->download();
- }
- $file_name = $this->get_file_name_param();
- if ($file_name) {
- $response = array(
- $this->get_singular_param_name() => $this->get_file_object($file_name)
- );
- } else {
- $response = array(
- $this->options['param_name'] => $this->get_file_objects()
- );
- }
- return $this->generate_response($response, $print_response);
- }
-
- public function post($print_response = true) {
- if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') {
- return $this->delete($print_response);
- }
- $upload = isset($_FILES[$this->options['param_name']]) ?
- $_FILES[$this->options['param_name']] : null;
- // Parse the Content-Disposition header, if available:
- $file_name = $this->get_server_var('HTTP_CONTENT_DISPOSITION') ?
- rawurldecode(preg_replace(
- '/(^[^"]+")|("$)/',
- '',
- $this->get_server_var('HTTP_CONTENT_DISPOSITION')
- )) : null;
- // Parse the Content-Range header, which has the following form:
- // Content-Range: bytes 0-524287/2000000
- $content_range = $this->get_server_var('HTTP_CONTENT_RANGE') ?
- preg_split('/[^0-9]+/', $this->get_server_var('HTTP_CONTENT_RANGE')) : null;
- $size = $content_range ? $content_range[3] : null;
- $files = array();
- if ($upload && is_array($upload['tmp_name'])) {
- // param_name is an array identifier like "files[]",
- // $_FILES is a multi-dimensional array:
- foreach ($upload['tmp_name'] as $index => $value) {
- $files[] = $this->handle_file_upload(
- $upload['tmp_name'][$index],
- $file_name ? $file_name : $upload['name'][$index],
- $size ? $size : $upload['size'][$index],
- $upload['type'][$index],
- $upload['error'][$index],
- $index,
- $content_range
- );
- }
- } else {
- // param_name is a single object identifier like "file",
- // $_FILES is a one-dimensional array:
- $files[] = $this->handle_file_upload(
- isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
- $file_name ? $file_name : (isset($upload['name']) ?
- $upload['name'] : null),
- $size ? $size : (isset($upload['size']) ?
- $upload['size'] : $this->get_server_var('CONTENT_LENGTH')),
- isset($upload['type']) ?
- $upload['type'] : $this->get_server_var('CONTENT_TYPE'),
- isset($upload['error']) ? $upload['error'] : null,
- null,
- $content_range
- );
- }
- return $this->generate_response(
- array($this->options['param_name'] => $files),
- $print_response
- );
- }
-
- public function delete($print_response = true) {
- $file_names = $this->get_file_names_params();
- if (empty($file_names)) {
- $file_names = array($this->get_file_name_param());
- }
- $response = array();
- foreach($file_names as $file_name) {
- $file_path = $this->get_upload_path($file_name);
- $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path);
- if ($success) {
- foreach($this->options['image_versions'] as $version => $options) {
- if (!empty($version)) {
- $file = $this->get_upload_path($file_name, $version);
- if (is_file($file)) {
- unlink($file);
- }
- }
- }
- }
- $response[$file_name] = $success;
- }
- return $this->generate_response($response, $print_response);
- }
-
-}
diff --git a/web/file_manager/fm_api.php b/web/file_manager/fm_api.php
index b8e40fa20..f4629794f 100644
--- a/web/file_manager/fm_api.php
+++ b/web/file_manager/fm_api.php
@@ -4,8 +4,6 @@
//error_reporting(NULL);
-session_start();
-
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
include($_SERVER['DOCUMENT_ROOT']."/file_manager/fm_core.php");
@@ -27,18 +25,34 @@ $fm->setRootDir($panel[$user]['HOME']);
$_REQUEST['action'] = empty($_REQUEST['action']) ? '' : $_REQUEST['action'];
switch ($_REQUEST['action']) {
+ case 'cd':
+ $dir = $_REQUEST['dir'];
+ print json_encode($fm->ls($dir));
+ break;
+ case 'check_file_type':
+ $dir = $_REQUEST['dir'];
+
+ print json_encode($fm->checkFileType($dir));
+ break;
case 'rename_file':
$dir = $_REQUEST['dir'];
$item = $_REQUEST['item'];
$target_name = $_REQUEST['target_name'];
- print json_encode($fm->renameItem($dir, $item, $target_name));
+ print json_encode($fm->renameFile($dir, $item, $target_name));
+ break;
+ case 'rename_directory':
+ $dir = $_REQUEST['dir'];
+ $item = $_REQUEST['item'];
+ $target_name = $_REQUEST['target_name'];
+
+ print json_encode($fm->renameDirectory($dir, $item, $target_name));
break;
case 'delete_files':
$dir = $_REQUEST['dir'];
$item = $_REQUEST['item'];
- print json_encode($fm->deleteItems($dir, $item));
+ print json_encode($fm->deleteItem($dir, $item));
break;
case 'create_file':
$dir = $_REQUEST['dir'];
@@ -50,19 +64,42 @@ switch ($_REQUEST['action']) {
$dirname = $_REQUEST['dirname'];
print json_encode($fm->createDir($dir, $dirname));
break;
- case 'cd':
- $dir = $_REQUEST['dir'];
- print json_encode($fm->ls($dir));
- break;
+
case 'open_file':
$dir = $_REQUEST['dir'];
print json_encode($fm->open_file($dir));
break;
- case 'copy_files':
+ case 'copy_file':
$dir = $_REQUEST['dir'];
$target_dir = $_REQUEST['dir_target'];
$filename = $_REQUEST['filename'];
- print json_encode($fm->copyFile($dir, $target_dir, $filename));
+ $item = $_REQUEST['item'];
+ print json_encode($fm->copyFile($item, $dir, $target_dir, $filename));
+ break;
+ case 'copy_directory':
+ $dir = $_REQUEST['dir'];
+ $target_dir = $_REQUEST['dir_target'];
+ $filename = $_REQUEST['filename'];
+ $item = $_REQUEST['item'];
+ print json_encode($fm->copyDirectory($item, $dir, $target_dir, $filename));
+ break;
+ case 'unpack_item':
+ $dir = $_REQUEST['dir'];
+ $target_dir = $_REQUEST['dir_target'];
+ $filename = $_REQUEST['filename'];
+ $item = $_REQUEST['item'];
+ print json_encode($fm->unpackItem($item, $dir, $target_dir, $filename));
+ break;
+ case 'pack_item':
+ $dir = $_REQUEST['dir'];
+ $target_dir = $_REQUEST['dir_target'];
+ $filename = $_REQUEST['filename'];
+ $item = $_REQUEST['item'];
+ print json_encode($fm->packItem($item, $dir, $target_dir, $filename));
+ break;
+ case 'backup':
+ $path = $_REQUEST['path'];
+ print json_encode($fm->backupItem($path));
break;
default:
//print json_encode($fm->init());
diff --git a/web/file_manager/fm_core.php b/web/file_manager/fm_core.php
index 61871b1bd..724368989 100644
--- a/web/file_manager/fm_core.php
+++ b/web/file_manager/fm_core.php
@@ -32,7 +32,7 @@ class FileManager {
$path = !empty($_REQUEST['dir']) ? $_REQUEST['dir'] : '';
$start_url = !empty($path) ? $this->ROOT_DIR . '/' . $path : $this->ROOT_DIR;
$listing = $this->getDirectoryListing($path);
-
+
return $data = array(
'result' => true,
'ROOT_DIR' => $this->ROOT_DIR,
@@ -42,6 +42,24 @@ class FileManager {
);
}*/
+ public function checkFileType($dir) {
+ $dir = $this->formatFullPath($dir);
+ exec(VESTA_CMD . "v-get-fs-file-type {$this->user} {$dir}", $output, $return_var);
+ $error = self::check_return_code($return_var, $output);
+ if (empty($error)) {
+ return array(
+ 'result' => true,
+ 'data' => implode('', $output)
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+
public function formatFullPath($path_part = '') {
if (substr($path_part, 0, strlen($this->ROOT_DIR)) === $this->ROOT_DIR) {
$path = $path_part;
@@ -50,11 +68,29 @@ class FileManager {
$path = $this->ROOT_DIR . '/' . $path_part;
}
//var_dump($path);die();
+ //$path = str_replace(' ', '\ ', $path);
return escapeshellarg($path);
}
- function deleteItems($dir, $item) {
- if (is_readable($item)) {
+ function deleteItem($dir, $item) {
+ $dir = $this->formatFullPath($item);
+ exec (VESTA_CMD . "v-delete-fs-directory {$this->user} {$dir}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
+ return array(
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+
+ /*if (is_readable($item)) {
unlink($item);
}
if (is_readable($item)) {
@@ -65,93 +101,239 @@ class FileManager {
}
return array(
'result' => true
- );
+ );*/
}
- function copyFile($dir, $target_dir, $filename) {
- // todo: checks
- // todo: vesta method "create file"
- if (empty($dir)) {
- $dir = $this->ROOT_DIR;
- }
+ function copyFile($item, $dir, $target_dir, $filename) {
+ $src = $this->formatFullPath($item);
+ $dst = $this->formatFullPath($target_dir);
+
+ exec (VESTA_CMD . "v-copy-fs-file {$this->user} {$src} {$dst}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
- if (empty($target_dir)) {
- $target_dir = $this->ROOT_DIR;
- }
- copy($dir . '/' . $filename, $target_dir.'/'.$filename);
-
- if (!is_readable($target_dir . '/' .$filename)) {
+ if (empty($error)) {
return array(
- 'result' => false,
- 'message' => 'item was not created'
+ 'result' => true
);
}
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+
+
+ function copyDirectory($item, $dir, $target_dir, $filename) {
+ $src = $this->formatFullPath($item);
+ $dst = $this->formatFullPath($target_dir);
+
+ exec (VESTA_CMD . "v-copy-fs-directory {$this->user} {$src} {$dst}", $output, $return_var);
+
+
+ $error = self::check_return_code($return_var, $output);
- return array(
- 'result' => true,
- 'bla' => $target_dir.'/'.$filename,
- 'bla2' => $dir . '/' . $filename
- );
+ if (empty($error)) {
+ return array(
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+
+ static function check_return_code($return_var, $output) {
+ if ($return_var != 0) {
+ $error = implode(' ', $output);
+ return $error;
+ //if (empty($error)) $error = __('Error code:',$return_var);
+ //$_SESSION['error_msg'] = $error;
+ }
+
+ return null;
}
function createFile($dir, $filename) {
- // todo: checks
- // todo: vesta method "create file"
- if (empty($dir)) {
- $dir = $this->ROOT_DIR;
- }
- file_put_contents($dir . '/' . $filename, '');
+ $dir = $this->formatFullPath($dir . '/' . $filename);
+
+ exec (VESTA_CMD . "v-add-fs-file {$this->user} {$dir}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
- if (!is_readable($dir . '/' .$filename)) {
+ if (empty($error)) {
return array(
- 'result' => false,
- 'message' => 'item was not created'
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
);
}
-
- return array(
- 'result' => true
- );
}
- function renameItem($dir, $item, $target_name) {
- if (empty($dir)) {
- $dir = $this->ROOT_DIR;
- }
- if (is_readable($dir . '/' . $item)) {
- rename($dir . '/' . $item, $dir . '/' . $target_name);
- }
- if (!is_readable($dir . '/' .$target_name)) {
+ function packItem($item, $dir, $target_dir, $filename) {
+ $item = $this->formatFullPath($item);
+ $dst_item = $this->formatFullPath($target_dir);
+
+ $dst_item = str_replace('.tar.gz', '', $dst_item);
+
+ //$item = str_replace($dir . '/', '', $item);
+//var_dump(VESTA_CMD . "v-add-fs-archive {$this->user} {$dst_item} {$item}");die();
+ exec (VESTA_CMD . "v-add-fs-archive {$this->user} {$dst_item} {$item}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
return array(
- 'result' => false,
- 'message' => 'item was not renamed'
+ 'result' => true
);
}
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+
+ function backupItem($item) {
- return array(
- 'result' => true
- );
+ $src_item = $this->formatFullPath($item);
+
+ $dst_item_name = $item . '~' . date('Ymd_His');
+
+ $dst_item = $this->formatFullPath($dst_item_name);
+
+//print VESTA_CMD . "v-add-fs-archive {$this->user} {$item} {$dst_item}";die();
+ exec (VESTA_CMD . "v-copy-fs-file {$this->user} {$src_item} {$dst_item}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
+ return array(
+ 'result' => true,
+ 'filename' => $dst_item_name
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
+ return array(
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+
+ function unpackItem($item, $dir, $target_dir, $filename) {
+ $item = $this->formatFullPath($item);
+ $dst_item = $this->formatFullPath($target_dir);
+
+ exec (VESTA_CMD . "v-extract-fs-archive {$this->user} {$item} {$dst_item}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
+ return array(
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+
+ function renameFile($dir, $item, $target_name) {
+ $item = $this->formatFullPath($dir . '/' . $item);
+ $dst_item = $this->formatFullPath($dir . '/' . $target_name);
+
+// var_dump(VESTA_CMD . "v-move-fs-file {$this->user} {$item} {$dst_item}");die();
+
+ exec (VESTA_CMD . "v-move-fs-file {$this->user} {$item} {$dst_item}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
+ return array(
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
+ }
+ function renameDirectory($dir, $item, $target_name) {
+ $item = $this->formatFullPath($dir . $item);
+ $dst_item = $this->formatFullPath($dir . $target_name);
+
+ if ($item == $dst_item) {
+ return array(
+ 'result' => true
+ );
+ }
+
+
+ exec (VESTA_CMD . "v-move-fs-directory {$this->user} {$item} {$dst_item}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
+
+ if (empty($error)) {
+ return array(
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
+ );
+ }
}
function createDir($dir, $dirname) {
- // todo: checks
- // todo: vesta method "create file"
- if (empty($dir)) {
- $dir = $this->ROOT_DIR;
- }
+ $dir = $this->formatFullPath($dir . '/' . $dirname);
- mkdir($dir . '/' . $dirname);
+ exec (VESTA_CMD . "v-add-fs-directory {$this->user} {$dir}", $output, $return_var);
+
+ $error = self::check_return_code($return_var, $output);
- if (!is_readable($dir . '/' .$dirname)) {
+ if (empty($error)) {
return array(
- 'result' => false,
- 'message' => 'item was not created'
+ 'result' => true
+ );
+ }
+ else {
+ return array(
+ 'result' => false,
+ 'message' => $error
);
}
-
- return array(
- 'result' => true
- );
}
function getDirectoryListing($dir = '') {
diff --git a/web/file_manager/index.php b/web/file_manager/index.php
index 3ae1295ef..8df684698 100644
--- a/web/file_manager/index.php
+++ b/web/file_manager/index.php
@@ -1,15 +1,3 @@
diff --git a/web/generate/ssl/index.php b/web/generate/ssl/index.php
index 2d093db2f..5ccc2f295 100644
--- a/web/generate/ssl/index.php
+++ b/web/generate/ssl/index.php
@@ -40,6 +40,7 @@ if (empty($_POST['v_country'])) $errors[] = __('country');
if (empty($_POST['v_state'])) $errors[] = __('domain');
if (empty($_POST['v_locality'])) $errors[] = __('city');
if (empty($_POST['v_org'])) $errors[] = __('organization');
+if (empty($_POST['v_email'])) $errors[] = __('email');
$v_domain = $_POST['v_domain'];
$v_email = $_POST['v_email'];
$v_country = $_POST['v_country'];
@@ -108,5 +109,3 @@ $_SESSION['back'] = $_SERVER['REQUEST_URI'];
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ssl.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
unset($_SESSION['ok_msg']);
-
-?>
diff --git a/web/hotkeys.html b/web/hotkeys.html
new file mode 100644
index 000000000..899272c21
--- /dev/null
+++ b/web/hotkeys.html
@@ -0,0 +1,489 @@
+
+Vesta Keyboard Shortcuts
+
+Keyboard Shortcuts
+
+
+ 1. Control Panel
+
+
+
+ ↑
+
+
+ Move cursor up
+
+
+
+
+ ↓
+
+
+ Move cursor down
+
+
+
+
+ 1
+
+
+ List user accounts / USER
+
+
+
+
+ 2
+
+
+ List web domains / WEB
+
+
+
+
+ 3
+
+
+ List dns domains / DNS
+
+
+
+
+ 4
+
+
+ List mail domains / MAIL
+
+
+
+
+ 5
+
+
+ List databases / DB
+
+
+
+
+ 6
+
+
+ List cron jobs / CRON
+
+
+
+
+ 7
+
+
+ List user backups / BACKUP
+
+
+
+
+ ctr + 1
+
+
+ List hosting packages / Packages
+
+
+
+
+ ctr + 2
+
+
+ List ip addresses / IP
+
+
+
+
+ ctr + 3
+
+
+ List rrd graphs / Grapsh
+
+
+
+
+ ctr + 4
+
+
+ List user stats / Statistics
+
+
+
+
+ ctr + 5
+
+
+ List user action log / Log
+
+
+
+
+ ctr + 6
+
+
+ List software updates / Updates
+
+
+
+
+ ctr + 7
+
+
+ List firewall rules / Firewall
+
+
+
+
+ ctr + 8
+
+
+ List services / Server
+
+
+
+
+ ctr + 9
+
+
+ List server status / CPU MEM NET DISK
+
+
+
+
+ ctr + 0
+
+
+ List user files / File Manager
+
+
+
+
+ f
+
+
+ Find user objects / Focus on search bar
+
+
+
+
+ h
+
+
+ Show help / Help
+
+
+
+
+ n
+
+
+ Add new object
+
+
+
+
+ e
+
+
+ Edit selected object
+
+
+
+
+ s
+
+
+ Suspend selected object
+
+
+
+
+ d
+
+
+ Delete selected object
+
+
+
+
+ ctr + a
+
+
+ Select/deselect all objects
+
+
+
+
+ shift + ↑
+
+
+ Select/deselect object above cursor
+
+
+
+
+ shift + ↓
+
+
+ Select/deselect object below cursor
+
+
+
+
+ ctrl + enter
+
+
+ Save form
+
+
+
+
+ ctrl + backspace
+
+
+ Go back to previous listing
+
+
+
+ 2. File Manager
+
+
+
+ tab
+
+
+ Switch between left and right file list
+
+
+
+
+ ←
+
+
+ Switch between left and right file list
+
+
+
+
+ →
+
+
+ Switch between left and right file list
+
+
+
+
+ ↑
+
+
+ Move cursor up
+
+
+
+
+ ↓
+
+
+ Move cursor down
+
+
+
+
+ insert
+
+
+ Select file or directory
+
+
+
+
+ space
+
+
+ Select file or directory (as INSERT)
+
+
+
+
+ shift + ↑
+
+
+ Select/deselect file above cursor
+
+
+
+
+ shift + ↓
+
+
+ Select/deselect file below cursor
+
+
+
+
+
+ enter
+
+
+ Change directory / run association action
+
+
+
+
+ ctr + a
+
+
+ Select all files and directories
+
+
+
+
+ ctr + c
+
+
+ Copy selected files from active tab to inactive
+
+
+
+
+ ctr + x
+
+
+ Cut selected files to clipboard
+
+
+
+
+ ctr + v
+
+
+ Paste from clipboard to current dir
+
+
+
+
+ ctr + m
+
+
+ Move selected files from active tab to inactive
+
+
+
+
+ ctr + d
+
+
+ Delete selected files
+
+
+
+
+ del
+
+
+ Delete selected files
+
+
+
+
+ n
+
+
+ Create new file
+
+
+
+
+ e
+
+
+ Edit selected file
+
+
+
+
+ r
+
+
+ Rename selected file
+
+
+
+
+ m
+
+
+ Move selected file
+
+
+
+
+ d
+
+
+ Delete selected file
+
+
+
+
+ g
+
+
+ Download selected file
+
+
+
+
+ f
+
+
+ Search file
+
+
+
+ 3. File Editor
+
+
+
+ ctr + s
+
+
+ Save file
+
+
+
+
+ ctr + n
+
+
+ New file
+
+
+
+
+ ctr + o
+
+
+ Open file
+
+
diff --git a/web/images/flat_icons.png b/web/images/flat_icons.png
index 631f3b3c5..b226a00a8 100644
Binary files a/web/images/flat_icons.png and b/web/images/flat_icons.png differ
diff --git a/web/images/in_progress.gif b/web/images/in_progress.gif
new file mode 100644
index 000000000..d6819abfb
Binary files /dev/null and b/web/images/in_progress.gif differ
diff --git a/web/images/sprite.png b/web/images/sprite.png
index f9ecf3896..4a3aeffcb 100644
Binary files a/web/images/sprite.png and b/web/images/sprite.png differ
diff --git a/web/images/vesta_logo.png b/web/images/vesta_logo.png
index 2e4793bb8..35eeea85f 100644
Binary files a/web/images/vesta_logo.png and b/web/images/vesta_logo.png differ
diff --git a/web/inc/i18n.php b/web/inc/i18n.php
new file mode 100644
index 000000000..1dab4cae4
--- /dev/null
+++ b/web/inc/i18n.php
@@ -0,0 +1,112 @@
+1) {
+ $args[0] = $text;
+ return call_user_func_array("sprintf",$args);
+ } else {
+ return $text;
+ }
+}
+
+/**
+ * Translates string by a given key in first parameter to current session language. Works like sprintf
+ * @global array $LANG Associative array of language pharses
+ * @return string Translated string
+ * @see _translate()
+ */
+function __() {
+ $args = func_get_args();
+ array_unshift($args,$_SESSION['language']);
+ return call_user_func_array("_translate",$args);
+}
+
+/**
+ * Detects user language from Accept-Language HTTP header.
+ * @param string Fallback language (default: 'en')
+ * @return string Language code (such as 'en' and 'ja')
+ */
+function detect_user_language($fallback='en') {
+ static $user_lang = '';
+
+ // Already detected
+ if (!empty($user_lang)) return $user_lang;
+
+ // Check if Accept-Language header is available
+ if (!isset($_SERVER) ||
+ !isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ||
+ !is_string($_SERVER['HTTP_ACCEPT_LANGUAGE'])
+ ) {
+ // Store result for reusing
+ $user_lang = $fallback;
+ return $user_lang;
+ }
+
+ // Sort Accept-Language by `q` value
+ $accept_langs = explode(',', preg_replace('/\s/', '', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'])));
+ $accept_langs_sorted = [];
+ foreach ($accept_langs as $lang) {
+ $div = explode(';q=', $lang, 2);
+ if (count($div) < 2) {
+ // `q` value was not specfied
+ // -> Set default `q` value (1)
+ $div[] = '1';
+ }
+ list($code, $q) = $div;
+ if (preg_match('/^[\w\-]+$/', $code)) {
+ // Acceptable language code
+ $accept_langs_sorted[$code] = (double)$q;
+ }
+ }
+ arsort($accept_langs_sorted);
+
+ // List languages
+ exec (VESTA_CMD."v-list-sys-languages json", $output, $return_var);
+ $languages = json_decode(implode('', $output), true);
+ unset($output);
+
+ // Find best matching language
+ foreach ($accept_langs_sorted as $user_lang => $dummy) {
+ $decision = '';
+ foreach ($languages as $prov_lang) {
+ if (strlen($decision) > strlen($prov_lang)) continue;
+ if (strpos($user_lang, $prov_lang) !== false) {
+ $decision = $prov_lang;
+ }
+ }
+ if (!empty($decision)) {
+ // Store result for reusing
+ $user_lang = $decision;
+ return $user_lang;
+ }
+ }
+
+ // Store result for reusing
+ $user_lang = $fallback;
+ return $user_lang;
+}
\ No newline at end of file
diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php
index f2747b161..ca9fbb1da 100644
--- a/web/inc/i18n/ar.php
+++ b/web/inc/i18n/ar.php
@@ -344,7 +344,8 @@ $LANG['ar'] = array(
'Comment' => 'تعليق',
'Banlist' => 'قائمة ممنوعة',
'ranges are acceptable' => 'نطاقات مقبولة',
- 'CDIR format is supported' => 'ويدعم صيغة CIDR',
+ 'CIDR format is supported' => 'ويدعم صيغة CIDR',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 حساب',
@@ -419,6 +420,7 @@ $LANG['ar'] = array(
'DELETE_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد حذف حكم %s?',
'SUSPEND_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد تعليق حكم %s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد إلغاء تعليق حكم %s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'هل أنت متأكد من أنك تريد إعادة تشغيل %s?',
'Welcome' => 'أهلا وسهلا',
@@ -493,5 +495,110 @@ $LANG['ar'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/bs.php b/web/inc/i18n/bs.php
index 79682fa3e..10c4c94db 100644
--- a/web/inc/i18n/bs.php
+++ b/web/inc/i18n/bs.php
@@ -342,6 +342,7 @@ $LANG['bs'] = array(
'Banlist' => 'Lista banovanih',
'ranges are acceptable' => 'rasponi su prihvatljivi',
'CIDR format is supported' => 'CIDR format je podržan',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 račun',
@@ -416,6 +417,7 @@ $LANG['bs'] = array(
'DELETE_RULE_CONFIRMATION' => 'Da li ste sigurni da želite obrisati pravilo #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Da li ste sigurni da želite obustaviti pravilo #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Da li ste sigurni da želite ponovo vratiti pravilo #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Da li ste sigurni da želite ponovno pokretanje %s?',
'Welcome' => 'Dobrodošli',
'LOGGED_IN_AS' => 'Ušli ste kao %s',
@@ -489,5 +491,108 @@ $LANG['bs'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Datum',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/cn.php b/web/inc/i18n/cn.php
index dfcacb2f8..2f4d89be2 100644
--- a/web/inc/i18n/cn.php
+++ b/web/inc/i18n/cn.php
@@ -1,498 +1,635 @@
'预设方案',
- 'IP' => 'IP管理',
- 'Graphs' => '流量统计',
- 'Statistics' => '统计分析',
- 'Log' => '日志',
- 'Server' => '服务器',
- 'Services' => '系统服务',
- 'Firewall' => '防火牆',
- 'Updates' => '更新升级',
- 'Log in' => '登录',
- 'Log out' => '退出',
+ 'Packages' => '预设方案',
+ 'IP' => 'IP 地址',
+ 'Graphs' => '资源图表',
+ 'Statistics' => '统计信息',
+ 'Log' => '系统日志',
+ 'Server' => '服务器',
+ 'Services' => '系统服务',
+ 'Firewall' => '防火墙',
+ 'Updates' => '系统更新',
+ 'Log in' => '登录',
+ 'Log out' => '登出',
- 'USER' => '用户管理',
- 'WEB' => '网站管理 ',
- 'DNS' => 'DNS管理',
- 'MAIL' => '邮箱管理',
- 'DB' => '数据库',
- 'CRON' => '计划任务',
- 'BACKUP' => '备份管理',
+ 'USER' => '用户账户',
+ 'WEB' => 'Web 服务',
+ 'DNS' => 'DNS 服务',
+ 'MAIL' => '邮箱服务',
+ 'DB' => '数据库',
+ 'CRON' => '定时任务',
+ 'BACKUP' => '数据备份',
- 'Add User' => '添加用户',
- 'Add Domain' => '添加域名',
+ 'Add User' => '添加用户',
+ 'Add Domain' => '添加域名',
'Add Web Domain' => '添加网站域名',
- 'Add DNS Domain' => '添加DNS域名',
- 'Add DNS Record' => '添加DNS记录',
- 'Add Mail Domain' => '添加邮箱域名',
- 'Add Mail Account' => '添加邮箱账户',
- 'Add Database' => '添加数据库',
- 'Add Cron Job' => '添加定时任务',
- 'Create Backup' => '创建备份',
- 'Configure' => '要配置',
- 'Restore All' => '恢复所有',
- 'Add Package' => '增加预设方案',
- 'Add IP' => '添加IP',
- 'Add Rule' => '添加規則',
- 'Ban IP Address' => '潘基文的IP地址',
- 'Search' => '搜索',
- 'Add one more FTP Account' => '增加一個FTP賬號',
- 'Overall Statistics' => '总体统计',
- 'Daily' => '日',
- 'Weekly' => '周',
- 'Monthly' => '月',
- 'Yearly' => '年',
- 'Add' => '增加',
- 'Back' => '返回',
- 'Save' => '保存',
- 'Submit' => '提交',
+ 'Add DNS Domain' => '添加DNS域名',
+ 'Add DNS Record' => '添加DNS记录',
+ 'Add Mail Domain' => '添加邮箱域名',
+ 'Add Mail Account' => '添加邮箱账户',
+ 'Add Database' => '添加数据库',
+ 'Add Cron Job' => '添加定时任务',
+ 'Create Backup' => '创建备份',
+ 'Configure' => '配置',
+ 'Restore All' => '全部恢复',
+ 'Add Package' => '添加方案',
+ 'Add IP' => '添加IP地址',
+ 'Add Rule' => '添加规则',
+ 'Ban IP Address' => '封锁IP地址',
+ 'Search' => '搜索',
+ 'Add one more FTP Account' => '增加一个FTP账户',
+ 'Overall Statistics' => '整体统计信息',
+ 'Daily' => '按天',
+ 'Weekly' => '按周',
+ 'Monthly' => '按月',
+ 'Yearly' => '按年',
+ 'Add' => '添加',
+ 'Back' => '返回',
+ 'Save' => '保存',
+ 'Submit' => '提交',
- 'toggle all' => '批量执行',
- 'apply to selected' => '应用到已选择',
- 'rebuild' => '重建',
- 'rebuild web' => '重建网站',
- 'rebuild dns' => '重建DNS',
- 'rebuild mail' => '重建邮箱',
- 'rebuild db' => '重建数据库',
- 'rebuild cron' => '重建定时任务',
- 'update counters' => '更新计数器',
- 'suspend' => '暂停',
- 'unsuspend' => '解除暂停',
- 'delete' => '删除',
- 'show per user' => '显示每个用户',
- 'login as' => '登录为',
- 'logout' => '退出',
- 'edit' => '修改',
- 'open webstats' => '打开webstats',
- 'view logs' => '查看日志',
- 'list records' => '列表 %s 记录',
- 'add record' => '增加记录',
- 'list accounts' => '列表 %s 账户',
- 'add account' => '添加账户',
- 'open webmail' => '打开网页邮箱',
- 'list fail2ban' => 'fail2ban的名單',
- 'open %s' => '打开 %s',
- 'download' => '下载',
- 'restore' => '恢复',
- 'configure restore settings' => '配置欢迎设置',
- 'stop' => '停止',
- 'start' => '开始',
- 'restart' => '重启',
- 'update' => '更新',
- 'generate' => '生成',
+ 'toggle all' => '批量操作',
+ 'apply to selected' => '应用于选中项的操作',
+ 'rebuild' => '重建',
+ 'rebuild web' => '重建网站',
+ 'rebuild dns' => '重建DNS',
+ 'rebuild mail' => '重建邮箱',
+ 'rebuild db' => '重建数据库',
+ 'rebuild cron' => '重建定时任务',
+ 'update counters' => '更新计数器',
+ 'suspend' => '暂停',
+ 'unsuspend' => '解除暂停',
+ 'delete' => '删除',
+ 'show per user' => '按用户显示',
+ 'login as' => '登录至账户',
+ 'logout' => '登出',
+ 'edit' => '编辑',
+ 'open webstats' => '打开网站统计',
+ 'view logs' => '查看日志',
+ 'list records' => '列出 %s 条记录',
+ 'add record' => '添加记录',
+ 'list accounts' => '列出 %s 个账户',
+ 'add account' => '添加账户',
+ 'open webmail' => '打开网页邮箱',
+ 'list fail2ban' => 'fail2ban 封锁名单',
+ 'open %s' => '打开 %s',
+ 'download' => '下载',
+ 'restore' => '恢复',
+ 'configure restore settings' => '配置恢复设置',
+ 'stop' => '停止',
+ 'start' => '启动',
+ 'restart' => '重新启动',
+ 'update' => '更新',
+ 'generate' => '生成',
'Generate CSR' => '生成CSR',
'reread IP' => '重新读取IP',
'enable autoupdate' => '启用自动更新',
- 'disable autoupdate' => '禁用自动更新',
- 'turn on notifications' => '開啟通知',
- 'turn off notifications' => '關閉通知',
+ 'disable autoupdate' => '停用自动更新',
+ 'turn on notifications' => '启用通知',
+ 'turn off notifications' => '停用通知',
- 'Adding User' => '添加用户',
- 'Editing User' => '修改用过',
- 'Adding Domain' => '添加域名',
- 'Editing Domain' => '修改域名',
- 'Adding DNS Domain' => '添加DNS域名',
- 'Editing DNS Domain' => '修改DNS域名',
- 'Adding DNS Record' => '添加DNS记录',
- 'Editing DNS Record' => '修改DNS记录',
- 'Adding Mail Domain' => '添加邮局域名',
- 'Editing Mail Domain' => '修改邮局域名',
- 'Adding Mail Account' => '添加邮箱账户',
- 'Editing Mail Account' => '修改邮箱账户',
- 'Adding database' => '添加数据',
- 'Editing Cron Job' => '修改定时任务',
- 'Adding Cron Job' => '添加定时任务',
- 'Editing Database' => '修改数据库',
- 'Adding Package' => '添加预设方案',
- 'Editing Package' => '修改预设方案',
- 'Adding IP address' => '添加IP地址',
- 'Editing IP Address' => '修改IP地址',
- 'Editing Backup Exclusions' => '编辑排除',
- 'Generating CSR' => '生成的CSR',
- 'Listing' => '列表',
- 'Search Results' => '搜索结果',
- 'Adding Firewall Rule' => '添加防火牆規則',
- 'Editing Firewall Rule' => '編輯防火牆規則',
- 'Adding IP Address to Banlist' => '添加IP地址黑名單',
+ 'Adding User' => '添加用户',
+ 'Editing User' => '编辑用户',
+ 'Adding Domain' => '添加域名',
+ 'Editing Domain' => '编辑域名',
+ 'Adding DNS Domain' => '添加DNS域名',
+ 'Editing DNS Domain' => '编辑DNS域名',
+ 'Adding DNS Record' => '添加DNS记录',
+ 'Editing DNS Record' => '编辑DNS记录',
+ 'Adding Mail Domain' => '添加邮箱域名',
+ 'Editing Mail Domain' => '编辑邮箱域名',
+ 'Adding Mail Account' => '添加邮箱账户',
+ 'Editing Mail Account' => '编辑邮箱账户',
+ 'Adding database' => '添加数据库',
+ 'Editing Cron Job' => '编辑定时任务',
+ 'Adding Cron Job' => '添加定时任务',
+ 'Editing Database' => '编辑数据库',
+ 'Adding Package' => '添加方案',
+ 'Editing Package' => '编辑方案',
+ 'Adding IP address' => '添加IP地址',
+ 'Editing IP Address' => '编辑IP地址',
+ 'Editing Backup Exclusions' => '配置备份排除项目',
+ 'Generating CSR' => '生成CSR',
+ 'Listing' => '列出',
+ 'Search Results' => '搜索结果',
+ 'Adding Firewall Rule' => '添加防火墙规则',
+ 'Editing Firewall Rule' => '编辑防火墙规则',
+ 'Adding IP Address to Banlist' => '添加IP至封锁名单',
- 'active' => '活跃',
- 'spnd' => '暂停',
- 'suspended' => '暂停',
- 'running' => '运行',
- 'stopped' => '停止',
- 'outdated' => '过期',
- 'updated' => '更新',
+ 'active' => '正常',
+ 'spnd' => '暂停',
+ 'suspended' => '已暂停',
+ 'running' => '运行中',
+ 'stopped' => '已停止',
+ 'outdated' => '可升级新版本',
+ 'updated' => '已是最新版本',
- 'yes' => '是',
- 'no' => '否',
- 'none' => 'none',
- 'pb' => 'PB',
- 'tb' => 'TB',
- 'gb' => 'GB',
- 'mb' => 'MB',
- 'minute' => '分钟',
- 'hour' => '小时',
- 'day' => '天',
- 'days' => '天',
- 'hours' => '小时',
- 'minutes' => '分',
- 'month' => '月',
- 'package' => '预设方案',
- 'Bandwidth' => '流量',
- 'Disk' => '硬盘',
- 'Web' => '网页',
- 'Mail' => '邮箱',
- 'Databases' => '数据库',
- 'User Directories' => '用户目录',
- 'Template' => '模板',
- 'Web Template' => 'Web模板',
- 'Backend Template' => 'Backend模板',
- 'Proxy Template' =>'Proxy模板',
- 'DNS Template' => 'DNS模板',
- 'Web Domains' => '网站域名',
- 'SSL Domains' => 'SSL域名',
- 'Web Aliases' => '网站别名',
- 'per domain' => '个域名',
- 'DNS Domains' => 'DNS域名',
- 'DNS Domains' => 'DNS域名',
- 'DNS records' => 'DNS记录' ,
- 'Name Servers' => 'Name Servers',
- 'Mail Domains' => '邮局域名',
- 'Mail Accounts' => '邮箱账户',
- 'Cron Jobs' => '定时任务',
- 'SSH Access' => 'SSH权限',
- 'IP Addresses' => 'IP地址',
- 'Backups' => '备份',
- 'Backup System' => '备份系统',
- 'backup exclusions' => '排除',
- 'template' => '模板',
- 'SSL Support' => 'SSL支持',
- 'SSL Home Directory' => 'SSL主目录',
- 'Proxy Support' => 'Proxy代理支持',
- 'Proxy Extensions' => 'Proxy扩展',
- 'Web Statistics' => 'Web统计',
- 'Additional FTP Account' => '其他FTP账户',
- 'SOA' => 'SOA',
- 'TTL' => 'TTL',
- 'Expire' => '过期',
- 'Records' => '记录',
- 'Catchall email' => '综合概括邮件',
- 'AntiVirus Support' => '反病毒支持',
- 'AntiSpam Support' => '反垃圾支持',
- 'DKIM Support' => 'DKIM支持',
- 'Accounts' => '账户',
- 'Quota' => '配额',
- 'Autoreply' => '自动回复',
- 'Forward to' => '转发到',
- 'Do not store forwarded mail' => '不保存转发邮件',
- 'database' => '数据库',
- 'User' => '用户',
- 'Host' => '主机',
- 'Charset' => '字符集编码',
- 'Min' => '分钟',
- 'Hour' => '小时',
- 'Day' => '天',
- 'Month' => '月',
- 'Day of week' => '星期几',
- 'local' => '本地',
- 'Run Time' => '运行时间',
- 'Backup Size' => '备份大小',
- 'SYS' => 'SYS',
- 'Domains' => '域名',
- 'Status' => '状态',
- 'shared' => '共享',
- 'dedicated' => '独立',
+ 'yes' => '是',
+ 'no' => '否',
+ 'none' => '无',
+ 'pb' => 'PB',
+ 'tb' => 'TB',
+ 'gb' => 'GB',
+ 'mb' => 'MB',
+ 'minute' => '分钟',
+ 'hour' => '小时',
+ 'day' => '天',
+ 'days' => '天',
+ 'hours' => '小时',
+ 'minutes' => '分钟',
+ 'month' => '月',
+ 'package' => '方案',
+ 'Bandwidth' => '流量',
+ 'Disk' => '磁盘空间',
+ 'Web' => '网站',
+ 'Mail' => '邮箱',
+ 'Databases' => '数据库',
+ 'User Directories' => '用户目录',
+ 'Template' => '模板',
+ 'Web Template' => 'Web模板',
+ 'Backend Template' => '后台模板',
+ 'Proxy Template' => '代理模板',
+ 'DNS Template' => 'DNS模板',
+ 'Web Domains' => '网站域名',
+ 'SSL Domains' => 'SSL域名',
+ 'Web Aliases' => '网站别名',
+ 'per domain' => '每域名',
+ 'DNS domains' => 'DNS域名',
+ 'DNS Domains' => 'DNS域名',
+ 'DNS records' => 'DNS记录' ,
+ 'Name Servers' => 'DNS服务器',
+ 'Mail Domains' => '邮箱域名',
+ 'Mail Accounts' => '邮箱账户',
+ 'Cron Jobs' => '定时任务',
+ 'SSH Access' => 'SSH权限',
+ 'IP Addresses' => 'IP地址',
+ 'Backups' => '备份',
+ 'Backup System' => '备份系统',
+ 'backup exclusions' => '备份排除项目',
+ 'template' => '模板',
+ 'SSL Support' => 'SSL支持',
+ 'SSL Home Directory' => 'SSL主目录',
+ 'Proxy Support' => '代理支持',
+ 'Proxy Extensions' => '代理扩展名',
+ 'Proxy Extentions' => '代理扩展名',
+ 'Web Statistics' => '网站统计',
+ 'Additional FTP Account' => '额外的FTP账户',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => '过期',
+ 'Records' => '记录',
+ 'Catchall email' => '收取未知邮件的邮箱',
+ 'AntiVirus Support' => '防病毒支持',
+ 'AntiSpam Support' => '防垃圾邮件支持',
+ 'DKIM Support' => 'DKIM支持',
+ 'Accounts' => '账户',
+ 'Quota' => '配额',
+ 'Autoreply' => '自动回复',
+ 'Forward to' => '转发到',
+ 'Do not store forwarded mail' => '不保留已转发的邮件',
+ 'database' => '数据库',
+ 'User' => '用户',
+ 'Host' => '主机',
+ 'Charset' => '编码',
+ 'Min' => '几分',
+ 'Hour' => '几点',
+ 'Day' => '几号',
+ 'Month' => '月份',
+ 'Day of week' => '星期几',
+ 'local' => '本地',
+ 'Run Time' => '运行时间',
+ 'Backup Size' => '备份大小',
+ 'SYS' => 'SYS',
+ 'Domains' => '域名',
+ 'Status' => '状态',
+ 'shared' => '共享',
+ 'dedicated' => '独立',
'Owner' => '归属',
- 'Users' => '用户',
- 'Load Average' => '平均负载',
- 'Memory Usage' => '内存使用',
- 'HTTPD Usage' => 'apache使用',
- 'NGINX Usage' => 'nginx使用',
- 'MySQL Usage on localhost' => '本地Mysql使用',
- 'PostgreSQL Usage on localhost' => '本地PostgreSQL使用',
- 'Bandwidth Usage eth0' => 'eth0流量使用',
- 'FTP Usage' => 'FTP使用',
- 'SSH Usage' => 'SSH使用',
- 'reverse proxy' => '反向代理',
- 'web server' => '网页服务器',
- 'dns server' => 'dns服务器',
- 'mail server' => '邮件服务器',
- 'pop/imap server' => 'pop/imap服务器',
- 'email antivirus' => '邮件杀毒',
- 'email antispam' => '反垃圾邮件',
- 'database server' => '数据库服务器',
- 'ftp server' => 'FTP服务器',
- 'job scheduler' => '定时调度',
- 'CPU' => '处理器',
- 'Memory' => '内存',
- 'Uptime' => '在线时间',
- 'core package' => '核心方案',
- 'php interpreter' => 'php 解释器',
- 'internal web server' => '内网网页服务器',
- 'Version' => '版本',
- 'Release' => '发布',
- 'Architecture' => 'Architecture',
- 'Object' => '兑现',
- 'Owner' => '归属',
- 'Username' => '用户名',
- 'Password' => '密码',
- 'Email' => '邮箱',
- 'Package' => '预设方案',
- 'Language' => '语言',
- 'First Name' => '姓',
- 'Last Name' => '名',
- 'Send login credentials to email address' => '发送登录凭据到电子邮件地址',
- 'Default Template' => '默认模板',
- 'Default Name Servers' => '默认NS服务器',
- 'Domain' => '域名',
- 'DNS Support' => 'DNS支持',
- 'Mail Support' => 'Mail支持',
- 'Advanced options' => '高级选项',
- 'Aliases' => '别名',
- 'SSL Certificate' => 'SSL证书',
- 'SSL Key' => 'SSL Key',
- 'SSL Certificate Authority / Intermediate' => 'SSL证书颁发机构 / 中级',
+ 'Users' => '用户',
+ 'Load Average' => '平均负载',
+ 'LoadAverage' => '平均负载',
+ 'Memory Usage' => '内存用量',
+ 'HTTPD Usage' => 'Apache用量',
+ 'APACHE2 Usage' => 'Apache2用量',
+ 'NGINX Usage' => 'NGINX用量',
+ 'MySQL Usage on localhost' => 'MySQL用量 (localhost)',
+ 'PostgreSQL Usage on localhost' => 'PostgreSQL用量 (localhost)',
+ 'Bandwidth Usage eth0' => '网络流量 (eth0)',
+ 'Bandwidth Usage eth1' => '网络流量 (eth1)',
+ 'Bandwidth Usage eth2' => '网络流量 (eth2)',
+ 'Exim Usage' => 'Exim用量',
+ 'FTP Usage' => 'FTP用量',
+ 'SSH Usage' => 'SSH用量',
+ 'reverse proxy' => '反向代理',
+ 'web server' => 'Web服务',
+ 'dns server' => 'DNS服务',
+ 'mail server' => '邮箱服务',
+ 'pop/imap server' => 'POP/IMAP服务',
+ 'email antivirus' => '邮箱防病毒',
+ 'email antispam' => '防垃圾邮件',
+ 'database server' => '数据库服务',
+ 'ftp server' => 'FTP服务',
+ 'job scheduler' => '执行定时任务',
+ 'firewall' => '防火墙',
+ 'brute-force monitor' => '监控暴力破解',
+ 'CPU' => 'CPU',
+ 'Memory' => '内存',
+ 'Uptime' => '已运行时间',
+ 'core package' => '核心系统',
+ 'php interpreter' => 'PHP解释器',
+ 'internal web server' => '内部Web服务',
+ 'Version' => '版本',
+ 'Release' => '发布号',
+ 'Architecture' => '架构',
+ 'Object' => '对象',
+ 'Owner' => '归属',
+ 'Username' => '用户名称',
+ 'Password' => '密码',
+ 'Email' => '电子邮箱',
+ 'Package' => '方案',
+ 'Language' => '语言',
+ 'First Name' => '名字',
+ 'Last Name' => '姓氏',
+ 'Send login credentials to email address' => '将登录信息发送到邮箱',
+ 'Default Template' => '默认模板',
+ 'Default Name Servers' => '默认DNS服务器',
+ 'Domain' => '域名',
+ 'DNS Support' => 'DNS支持',
+ 'Mail Support' => '邮箱支持',
+ 'Advanced options' => '高级选项',
+ 'Aliases' => '别名',
+ 'SSL Certificate' => 'SSL证书',
+ 'SSL Key' => 'SSL密钥',
+ 'SSL Certificate Authority / Intermediate' => 'SSL签发机构 / 中级',
'SSL CSR' => 'SSL CSR',
- 'optional' => '可选',
+ 'optional' => '可选',
'internal' => '内部',
- 'Statistics Authorization' => '统计授权',
- 'Statistics Auth' => '统计验证',
- 'Account' => '账户',
- 'Prefix will be automaticaly added to username' => '前缀 %s 会自动添加到用户名',
- 'Send FTP credentials to email' => '发送FTP凭证到邮箱',
- 'Expiration Date' => '到期日期',
- 'YYYY-MM-DD' => 'YYYY-MM-DD',
- 'Name servers' => 'NS服务器',
- 'Record' => '记录',
- 'IP or Value' => 'IP或值',
- 'Priority' => '优先级',
+ 'Statistics Authorization' => '统计授权',
+ 'Statistics Auth' => '统计验证',
+ 'Account' => '账户',
+ 'Prefix will be automaticaly added to username' => '前缀 %s 将会自动加入用户名称',
+ 'Send FTP credentials to email' => '将FTP登录信息发送到邮箱',
+ 'Expiration Date' => '到期日期',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
+ 'Name servers' => 'DNS服务器',
+ 'Record' => '记录',
+ 'IP or Value' => 'IP或值',
+ 'Priority' => '优先级',
'Record Number' => '记录编号',
- 'in megabytes' => '以MB为单位',
- 'Message' => '信息',
- 'use local-part' => '使用本地部分',
- 'one or more email addresses' => '一个或者更多邮箱地址',
- 'Prefix will be automaticaly added to database name and database user' => '前缀 %s 会自动增加到数据库用户名',
- 'Database' => '数据库',
- 'Type' => '类型',
- 'Minute' => '分钟',
- 'Command' => '命令',
- 'Package Name' => '方案名称',
- 'Netmask' => '子网掩码',
- 'Interface' => '接口',
- 'Shared' => '共享',
- 'Assigned user' => '分配用户',
- 'Assigned domain' => '分配域名',
- 'NAT IP association' => 'NAT IP association',
- 'shell' => '脚本',
- 'web domains' => '网站域名',
- 'web aliases' => '网站别名',
- 'dns records' => 'dns记录',
- 'mail domains' => '邮局域名',
- 'mail accounts' => '邮箱账户',
- 'accounts' => '账户',
- 'databases' => '数据库',
- 'cron jobs' => '定时任务',
- 'backups' => '备份',
- 'quota' => '配额',
- 'day of week' => '星期几',
- 'cmd' => 'cmd',
- 'users' => '用户',
- 'domains' => '域名',
- 'aliases' => '别名',
- 'records' => '记录',
- 'jobs' => '定时任务',
- 'username' => '用户名',
- 'password' => '密码',
- 'type' => '类型',
- 'charset' => '字符集编码',
- 'domain' => '域名',
- 'ip' => 'ip',
- 'ip address' => 'IP地址',
- 'IP address' => 'IP 地址',
- 'netmask' => '子网掩码',
- 'interface' => '网络接口',
- 'assigned user' => '分配用户',
- 'ns1' => 'ns1',
- 'ns2' => 'ns2',
- 'user' => '用户',
- 'email' => '邮箱',
- 'first name' => '姓',
- 'last name' => '名',
- 'account' => '账户',
- 'ssl certificate' => 'ssl证书',
- 'ssl key' => 'ssl密匙',
- 'stats user password' => '统计用户密码',
- 'stats username' => '统计用户名',
- 'stats password' => '统计密码',
- 'ftp user password' => 'ftp用户密码',
- 'ftp user' => 'ftp用户',
- 'Last 70 lines of %s.%s.log' => '最后70行 %s.%s.日志',
+ 'in megabytes' => '以MB为单位',
+ 'Message' => '信息',
+ 'use local-part' => '使用本地部分',
+ 'one or more email addresses' => '一个或更多邮箱地址',
+ 'Prefix will be automaticaly added to database name and database user' => '前缀 %s 将会自动加入数据库名称及用户名称',
+ 'Database' => '数据库',
+ 'Type' => '类型',
+ 'Minute' => '分钟',
+ 'Command' => '指令',
+ 'Package Name' => '方案名称',
+ 'Netmask' => '子网掩码',
+ 'Interface' => '网络接口',
+ 'Shared' => '共享',
+ 'Assigned user' => '指定用户',
+ 'Assigned domain' => '指定域名',
+ 'NAT IP association' => 'NAT IP 连接',
+ 'shell' => '脚本',
+ 'web domains' => '网站域名',
+ 'web aliases' => '网站别名',
+ 'dns records' => 'DNS记录',
+ 'mail domains' => '邮箱域名',
+ 'mail accounts' => '邮箱账户',
+ 'accounts' => '账户',
+ 'databases' => '数据库',
+ 'cron jobs' => '定时任务',
+ 'backups' => '备份',
+ 'quota' => '配额',
+ 'day of week' => '星期几',
+ 'cmd' => '指令',
+ 'users' => '用户',
+ 'domains' => '域名',
+ 'aliases' => '别名',
+ 'records' => '记录',
+ 'jobs' => '任务',
+ 'username' => '用户名称',
+ 'password' => '密码',
+ 'type' => '类型',
+ 'charset' => '编码',
+ 'domain' => '域名',
+ 'ip' => 'IP',
+ 'ip address' => 'IP地址',
+ 'IP address' => 'IP地址',
+ 'IP Address' => 'IP地址',
+ 'netmask' => '子网掩码',
+ 'interface' => '网络接口',
+ 'assigned user' => '指定用户',
+ 'ns1' => 'ns1',
+ 'ns2' => 'ns2',
+ 'user' => '用户',
+ 'email' => '邮箱',
+ 'first name' => '名字',
+ 'last name' => '姓氏',
+ 'account' => '账户',
+ 'ssl certificate' => 'SSL证书',
+ 'ssl key' => 'SSL密钥',
+ 'stats user password' => '统计用户账户密码',
+ 'stats username' => '统计用户名称',
+ 'stats password' => '统计密码',
+ 'ftp user password' => 'FTP用户账户密码',
+ 'ftp user' => 'FTP用户',
+ 'Last 70 lines of %s.%s.log' => '最后70行的 %s.%s.日志',
'Download AccessLog' => '下载访问日志',
'Download ErrorLog' => '下载错误日志',
- 'Country' => '国家‘',
- '2 letter code' => '2位短码:例如中国是CN/美国是US',
- 'State / Province' => '州/省',
- 'City / Locality' => '市/地区',
+ 'Country' => '国家',
+ '2 letter code' => '2位国家简码 (中国为CN / 美国为US)',
+ 'State / Province' => '州 / 省',
+ 'City / Locality' => '市 / 地区',
'Organization' => '组织名称',
- 'Action' => '動作',
- 'Protocol' => '協議',
- 'Port' => '港口',
- 'Comment' => '評論',
- 'Banlist' => '黑名單',
- 'ranges are acceptable' => '範圍是可以接受的',
+ 'Action' => '操作',
+ 'Protocol' => '协议',
+ 'Port' => '端口',
+ 'Comment' => '备注',
+ 'Banlist' => '需封锁',
+ 'ranges are acceptable' => '可使用范围 (如: 21-22)',
'CIDR format is supported' => '支持CIDR格式',
+ 'CDIR format is supported' => '支持CIDR格式',
+ 'Add one more Name Server' => '增加一个DNS服务器',
- 'unlimited' => 'unlimited',
- '1 account' => '1 账户',
- '%s accounts' => '%s 账户',
- '1 domain' => '1 域名',
- '%s domains' => '%s 域名',
- '1 record' => '1 记录',
- '%s records' => '%s 记录',
- '1 mail account' => '1 邮箱账户',
- '%s mail accounts' => '%s 邮箱账户',
- '1 database' => '1 数据库',
- '%s databases' => '%s 数据库',
- '1 cron job' => '1 定时任务',
- '%s cron jobs' => '%s 定时任务',
- '1 archive' => '1 档案',
- '%s archives' => '%s 档案',
- '1 package' => '1 预设方案',
- '%s packages' => '%s 预设方案',
- '1 IP address' => '1 IP地址',
- '%s IP addresses' => '%s IP地址',
- '1 month' => '1 月',
- '%s months' => '%s 月',
- '1 log record' => '1 日志记录',
- '%s log records' => '%s 日志记录',
- '1 object' => '1 对象',
- '%s objects' => '%s 对象',
- 'no exclusions' => '不排除',
- '1 rule' => '1規則',
- '%s rules' => '%s 規則',
- 'There are currently banned IP' => '目前尚無禁止的IP地址',
+ 'unlimited' => '无限',
+ '1 account' => '1 个账户',
+ '%s accounts' => '%s 个账户',
+ '1 domain' => '1 个域名',
+ '%s domains' => '%s 个域名',
+ '1 record' => '1 条记录',
+ '%s records' => '%s 条记录',
+ '1 mail account' => '1 个邮箱账户',
+ '%s mail accounts' => '%s 个邮箱账户',
+ '1 database' => '1 个数据库',
+ '%s databases' => '%s 个数据库',
+ '1 cron job' => '1 个任务',
+ '%s cron jobs' => '%s 个任务',
+ '1 archive' => '1 个存档',
+ '%s archives' => '%s 个存档',
+ '1 package' => '1 个方案',
+ '%s packages' => '%s 个方案',
+ '1 IP address' => '1 个IP地址',
+ '%s IP addresses' => '%s 个IP地址',
+ '1 month' => '1 个月',
+ '%s months' => '%s 个月',
+ '1 log record' => '1 条日志记录',
+ '%s log records' => '%s 条日志记录',
+ '1 object' => '1 个对象',
+ '%s objects' => '%s 个对象',
+ 'no exclusions' => '未排除',
+ '1 rule' => '1 条规则',
+ '%s rules' => '%s 条规则',
+ '1 items' => '1 个项目',
+ '%s items' => '%s 个项目',
+ 'There are no currently banned IP' => '目前没有已暂停的IP地址',
- 'USER_CREATED_OK' => 'User %s 已创建成功',
- 'WEB_DOMAIN_CREATED_OK' => 'Domain %s 已创建成功.',
- 'DNS_DOMAIN_CREATED_OK' => 'DNS domain %s 已创建成功.',
- 'DNS_RECORD_CREATED_OK' => 'Record %s.%s 已创建成功.',
- 'MAIL_DOMAIN_CREATED_OK' => 'Mail domain %s 已创建成功.',
- 'MAIL_ACCOUNT_CREATED_OK' => 'Mail account %s@%s 已创建成功',
- 'DATABASE_CREATED_OK' => 'Database %s 已创建成功',
- 'CRON_CREATED_OK' => 'Cron job 已创建成功.',
- 'IP_CREATED_OK' => 'IP address %s 已创建成功.',
- 'PACKAGE_CREATED_OK' => 'Package %s 已创建成功.',
- 'SSL_GENERATED_OK' => '证书已成功生成.',
- 'RULE_CREATED_OK' => '規則已成功創建',
- 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled',
- 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled',
- 'Cronjob email reporting has been successfully enabled' => '的cronjob電子郵件報告已成功啟用',
- 'Cronjob email reporting has been successfully disabled' => '的cronjob電子郵件報告已成功關閉',
- 'Changes has been saved.' => '更改已保存.',
- 'Confirmation' => 'Confirmation',
- 'DELETE_USER_CONFIRMATION' => '您确定删除用户 %s?',
- 'SUSPEND_USER_CONFIRMATION' => '你确定暂停用户 %s?',
- 'UNSUSPEND_USER_CONFIRMATION' => '您确定解除暂停用户 %s?',
- 'DELETE_DOMAIN_CONFIRMATION' => '您确定删除域名 %s?',
- 'SUSPEND_DOMAIN_CONFIRMATION' => '你确定暂停域名 %s?',
- 'UNSUSPEND_DOMAIN_CONFIRMATION' => '你确定解除暂停域名 %s?',
- 'DELETE_RECORD_CONFIRMATION' => '你确定删除记录 %s?',
- 'SUSPEND_RECORD_CONFIRMATION' => '你确定暂停记录 %s?',
- 'UNSUSPEND_RECORD_CONFIRMATION' => '你确定解除暂停记录 %s?',
- 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '你确定删除 %s?',
- 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '你确定暂停 %s?',
- 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '你确定解除暂停 %s?',
- 'DELETE_DATABASE_CONFIRMATION' => '你确定删除数据库 %s?',
- 'SUSPEND_DATABASE_CONFIRMATION' => '你确定暂停数据 %s?',
- 'UNSUSPEND_DATABASE_CONFIRMATION' => '你确定解除暂停数据库 %s?',
- 'DELETE_CRON_CONFIRMATION' => '你确定删除定时任务?',
- 'SUSPEND_CRON_CONFIRMATION' => '你确定暂停定时任务?',
- 'UNSUSPEND_CRON_CONFIRMATION' => '你确定解除暂停定时任务?',
- 'DELETE_BACKUP_CONFIRMATION' => '你确定删除 %s 备份?',
- 'DELETE_EXCLUSION_CONFIRMATION' => 'Are you sure to delete %s exclusion?',
- 'DELETE_PACKAGE_CONFIRMATION' => '你确定删除方案 %s?',
- 'DELETE_IP_CONFIRMATION' => '你确定删除IP地址 %s?',
- 'DELETE_RULE_CONFIRMATION' => '您確定要刪除規則 #%s?',
- 'SUSPEND_RULE_CONFIRMATION' => '您確定要暫停規則 #%s?',
- 'UNSUSPEND_RULE_CONFIRMATION' => '您確定要取消掛起規則 #%s?',
- 'RESTART_CONFIRMATION' => 'Are you sure you want to restart %s?',
- 'Welcome' => '欢迎光临',
- 'LOGGED_IN_AS' => '以用户身份 %s 登录',
- 'Error' => '错误',
- 'Invalid username or password' => '无效账号或密码',
- 'Invalid username or code' => '无效账户或者验证码',
- 'Passwords not match' => '密码不正确',
- 'Please enter valid email address.' => '请输入有效的邮箱.',
- 'Field "%s" can not be blank.' => '字段 "%s" 不能为空.',
- 'Password is too short.' => '密码太短 (最少为6位数大小写字母+数字)',
- 'Error code:' => '错误代码: %s',
- 'SERVICE_ACTION_FAILED' => '"%s" "%s" 字段',
- 'IP address is in use' => 'IP地址已被使用',
- 'BACKUP_SCHEDULED' => '任务已经被添加到队列中。当备份完成将会电子邮件通知您.',
- 'BACKUP_EXISTS' => '现有的备份已在运行,请等待该备份完成.',
- 'RESTORE_SCHEDULED' => '任务已经被添加到队列中。当备份完成将会电子邮件通知您.',
- 'RESTORE_EXISTS' => '现有的修复工作已在执行,请等待完成后再执行.',
+ 'USER_CREATED_OK' => '用户 %s 已添加成功',
+ 'WEB_DOMAIN_CREATED_OK' => '网站域名 %s 已添加成功',
+ 'DNS_DOMAIN_CREATED_OK' => 'DNS域名 %s 已添加成功',
+ 'DNS_RECORD_CREATED_OK' => '记录 %s.%s 已添加成功',
+ 'MAIL_DOMAIN_CREATED_OK' => '邮箱域名 %s 已添加成功',
+ 'MAIL_ACCOUNT_CREATED_OK' => '邮箱账户 %s@%s 已添加成功',
+ 'DATABASE_CREATED_OK' => '数据库 %s 已添加成功',
+ 'CRON_CREATED_OK' => '定时任务已添加成功',
+ 'IP_CREATED_OK' => 'IP地址 %s 已添加成功',
+ 'PACKAGE_CREATED_OK' => '方案 %s 已添加成功',
+ 'SSL_GENERATED_OK' => 'SSL证书已生成',
+ 'RULE_CREATED_OK' => '规则已创建成功',
+ 'Autoupdate has been successfully enabled' => '自动更新已成功启用',
+ 'Autoupdate has been successfully disabled' => '自动更新已成功关闭',
+ 'Cronjob email reporting has been successfully enabled' => '定时任务的电子邮件报告已成功启用',
+ 'Cronjob email reporting has been successfully disabled' => '定时任务的电子邮件报告已成功关闭',
+ 'Changes has been saved.' => '已保存更改',
+ 'Confirmation' => '确认',
+ 'DELETE_USER_CONFIRMATION' => '确定要删除用户 %s 吗?',
+ 'SUSPEND_USER_CONFIRMATION' => '确定要暂停用户 %s 吗?',
+ 'UNSUSPEND_USER_CONFIRMATION' => '确定要解除暂停用户 %s 吗?',
+ 'DELETE_DOMAIN_CONFIRMATION' => '确定要删除域名 %s 吗?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => '确定要暂停域名 %s 吗?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => '确定要解除暂停域名 %s 吗?',
+ 'DELETE_RECORD_CONFIRMATION' => '确定要删除记录 %s 吗?',
+ 'SUSPEND_RECORD_CONFIRMATION' => '确定要暂停记录 %s 吗?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => '确定要解除暂停记录 %s 吗?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '确定要删除 %s 吗?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '确定要暂停 %s 吗?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '确定要解除暂停 %s 吗?',
+ 'DELETE_DATABASE_CONFIRMATION' => '确定要删除数据库 %s 吗?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => '确定要暂停数据库 %s 吗?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => '确定要解除暂停数据库 %s 吗?',
+ 'DELETE_CRON_CONFIRMATION' => '确定要删除定时任务吗?',
+ 'SUSPEND_CRON_CONFIRMATION' => '确定要暂停定时任务吗?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => '确定要解除暂停定时任务吗?',
+ 'DELETE_BACKUP_CONFIRMATION' => '确定要删除 %s 备份吗?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => '确定要删除 %s 例外吗?',
+ 'DELETE_PACKAGE_CONFIRMATION' => '确定要删除方案 %s 吗?',
+ 'DELETE_IP_CONFIRMATION' => '确定要删除IP地址 %s 吗?',
+ 'DELETE_RULE_CONFIRMATION' => '确定要删除规则 #%s 吗?',
+ 'SUSPEND_RULE_CONFIRMATION' => '确定要暂停规则 #%s 吗?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => '确定要解除暂停规则 #%s 吗?',
+ 'LEAVE_PAGE_CONFIRMATION' => '确定要离开当前页吗?',
+ 'RESTART_CONFIRMATION' => '确定要重新启动 %s 吗?',
+ 'Welcome' => '欢迎',
+ 'LOGGED_IN_AS' => '以用户身份 %s 登录',
+ 'Error' => '错误',
+ 'Invalid username or password' => '无效的用户名称或密码',
+ 'Invalid username or code' => '无效的用户名称或验证码.',
+ 'Passwords not match' => '密码错误',
+ 'Please enter valid email address.' => '请输入正确的邮箱',
+ 'Field "%s" can not be blank.' => '"%s" 不能为空',
+ 'Password is too short.' => '密码太短 (至少为6个数字+字母)',
+ 'Error code:' => '错误代码: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" 失败',
+ 'IP address is in use' => 'IP地址在使用中',
+ 'BACKUP_SCHEDULED' => '您的要求已加入队列中,备份完成后会以电子邮件通知您 ',
+ 'BACKUP_EXISTS' => '已经有一个备份正在执行,请等待备份完成后再操作',
+ 'RESTORE_SCHEDULED' => '您的要求已加入队列中,恢复完成后会以电子邮件通知您',
+ 'RESTORE_EXISTS' => '已经有一个恢复正在执行,请等待恢复完成后再操作',
- 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp",
- 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *",
- 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster",
- 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *",
- 'CRON_EXCLUSIONS' => "To exclude all jobs use *",
- 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *",
+ 'WEB_EXCLUSIONS' => "输入域名,每行一个。要排除所有域名请使用 *。要排除特定目录使用以下格式: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "输入域名,每行一个。要排除所有域名请使用 *",
+ 'MAIL_EXCLUSIONS' => "输入域名,每行一个。要排除所有域名请使用 *。要排除特定帐户使用以下格式: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "输入完整数据库名称,每行一个。要排除所有数据库请使用 *",
+ 'CRON_EXCLUSIONS' => "要排除所有任务请使用 *",
+ 'USER_EXCLUSIONS' => "输入目录名称,每行一个。要排除所有目录请使用 *",
- 'Welcome to Vesta Control Panel' => '欢迎来到Vesta管理面板',
- 'MAIL_FROM' => 'Vesta管理面板 ',
+ 'Welcome to Vesta Control Panel' => '欢迎来到 Vesta 管理系统',
+ 'MAIL_FROM' => 'Vesta 管理系统 ',
'GREETINGS_GORDON_FREEMAN' => "您好, %s %s,\n",
'GREETINGS' => "您好,\n",
- 'ACCOUNT_READY' => "您的帐户已创建可以使用.\n\nhttps://%s/login/\n用户名: %s\n密码: %s\n\n",
+ 'ACCOUNT_READY' => "您的账户已创建成功,并可以开始使用了!\n\nhttps://%s/login/\n用户名称: %s\n密码: %s\n\n--\nVesta Control Panel\n",
- 'FTP login credentials' => 'FTP登录资料',
- 'FTP_ACCOUNT_READY' => "FTP帐户已创建可以使用.\n\n主机名: %s\n用户名: %s_%s\n密码: %s\n\n",
+ 'FTP login credentials' => 'FTP 登录信息',
+ 'FTP_ACCOUNT_READY' => "FTP账户已创建成功,并可以开始使用了!\n\n主机名称: %s\n用户名称: %s_%s\n密码: %s\n\n--\nVesta Control Panel\n",
- 'Database Credentials' => '数据库账户资料',
- 'DATABASE_READY' => "数据库已创建成功.\n\n数据库名: %s\n用户: %s\n密码: %s\n%s\n\n",
+ 'Database Credentials' => "数据库登录信息",
+ 'DATABASE_READY' => "数据库已添加成功!\n\n数据库名称: %s\n用户名称: %s\n密码: %s\n%s\n\n--\nVesta Control Panel\n",
- 'forgot password' => '忘记密码',
- 'Confirm' => '确认',
- 'New Password' => '新密码',
- 'Confirm Password' => '确认密码',
- 'Reset' => '重置',
- 'Reset Code' => '重置代码',
- 'RESET_NOTICE' => '',
- 'RESET_CODE_SENT' => '密码重置代码已发送到您的邮箱 ',
- 'MAIL_RESET_SUBJECT' => '密码重置在 %s',
- 'PASSWORD_RESET_REQUEST' => "重置面板密码请点击链接:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 输入重置验证代码:\n%s\n\n如果您没有要求重设密码,请忽略此消息.",
+ 'forgot password' => '忘记密码',
+ 'Confirm' => '确认',
+ 'New Password' => '新密码',
+ 'Confirm Password' => '确认密码',
+ 'Reset' => '重置',
+ 'Reset Code' => '重置代码',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => '密码重置代码已发送到您的邮箱 ',
+ 'MAIL_RESET_SUBJECT' => '密码重置在 %s',
+ 'PASSWORD_RESET_REQUEST' => '重置密码请点击链接:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 输入密码重置代码:\n%s\n\n如果您没有要求重置密码,请忽略此邮件\n\n--\nVesta Control Panel\n',
- 'Jan' => 'Jan',
- 'Feb' => 'Feb',
- 'Mar' => 'Mar',
- 'Apr' => 'Apr',
- 'May' => 'May',
- 'Jun' => 'Jun',
- 'Jul' => 'Jul',
- 'Aug' => 'Aug',
- 'Sep' => 'Sep',
- 'Oct' => 'Oct',
- 'Nov' => 'Nov',
- 'Dec' => 'Dec',
+ 'Jan' => '01月',
+ 'Feb' => '02月',
+ 'Mar' => '03月',
+ 'Apr' => '04月',
+ 'May' => '05月',
+ 'Jun' => '06月',
+ 'Jul' => '07月',
+ 'Aug' => '08月',
+ 'Sep' => '09月',
+ 'Oct' => '10月',
+ 'Nov' => '11月',
+ 'Dec' => '12月',
- 'Configuring Server' => 'Configuring Server',
- 'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
- 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
- 'Reseller Role' => 'Reseller Role',
- 'Web Config Editor' => 'Web Config Editor',
- 'Template Manager' => 'Template Manager',
- 'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
+ 'Configuring Server' => '配置服务器',
+ 'Hostname' => '主机名称',
+ 'Time Zone' => '时区',
+ 'Default Language' => '默认语言',
+ 'FileSystem Disk Quota' => '文件系统磁盘配额',
+ 'Vesta Control Panel Plugins' => 'Vesta 管理系统的插件',
+ 'Proxy Server' => '代理服务器',
+ 'Web Server' => 'Web服务器',
+ 'DNS Server' => 'DNS服务器',
+ 'DNS Cluster' => 'DNS集群',
+ 'MAIL Server' => '邮箱服务器',
+ 'Antivirus' => '防病毒引擎',
+ 'AntiSpam' => '防垃圾邮件',
+ 'Webmail URL' => '设置网页邮箱网址',
+ 'MySQL Support' => 'MySQL 支持',
+ 'phpMyAdmin URL' => '设置 phpMyAdmin 网址',
+ 'Maximum Number Of Databases' => '数据库最大数量',
+ 'Current Number Of Databases' => '数据库当前数量',
+ 'PostgreSQL Support' => 'PostgreSQL 支持',
+ 'Local backup' => '本地备份',
+ 'Compression level' => '压缩级别',
+ 'Directory' => '目录',
+ 'Remote backup' => '远程备份',
+ 'preview' => '预览',
+ 'Reseller Role' => '作为经销商',
+ 'Web Config Editor' => '网络配置编辑器',
+ 'Template Manager' => '模板管理',
+ 'Backup Migration Manager' => '备份迁移管理',
+ 'FileManager' => '文件管理',
+ 'show: CPU / MEM / NET / DISK' => '显示: CPU / MEM / NET / DISK',
+ 'MEMORY' => '内存',
+ 'DISK' => '磁盘',
+ 'NETWORK' => '网络',
-);
\ No newline at end of file
+ 'sort by' => '排序方式',
+ 'Date' => '日期',
+ 'Starred' => '星标',
+ 'Name' => '名称',
+
+ 'File Manager' => '文件管理',
+ 'type' => '类型',
+ 'size' => '大小',
+ 'date' => '日期',
+ 'name' => '名称',
+ 'Initializing' => '初始化中',
+ 'UPLOAD' => '上传',
+ 'NEW FILE' => '新建文件',
+ 'NEW DIR' => '新建目录',
+ 'DELETE' => '删除',
+ 'RENAME' => '重命名',
+ 'COPY' => '复制',
+ 'ARCHIVE' => '存档',
+ 'EXTRACT' => '提取',
+ 'DOWNLOAD' => '下载',
+ 'Hit' => '再次按下',
+ 'to reload the page' => '键则刷新此页面',
+ 'Directory name cannot be empty' => '目录名称不能为空',
+ 'File name cannot be empty' => '文件名称不能为空',
+ 'No file selected' => '没有文件被选中',
+ 'No file or folder selected' => '没有文件或目录被选中',
+ 'File type not supported' => '不支持的文件类型',
+ 'Directory download not available in current version' => '目录下载在当前版本中不可用',
+ 'Directory not available' => '目录不可用',
+ 'Done' => '完成',
+ 'Close' => '关闭',
+ 'Copy' => '复制',
+ 'Cancel' => '取消',
+ 'Rename' => '重命名',
+ 'Delete' => '删除',
+ 'Extract' => '提取',
+ 'Create' => '创建',
+ 'Compress' => '压缩',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => '你确定要复制',
+ 'Are you sure you want to delete' => '你确定要删除',
+ 'into' => '到',
+ 'existing files will be replaced' => '现有文件将被替换',
+ 'Original name' => '原有名称',
+ 'File' => '文件',
+ 'already exists' => '已经存在',
+ 'Create file' => '创建文件',
+ 'Create directory' => '创建目录',
+
+
+ 'Add New object' => '添加新对象',
+ 'Save Form' => '保存表单',
+ 'Cancel saving form' => '取消保存表单',
+ 'Go to USER list' => '转到用户账户',
+ 'Go to WEB list' => '转到Web服务',
+ 'Go to DNS list' => '转到DNS服务',
+ 'Go to MAIL list' => '转到邮箱服务',
+ 'Go to DB list' => '转到数据库',
+ 'Go to CRON list' => '转到定时任务',
+ 'Go to BACKUP list' => '转到数据备份',
+ 'Focus on search' => '光标定位到搜索栏',
+ 'Display/Close shortcuts' => '显示/关闭 快捷键',
+ 'Move backward through top menu' => '在顶部菜单栏向前定位光标',
+ 'Move forward through top menu' => '在顶部菜单栏向后定位光标',
+ 'Enter focused element' => '转到被光标定位的菜单项',
+
+ 'Upload' => '上传',
+ 'New File' => '新建文件',
+ 'New Folder' => '新建目录',
+ 'Download' => '下载',
+ 'Rename' => '重命名',
+ 'Copy' => '复制',
+ 'Archive' => '存档',
+ 'Delete' => '删除',
+ 'Save File (in text editor)' => '保存文件 (在文本编辑器内)',
+ 'Close Popup / Cancel' => '关闭弹窗 / 取消',
+ 'Move Cursor Up' => '上移光标',
+ 'Move Cursor Down' => '下移光标',
+ 'Switch to Left Tab' => '切换到左标签',
+ 'Switch to Right Tab' => '切换到右标签',
+ 'Switch Tab' => '切换标签',
+ 'Go to the Top of the File List' => '转至文件列表顶部',
+ 'Go to the Last File' => '转至最后一个文件',
+ 'Open File / Enter Directory' => '打开文件 / 进入目录',
+ 'Go to Parent Directory' => '转至父目录',
+ 'Select Current File' => '选中当前文件',
+ 'Select Bunch of Files' => '选择多个文件',
+ 'Add File to the Current Selection' => '将文件添加到当前选中区内',
+ 'Select All Files' => '选择所有文件',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => '快捷键的灵感来自旖旎的 GNU Midnight Commander 文件管理器',
+
+ 'Licence Key' => '许可密匙',
+ 'Enter License Key' => '输入许可密匙',
+ 'Buy Licence' => '购买许可',
+ 'Buy Lifetime License' => '购买终身许可',
+ 'Disable and Cancel Licence' => '停用并取消许可',
+ 'Licence Activated' => '许可已激活',
+ 'Licence Deactivated' => '许可已停用',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => '限制用户,使他们不能使用 SSH 只能访问自己的主目录。',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => '功能全面的文件管理器,浏览,复制,编辑,查看和检索你的 Web 文件。',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => '这是商业模块,你需要购买许可密匙来启用它。'
+
+);
diff --git a/web/inc/i18n/cz.php b/web/inc/i18n/cz.php
index b891de35b..a8a8b078d 100644
--- a/web/inc/i18n/cz.php
+++ b/web/inc/i18n/cz.php
@@ -348,6 +348,7 @@ $LANG['cz'] = array(
'Banlist' => 'Banlist',
'ranges are acceptable' => 'rozsahy jsou přijatelné',
'CIDR format is supported' => 'Formát CIDR je podporován',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 účet',
@@ -422,6 +423,7 @@ $LANG['cz'] = array(
'DELETE_RULE_CONFIRMATION' => 'Opravdu chcete odstranit pravidlo #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Opravdu chcete pozastavit pravidlo #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Opravdu chcete odblokovat pravidlo #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Opravdu chcete restartovat %s?',
'Welcome' => 'Vítejte!',
'LOGGED_IN_AS' => 'Přihlášen jako uživatel %s',
@@ -495,5 +497,108 @@ $LANG['cz'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/da.php b/web/inc/i18n/da.php
new file mode 100644
index 000000000..575448436
--- /dev/null
+++ b/web/inc/i18n/da.php
@@ -0,0 +1,605 @@
+ 'Pakker',
+ 'IP' => 'IP',
+ 'Graphs' => 'Grafer',
+ 'Statistics' => 'Statistik',
+ 'Log' => 'Log',
+ 'Server' => 'Server',
+ 'Services' => 'Services',
+ 'Firewall' => 'Firewall',
+ 'Updates' => 'Opdateringer',
+ 'Log in' => 'Log ind',
+ 'Log out' => 'Log ud',
+
+ 'USER' => 'BRUGER',
+ 'WEB' => 'WEB',
+ 'DNS' => 'DNS',
+ 'MAIL' => 'MAIL',
+ 'DB' => 'DB',
+ 'CRON' => 'CRON',
+ 'BACKUP' => 'BACKUP',
+
+ 'Add User' => '',
+ 'Add Domain' => 'Tilføj Domæne',
+ 'Add Web Domain' => 'Tilføj Web Domæne',
+ 'Add DNS Domain' => 'Tilføj DNS Domæne',
+ 'Add DNS Record' => 'Tilføj DNS Record',
+ 'Add Mail Domain' => 'Tilføj Mail Domæne',
+ 'Add Mail Account' => 'Tilføj Mail Konto',
+ 'Add Database' => 'Tilføj Database',
+ 'Add Cron Job' => 'Tilføj Cron Job',
+ 'Create Backup' => 'Opret Backup',
+ 'Configure' => 'Konfigurér',
+ 'Restore All' => 'Genskab Alle',
+ 'Add Package' => 'Tilføj Pakke',
+ 'Add IP' => 'Tilføj IP-Addresse',
+ 'Add Rule' => 'Tilføj Regel',
+ 'Ban IP Address' => 'Ban IP-Addresse',
+ 'Search' => 'Search',
+ 'Add one more FTP Account' => 'Tilføj en FTP-Konto mere',
+ 'Overall Statistics' => 'Overordnet Statistik',
+ 'Daily' => 'Daglig',
+ 'Weekly' => 'Ugentlig',
+ 'Monthly' => 'Månedlig',
+ 'Yearly' => 'Årlig',
+ 'Add' => 'Tilføj',
+ 'Back' => 'Tilbage',
+ 'Save' => 'Gem',
+ 'Submit' => 'Send',
+
+ 'toggle all' => 'skift alle',
+ 'apply to selected' => 'udfør på valgte',
+ 'rebuild' => 'genskab',
+ 'rebuild web' => 'genskab web',
+ 'rebuild dns' => 'genskab dns',
+ 'rebuild mail' => 'genskab mail',
+ 'rebuild db' => 'genskab db',
+ 'rebuild cron' => 'genskab cron',
+ 'update counters' => 'opdater tællere',
+ 'suspend' => 'suspendér',
+ 'unsuspend' => 'afsuspendér',
+ 'delete' => 'slet',
+ 'show per user' => 'vis per bruger',
+ 'login as' => 'log ind som',
+ 'logout' => 'log ud',
+ 'edit' => 'redigér',
+ 'open webstats' => 'åbn webstats',
+ 'view logs' => 'se logs',
+ 'list records' => 'vis %s records',
+ 'add record' => 'tilføj record',
+ 'list accounts' => 'list %s konti',
+ 'add account' => 'add konto',
+ 'open webmail' => 'åbn webmail',
+ 'list fail2ban' => 'list fail2ban',
+ 'open %s' => 'åbn %s',
+ 'download' => 'download',
+ 'restore' => 'restore',
+ 'configure restore settings' => 'konfigurér indstillinger for genskabelse',
+ 'stop' => 'stop',
+ 'start' => 'start',
+ 'restart' => 'restart',
+ 'update' => 'opdatér',
+ 'generate' => 'generér',
+ 'Generate CSR' => 'Generér CSR',
+ 'reread IP' => 'genindlæs IP',
+ 'enable autoupdate' => 'aktivér autoupdate',
+ 'disable autoupdate' => 'slå autoopdatéring fra',
+ 'turn on notifications' => 'slå notifikationer til',
+ 'turn off notifications' => 'slå notifikationer fra',
+
+ 'Adding User' => 'Tilføjer Bruger',
+ 'Editing User' => 'Ændrer Bruger',
+ 'Adding Domain' => 'Tilføjer Domæne',
+ 'Editing Domain' => 'Ændrer Domæne',
+ 'Adding DNS Domain' => 'Tilføjer DNS Domæne',
+ 'Editing DNS Domain' => 'Ændrer DNS Domæne',
+ 'Adding DNS Record' => 'Tilføjer DNS Record',
+ 'Editing DNS Record' => 'Ændrer DNS Record',
+ 'Adding Mail Domain' => 'Tilføjer Mail Domæne',
+ 'Editing Mail Domain' => 'Ændrer Mail Domæne',
+ 'Adding Mail Account' => 'Tilføjer Mail Konto',
+ 'Editing Mail Account' => 'Ændrer Mail Konto',
+ 'Adding database' => 'Tilføjer database',
+ 'Editing Cron Job' => 'Ændrer Cron Job',
+ 'Adding Cron Job' => 'Tilføjer Cron Job',
+ 'Editing Database' => 'Ændrer Database',
+ 'Adding Package' => 'Tilføjer Package',
+ 'Editing Package' => 'Ændrer Package',
+ 'Adding IP address' => 'Tilføjer IP address',
+ 'Editing IP Address' => 'Ændrer IP Address',
+ 'Editing Backup Exclusions' => 'Ændrer Backup Exclusions',
+ 'Generating CSR' => 'Generating CSR',
+ 'Listing' => 'Listing',
+ 'Search Results' => 'Søgeresultater',
+ 'Adding Firewall Rule' => 'Tilføjer Firewall Regel',
+ 'Editing Firewall Rule' => 'Ændrer Firewall Regel',
+ 'Adding IP Address to Banlist' => 'Tilføjer IP Addresse til Banliste',
+
+ 'active' => 'aktiv',
+ 'spnd' => 'suspenderet',
+ 'suspended' => 'suspenderet',
+ 'running' => 'kører',
+ 'stopped' => 'stoppet',
+ 'outdated' => 'uddateret',
+ 'updated' => 'opdatéret',
+
+ 'yes' => 'ja',
+ 'no' => 'nej',
+ 'none' => 'ingen',
+ 'pb' => 'pb',
+ 'tb' => 'tb',
+ 'gb' => 'gb',
+ 'mb' => 'mb',
+ 'minute' => 'minut',
+ 'hour' => 'time',
+ 'day' => 'dag',
+ 'days' => 'dage',
+ 'hours' => 'timer',
+ 'minutes' => 'minutter',
+ 'month' => 'måned',
+ 'package' => 'pakke',
+ 'Bandwidth' => 'Båndbredde',
+ 'Disk' => 'Disk',
+ 'Web' => 'Web',
+ 'Mail' => 'Mail',
+ 'Databases' => 'Databaser',
+ 'User Directories' => 'Bruger Mapper',
+ 'Template' => 'Skabelon',
+ 'Web Template' => 'Web Skabelon',
+ 'Backend Template' => 'Backend Skabelon',
+ 'Proxy Template' =>'Proxy Skabelon',
+ 'DNS Template' => 'DNS Skabelon',
+ 'Web Domains' => 'Web Domæner',
+ 'SSL Domains' => 'SSL Domæner',
+ 'Web Aliases' => 'Web Aliaser',
+ 'per domain' => 'per domæne',
+ 'DNS Domains' => 'DNS Domæner',
+ 'DNS Domains' => 'DNS Domæner',
+ 'DNS records' => 'DNS Records' ,
+ 'Name Servers' => 'Name Servers',
+ 'Mail Domains' => 'Mail Domæner',
+ 'Mail Accounts' => 'Mail Accounts',
+ 'Cron Jobs' => 'Cron Jobs',
+ 'SSH Access' => 'SSH Adgang',
+ 'IP Addresses' => 'IP Addresser',
+ 'Backups' => 'Backups',
+ 'Backup System' => 'Backup System',
+ 'backup exclusions' => 'backup ekslusioner',
+ 'template' => 'skabelon',
+ 'SSL Support' => 'SSL Support',
+ 'SSL Home Directory' => 'SSL Home',
+ 'Proxy Support' => 'Proxy Support',
+ 'Proxy Extensions' => 'Proxy Tilføjelser',
+ 'Web Statistics' => 'Web Statistik',
+ 'Additional FTP Account' => 'Ekstra FTP',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => 'Udløber',
+ 'Records' => 'Records',
+ 'Catchall email' => 'Catchall email',
+ 'AntiVirus Support' => 'AntiVirus Support',
+ 'AntiSpam Support' => 'AntiSpam Support',
+ 'DKIM Support' => 'DKIM Support',
+ 'Accounts' => 'Konti',
+ 'Quota' => 'Quota',
+ 'Autoreply' => 'Autosvar',
+ 'Forward to' => 'Vidersend til',
+ 'Do not store forwarded mail' => 'Gem ikke vidersendte mails',
+ 'database' => 'database',
+ 'User' => 'Bruger',
+ 'Host' => 'Host',
+ 'Charset' => 'Karaktersæt',
+ 'Min' => 'Min',
+ 'Hour' => 'Time',
+ 'Day' => 'Dag',
+ 'Month' => 'Måned',
+ 'Day of week' => 'Ugedag',
+ 'local' => 'lokal',
+ 'Run Time' => 'Tid for kørsel',
+ 'Backup Size' => 'Backup Størelse',
+ 'SYS' => 'SYS',
+ 'Domains' => 'Domæner',
+ 'Status' => 'Status',
+ 'shared' => 'delt',
+ 'dedicated' => 'dedikeret',
+ 'Owner' => 'Ejer',
+ 'Users' => 'Brugere',
+ 'Load Average' => 'Load Gennemsnit',
+ 'Memory Usage' => 'Hukommelsesforbrug',
+ 'HTTPD Usage' => 'HTTPD Forbrug',
+ 'NGINX Usage' => 'NGINX Forbrug',
+ 'MySQL Usage on localhost' => 'MySQL Forbrug på localhost',
+ 'PostgreSQL Usage on localhost' => 'PostgreSQL Forbrug på localhost',
+ 'Bandwidth Usage eth0' => 'Båndbredde Forbrug eth0',
+ 'FTP Usage' => 'FTP Forbrug',
+ 'SSH Usage' => 'SSH Forbrug',
+ 'reverse proxy' => 'reverse proxy',
+ 'web server' => 'web server',
+ 'dns server' => 'dns server',
+ 'mail server' => 'mail server',
+ 'pop/imap server' => 'pop/imap server',
+ 'email antivirus' => 'email antivirus',
+ 'email antispam' => 'email antispam',
+ 'database server' => 'database server',
+ 'ftp server' => 'ftp server',
+ 'job scheduler' => 'job scheduler',
+ 'CPU' => 'CPU',
+ 'Memory' => 'Hukommelse',
+ 'Uptime' => 'Oppetid',
+ 'core package' => 'core pakke',
+ 'php interpreter' => 'php fortolker',
+ 'internal web server' => 'intern web server',
+ 'Version' => 'Version',
+ 'Release' => 'Udgivelse',
+ 'Architecture' => 'Arkitektur',
+ 'Object' => 'Object',
+ 'Owner' => 'Ejer',
+ 'Username' => 'Brugernavn',
+ 'Password' => 'Adgangskode',
+ 'Email' => 'Email',
+ 'Package' => 'Pakke',
+ 'Language' => 'Sprog',
+ 'First Name' => 'Fornavn',
+ 'Last Name' => 'Efternavn',
+ 'Send login credentials to email address' => 'Send loginoplysninger til denne email-adresse',
+ 'Default Template' => 'Standard Skabelon',
+ 'Default Name Servers' => 'Standard Navneservere',
+ 'Domain' => 'Domæne',
+ 'DNS Support' => 'DNS Support',
+ 'Mail Support' => 'Mail Support',
+ 'Advanced options' => 'Avancerede Indstillinger',
+ 'Aliases' => 'Aliaser',
+ 'SSL Certificate' => 'SSL Certifikat',
+ 'SSL Key' => 'SSL Key',
+ 'SSL Certificate Authority / Intermediate' => 'SSL Certifikat Authority / Intermediate',
+ 'SSL CSR' => 'SSL CSR',
+ 'optional' => 'valgfi',
+ 'internal' => 'inter',
+ 'Statistics Authorization' => 'Statistik Login',
+ 'Statistics Auth' => 'Statistics Login',
+ 'Account' => 'Konto',
+ 'Prefix will be automaticaly added to username' => 'Prefixet %s bliver automatisk tilføjet brugernavnet',
+ 'Send FTP credentials to email' => 'Send FTP oplysninger til denne email',
+ 'Expiration Date' => 'Udløbsdato',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
+ 'Name servers' => 'Navneservere',
+ 'Record' => 'Record',
+ 'IP or Value' => 'IP or Værdi',
+ 'Priority' => 'Prioritet',
+ 'Record Number' => 'Record Nummer',
+ 'in megabytes' => 'i megabytes',
+ 'Message' => 'Besked',
+ 'use local-part' => 'brug local-part',
+ 'one or more email addresses' => 'en eller flere email-adresser',
+ 'Prefix will be automaticaly added to database name and database user' => 'Prefixet %s bliver automatisk tilføjet databasenavnet og databasebrugernavnet',
+ 'Database' => 'Database',
+ 'Type' => 'Type',
+ 'Minute' => 'Minut',
+ 'Command' => 'Kommado',
+ 'Package Name' => 'Pakkenavn',
+ 'Netmask' => 'Netmask',
+ 'Interface' => 'Interface',
+ 'Shared' => 'Delt',
+ 'Assigned user' => 'Tildelt bruger',
+ 'Assigned domain' => 'Assigned domain',
+ 'NAT IP association' => 'NAT IP association',
+ 'shell' => 'shell',
+ 'web domains' => 'webdomæner',
+ 'web aliases' => 'webaliaser',
+ 'dns records' => 'dns records',
+ 'mail domains' => 'maildomæner',
+ 'mail accounts' => 'mailkonti',
+ 'accounts' => 'konti',
+ 'databases' => 'databaser',
+ 'cron jobs' => 'cronjobs',
+ 'backups' => 'backups',
+ 'quota' => 'quota',
+ 'day of week' => 'ugedag',
+ 'cmd' => 'cmd',
+ 'users' => 'brugere',
+ 'domains' => 'domæner',
+ 'aliases' => 'aliaser',
+ 'records' => 'records',
+ 'jobs' => 'jobs',
+ 'username' => 'brugernavn',
+ 'password' => 'adgangskode',
+ 'type' => 'type',
+ 'charset' => 'karaktersæt',
+ 'domain' => 'domæne',
+ 'ip' => 'ip',
+ 'ip address' => 'ip address',
+ 'IP address' => 'IP address',
+ 'netmask' => 'netmaske',
+ 'interface' => 'interface',
+ 'assigned user' => 'tildelt bruger',
+ 'ns1' => 'ns1',
+ 'ns2' => 'ns2',
+ 'user' => 'bruger',
+ 'email' => 'email',
+ 'first name' => 'fornavn',
+ 'last name' => 'efternavn',
+ 'account' => 'konto',
+ 'ssl certificate' => 'ssl-certifikat',
+ 'ssl key' => 'ssl key',
+ 'stats user password' => 'stats user adgangskode',
+ 'stats username' => 'stats brugernavn',
+ 'stats password' => 'stats adgangskode',
+ 'ftp user password' => 'ftp-bruger adgangskode',
+ 'ftp user' => 'ftp bruger',
+ 'Last 70 lines of %s.%s.log' => 'De sidste 70 linier af %s.%s.log',
+ 'Download AccessLog' => 'Hent AccessLog',
+ 'Download ErrorLog' => 'Hent ErrorLog',
+ 'Country' => 'Land',
+ '2 letter code' => '2 letter code',
+ 'State / Province' => 'Stat / Provins',
+ 'City / Locality' => 'By / Lokation',
+ 'Organization' => 'Organisation',
+ 'Action' => 'Action',
+ 'Protocol' => 'Protokol',
+ 'Port' => 'Port',
+ 'Comment' => 'Kommentar',
+ 'Banlist' => 'Banliste',
+ 'ranges are acceptable' => 'intervallerne er acceptable',
+ 'CIDR format is supported' => 'CIDR format er understøttet',
+ 'Add one more Name Server' => 'Add one more Name Server',
+
+ 'unlimited' => 'ubegrænset',
+ '1 account' => '1 konto',
+ '%s accounts' => '%s konti',
+ '1 domain' => '1 domæner',
+ '%s domains' => '%s domæner',
+ '1 record' => '1 record',
+ '%s records' => '%s records',
+ '1 mail account' => '1 mailkonto',
+ '%s mail accounts' => '%s mailkonti',
+ '1 database' => '1 database',
+ '%s databases' => '%s databases',
+ '1 cron job' => '1 cronjob',
+ '%s cron jobs' => '%s cronjobs',
+ '1 archive' => '1 arkiv',
+ '%s archives' => '%s arkiver',
+ '1 package' => '1 pakke',
+ '%s packages' => '%s pakker',
+ '1 IP address' => '1 IP addresse',
+ '%s IP addresses' => '%s IP addresser',
+ '1 month' => '1 måned',
+ '%s months' => '%s måneder',
+ '1 log record' => '1 log record',
+ '%s log records' => '%s log records',
+ '1 object' => '1 objekt',
+ '%s objects' => '%s objekter',
+ 'no exclusions' => 'ingen ekslusioner',
+ '1 rule' => '1 regel',
+ '%s rules' => '%s regler',
+ 'There are no currently banned IP' => 'Der er ingen bannede IP\'er i øjeblikket',
+
+ 'USER_CREATED_OK' => 'Bruger %s blev oprettet med succes.',
+ 'WEB_DOMAIN_CREATED_OK' => 'Domænet %s blev oprettet med succes.',
+ 'DNS_DOMAIN_CREATED_OK' => 'DNS-domæne %s blev oprettet med succes.',
+ 'DNS_RECORD_CREATED_OK' => 'Record %s.%s blev oprettet med succes.',
+ 'MAIL_DOMAIN_CREATED_OK' => 'Maildomæne %s blev oprettet med succes.',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'Mailkonto %s@%s blev oprettet med succes.',
+ 'DATABASE_CREATED_OK' => 'Database %s blev oprettet med succes.',
+ 'CRON_CREATED_OK' => 'Cronjob blev oprettet med succes.',
+ 'IP_CREATED_OK' => 'IP-addresse %s blev oprettet med succes.',
+ 'PACKAGE_CREATED_OK' => 'Pakke %s blev oprettet med succes.',
+ 'SSL_GENERATED_OK' => 'Certifikat blev genereret med succes.',
+ 'RULE_CREATED_OK' => 'Regel blev oprettet med succes.',
+ 'Autoupdate has been successfully enabled' => 'Autoupdate blev aktiveret med succes.',
+ 'Autoupdate has been successfully disabled' => 'Autoupdate blev deaktiveret med succes.',
+ 'Cronjob email reporting has been successfully enabled' => 'Cronjob email rapportering blev aktiveret med succes',
+ 'Cronjob email reporting has been successfully disabled' => 'Cronjob email rapportering blev deaktiveret med succes',
+ 'Changes has been saved.' => 'Ændringer blev gemt.',
+ 'Confirmation' => 'Bekræftelse',
+ 'DELETE_USER_CONFIRMATION' => 'Er du sikker på at du vil slette brugeren %s?',
+ 'SUSPEND_USER_CONFIRMATION' => 'Er du sikker på at du vil suspendere brugeren %s?',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere brugeren %s?',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'Er du sikker på at du vil slette domænet %s?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'Er du sikker på at du vil suspendere domænet %s?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere domænet %s?',
+ 'DELETE_RECORD_CONFIRMATION' => 'Er du sikker på at du vil slette record %s?',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'Er du sikker på at du vil suspendere record %s?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere record %s?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Er du sikker på at du vil slette %s?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Er du sikker på at du vil suspendere %s?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere %s?',
+ 'DELETE_DATABASE_CONFIRMATION' => 'Er du sikker på at du vil slette databasen %s?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'Er du sikker på at du vil suspendere databasen %s?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere databasen %s?',
+ 'DELETE_CRON_CONFIRMATION' => 'Er du sikker på at du vil slette cron job?',
+ 'SUSPEND_CRON_CONFIRMATION' => 'Er du sikker på at du vil suspendere cron job?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere cron job?',
+ 'DELETE_BACKUP_CONFIRMATION' => 'Er du sikker på at du vil slette %s backup?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'Er du sikker på at du vil slette %s eksklusionen?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'Er du sikker på at du vil slette pakken %s?',
+ 'DELETE_IP_CONFIRMATION' => 'Er du sikker på at du vil slette IP addressen %s?',
+ 'DELETE_RULE_CONFIRMATION' => 'Er du sikker på at du vil delete reglen #%s?',
+ 'SUSPEND_RULE_CONFIRMATION' => 'Er du sikker på at du vil suspendere reglen #%s?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => 'Er du sikker på at du vil afsuspendere reglen #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Forlad siden?',
+ 'RESTART_CONFIRMATION' => 'Er du sikker på at du vil genstarte %s?',
+ 'Welcome' => 'Velkommen',
+ 'LOGGED_IN_AS' => 'Logget ind som bruger: %s',
+ 'Error' => 'Fejl',
+ 'Invalid username or password' => 'Ugyldigt brugernavn eller adgangskode.',
+ 'Invalid username or code' => 'Ugyldigt brugernavn eller kode.',
+ 'Passwords not match' => 'Adgangskoderne stemmer ikke overens.',
+ 'Please enter valid email address.' => 'Indtast venligst en gyldig email-adresse.',
+ 'Field "%s" can not be blank.' => 'Feltet "%s" kan ikke være tomt.',
+ 'Password is too short.' => 'Adgangskoden er for kort (mindst 6 karakterer)',
+ 'Error code:' => 'Fejlkode: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" fejlede',
+ 'IP address is in use' => 'IP addressen er i brug',
+ 'BACKUP_SCHEDULED' => 'Opgaven er blevet tilføjet til køen. Du vil modtage en email når backup er klar til download.',
+ 'BACKUP_EXISTS' => 'En eksisterende backup kører allerede. Vent venligst til den er færdig.',
+ 'RESTORE_SCHEDULED' => 'Opgaven er blevet tilføjet til køen. Du vil modtage en email når din genskabelse er færdig.',
+ 'RESTORE_EXISTS' => 'En eksisterende genskabelse kører allerede. Vent venligst til den er færdig før du kører den igen.',
+
+ 'WEB_EXCLUSIONS' => "Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *. Benyt følgende format for at udelukke specifikke mapper: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *",
+ 'MAIL_EXCLUSIONS' => "Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *. Benyt følgende format for at udelukke specifikke konti: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Indtast det fulde databasenavn, et per linie. To exclude all databases use *",
+ 'CRON_EXCLUSIONS' => "For at udelukke alle opgaver, brug *",
+ 'USER_EXCLUSIONS' => "Indtast mappenavn, et per linie. For at udelukke alle mapper, brug *",
+
+ 'Welcome to Vesta Control Panel' => 'Velkommen til Vesta Kontrolpanel',
+ 'MAIL_FROM' => 'Vesta Kontrolpanel ',
+ 'GREETINGS_GORDON_FREEMAN' => "Hej, %s %s,\n",
+ 'GREETINGS' => "Hej,\n",
+ 'ACCOUNT_READY' => "Din konto er oprettet og er klar til brug.\n\nhttps://%s/login/\nBrugernavn: %s\nAdgangskode: %s\n\n--\nVesta Kontrolpanel\n",
+
+ 'FTP login credentials' => 'FTP login oplysninger',
+ 'FTP_ACCOUNT_READY' => "FTP konto blev oprettet og er klar til brug.\n\nHost: %s\nBrugernavn: %s_%s\nAdgangskode: %s\n\n--\nVesta Kontrolpanel\n",
+
+ 'Database Credentials' => 'Databaseoplysninger',
+ 'DATABASE_READY' => "Database has been created successfully.\n\nDatabase: %s\nBruger: %s\nAdgangskode: %s\n%s\n\n--\nVesta Kontrolpanel\n",
+
+ 'forgot password' => 'glemt adgangskode',
+ 'Confirm' => 'Bekræft',
+ 'New Password' => 'Ny adgangskode',
+ 'Confirm Password' => 'Bekræft Adgangskode',
+ 'Reset' => 'Nulstil',
+ 'Reset Code' => 'Nulstillingskode',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => 'Kode til at nultille adgangskode er blevet sendt til din email-adresse ',
+ 'MAIL_RESET_SUBJECT' => 'Adgangskode Nulstillet %s',
+ 'PASSWORD_RESET_REQUEST' => "Følg dette link for at nulstille din adgangskode:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativt, kan du også gå til https://%s/reset/?action=code&user=%s og indtast følgende nulstillingskode:\n%s\n\nHvis du ikke selv har bedt om at få nulstillet din adgangskode, bedes du ignorere denne besked - vi beklager.\n\n--\nVesta Kontrolpanel\n",
+
+ 'Jan' => 'Jan',
+ 'Feb' => 'Feb',
+ 'Mar' => 'Mar',
+ 'Apr' => 'Apr',
+ 'May' => 'Maj',
+ 'Jun' => 'Jun',
+ 'Jul' => 'Jul',
+ 'Aug' => 'Aug',
+ 'Sep' => 'Sep',
+ 'Oct' => 'Okt',
+ 'Nov' => 'Nov',
+ 'Dec' => 'Dec',
+
+ 'Configuring Server' => 'Konfigurerer Server',
+ 'Hostname' => 'Hostname',
+ 'Time Zone' => 'Tidszone',
+ 'Default Language' => 'Standard Sprog',
+ 'FileSystem Disk Quota ' => 'FilSystem Disk Quota ',
+ 'Vesta Control Panel Plugins' => 'Vesta Kontrolpanel Plugins',
+ 'preview' => 'preview',
+ 'Reseller Role' => 'Forhandlerrolle',
+ 'Web Config Editor' => 'Web Config Editor',
+ 'Template Manager' => 'Skabelonanager',
+ 'Backup Migration Manager' => 'Backup Migration Manager',
+ 'FileManager' => 'Filmanager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sortér efter',
+ 'Date' => 'Dato',
+ 'Starred' => 'Starred',
+ 'Name' => 'Navn',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
+
+);
diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php
index 35f17f23f..f86b23f9d 100644
--- a/web/inc/i18n/de.php
+++ b/web/inc/i18n/de.php
@@ -26,18 +26,18 @@ $LANG['de'] = array(
'BACKUP' => 'BACKUPS',
'Add User' => 'Benutzer anlegen',
- 'Add Domain' => 'Domäne hinzufügen',
- 'Add Web Domain' => 'Domäne hinzufügen',
- 'Add DNS Domain' => 'Domäne hinzufügen',
+ 'Add Domain' => 'Domain hinzufügen',
+ 'Add Web Domain' => 'Domain hinzufügen',
+ 'Add DNS Domain' => 'Domain hinzufügen',
'Add DNS Record' => 'DNS Eintrag anlegen',
- 'Add Mail Domain' => 'Domäne hinzufügen',
+ 'Add Mail Domain' => 'Domain hinzufügen',
'Add Mail Account' => 'Konto anlegen',
'Add Database' => 'Datenbank anlegen',
'Add Cron Job' => 'Cron Job hinzufügen',
'Create Backup' => 'Backup erstellen',
'Configure' => 'Konfigurieren',
'Restore All' => 'Alles wiederherstellen',
- 'Add Package' => 'Paket erstellen',
+ 'Add Package' => 'Paket hinzufügen',
'Add IP' => 'IP hinzufügen',
'Add Rule' => 'Regel hinzufügen',
'Ban IP Address' => 'IP blockieren',
@@ -55,12 +55,12 @@ $LANG['de'] = array(
'toggle all' => 'Alle wählen/abwählen',
'apply to selected' => 'Auswählen',
- 'rebuild' => 'Wiederherstellen',
- 'rebuild web' => 'Web wiederherstellen',
- 'rebuild dns' => 'DNS wiederherstellen',
- 'rebuild mail' => 'Mail wiederherstellen',
- 'rebuild db' => 'DB wiederherstellen',
- 'rebuild cron' => 'Cron Jobs wiederherstellen',
+ 'rebuild' => 'Erneuern',
+ 'rebuild web' => 'Web erneuern',
+ 'rebuild dns' => 'DNS erneuern',
+ 'rebuild mail' => 'Mail erneuern',
+ 'rebuild db' => 'DB erneuern',
+ 'rebuild cron' => 'Cron Jobs erneuern',
'update counters' => 'Zähler aktualisieren',
'suspend' => 'Sperren',
'unsuspend' => 'Entsperren',
@@ -70,7 +70,7 @@ $LANG['de'] = array(
'logout' => 'Abmelden',
'edit' => 'Bearbeiten',
'open webstats' => 'Webstatistiken öffnen',
- 'view logs' => 'Logs absehen',
+ 'view logs' => 'Logs ansehen',
'list records' => '%s Einträge auflisten',
'add record' => 'Eintrag hinzufügen',
'list accounts' => '%s Konten auflisten',
@@ -97,14 +97,14 @@ $LANG['de'] = array(
'Editing User' => 'Benutzer bearbeiten',
'Adding Domain' => 'Domain hinzufügen',
'Editing Domain' => 'Domain bearbeiten',
- 'Adding DNS Domain' => 'Domain hinzufügen',
- 'Editing DNS Domain' => 'Domain bearbeiten',
+ 'Adding DNS Domain' => 'DNS-Domain hinzufügen',
+ 'Editing DNS Domain' => 'DNS-Domain bearbeiten',
'Adding DNS Record' => 'DNS-Eintrag anlegen',
'Editing DNS Record' => 'DNS-Eintrag bearbeiten',
- 'Adding Mail Domain' => 'Domain hinzufügen',
- 'Editing Mail Domain' => 'Domain bearbeiten',
- 'Adding Mail Account' => 'Konto hinzufügen',
- 'Editing Mail Account' => 'Konto bearbeiten',
+ 'Adding Mail Domain' => 'E-mail Domain hinzufügen',
+ 'Editing Mail Domain' => 'E-mail Domain bearbeiten',
+ 'Adding Mail Account' => 'E-mail Konto hinzufügen',
+ 'Editing Mail Account' => 'E-mail Konto bearbeiten',
'Adding database' => 'Datenbank hinzufügen',
'Editing Cron Job' => 'Cron Job bearbeiten',
'Adding Cron Job' => 'Cron Job hinzufügen',
@@ -117,9 +117,9 @@ $LANG['de'] = array(
'Generating CSR' => 'CSR generieren',
'Listing' => 'Auflistung',
'Search Results' => 'Suchergebnisse',
- 'Adding Firewall Rule' => 'Hinzufügen von Firewall-Regel',
- 'Editing Firewall Rule' => 'Bearbeiten von Firewall-Regel',
- 'Adding IP Address to Banlist' => 'Hinzufügen von IP-Adresse zur schwarzen Liste',
+ 'Adding Firewall Rule' => 'Hinzufügen einer Firewall-Regel',
+ 'Editing Firewall Rule' => 'Bearbeiten einer Firewall-Regel',
+ 'Adding IP Address to Banlist' => 'Hinzufügen einer IP-Adresse zur schwarzen Liste',
'active' => 'Aktiv',
'spnd' => 'Gesperrt',
@@ -162,7 +162,7 @@ $LANG['de'] = array(
'DNS Domains' => 'DNS Domains',
'DNS records' => 'DNS Einträge' ,
'Name Servers' => 'Name Server',
- 'Mail Domains' => 'Mail Domäne',
+ 'Mail Domains' => 'Mail Domain',
'Mail Accounts' => 'Mail Konten',
'Cron Jobs' => 'Cron Jobs',
'SSH Access' => 'SSH Zugriff',
@@ -203,21 +203,21 @@ $LANG['de'] = array(
'Run Time' => 'Laufzeit',
'Backup Size' => 'Backup Größe',
'SYS' => 'SYS',
- 'Domains' => 'Domäne',
+ 'Domains' => 'Domains',
'Status' => 'Status',
'shared' => 'Gemeinsam genutzt',
'dedicated' => 'Dediziert',
'Owner' => 'Besitzer',
'Users' => 'Benutzer',
'Load Average' => 'Durchschnittliche Last',
- 'Memory Usage' => 'Arbeitsspeicher Verbrauch',
- 'HTTPD Usage' => 'HTTPD Verbrauch',
- 'NGINX Usage' => 'NGINX Verbrauch',
- 'MySQL Usage on localhost' => 'MySQL Verbrauch auf localhost',
- 'PostgreSQL Usage on localhost' => 'PostgreSQL Verbrauch on localhost',
- 'Bandwidth Usage eth0' => 'Datenvolumen Verbrauch eth0',
- 'FTP Usage' => 'FTP Verbrauch',
- 'SSH Usage' => 'SSH Verbrauch',
+ 'Memory Usage' => 'Arbeitsspeichernutzung',
+ 'HTTPD Usage' => 'HTTPD Benutzung',
+ 'NGINX Usage' => 'NGINX Benutzung',
+ 'MySQL Usage on localhost' => 'MySQL Benutzung auf localhost',
+ 'PostgreSQL Usage on localhost' => 'PostgreSQL Benutzung on localhost',
+ 'Bandwidth Usage eth0' => 'Bandbreitennutzung eth0',
+ 'FTP Usage' => 'FTP Benutzung',
+ 'SSH Usage' => 'SSH Benutzung',
'reverse proxy' => 'Reverse Proxy',
'web server' => 'Web Server',
'dns server' => 'DNS Server',
@@ -256,7 +256,7 @@ $LANG['de'] = array(
'Aliases' => 'Aliase',
'SSL Certificate' => 'SSL Zertifikat',
'SSL Key' => 'SSL Schlüssel',
- 'SSL Certificate Authority / Intermediate' => 'SSL Zertifikat Ersteller',
+ 'SSL Certificate Authority / Intermediate' => 'SSL Zertifizierungsstelle',
'SSL CSR' => 'CSR-Anfrage',
'optional' => 'optional',
'internal' => 'Intern',
@@ -274,9 +274,9 @@ $LANG['de'] = array(
'Record Number' => 'Eintragsnummer',
'in megabytes' => 'in Megabyte',
'Message' => 'Nachricht',
- 'use local-part' => 'verwende local-part',
+ 'use local-part' => 'verwende lokalen Teil',
'one or more email addresses' => 'eine oder mehrere E-Mail Adressen',
- 'Prefix will be automaticaly added to database name and database user' => 'Prefix %s wird automatisch zum Datenbanknamen und Benutzernamen hinzugefügt',
+ 'Prefix will be automaticaly added to database name and database user' => 'Prefix %s wird automatisch zum Datenbank- und Benutzernamen hinzugefügt',
'Database' => 'Datenbank',
'Type' => 'Typ',
'Minute' => 'Minute',
@@ -285,11 +285,11 @@ $LANG['de'] = array(
'Netmask' => 'Netzmaske',
'Interface' => 'Interface',
'Shared' => 'Gemeinsam genutzt',
- 'Assigned user' => 'Benutzer zuordnen',
- 'Assigned domain' => 'Domain zuordnen',
+ 'Assigned user' => 'Zugeordneter Benutzer',
+ 'Assigned domain' => 'Zugeordnete Domain',
'NAT IP association' => 'NAT IP-Verband',
'shell' => 'Shell',
- 'web domains' => 'Web Domäne',
+ 'web domains' => 'Web Domains',
'web aliases' => 'Web Aliase',
'dns records' => 'DNS Einträge',
'mail domains' => 'Mail Domains',
@@ -302,7 +302,7 @@ $LANG['de'] = array(
'day of week' => 'Tag der Woche',
'cmd' => 'cmd',
'users' => 'Benutzer',
- 'domains' => 'Domäne',
+ 'domains' => 'domains',
'aliases' => 'Aliase',
'records' => 'Einträge',
'jobs' => 'Jobs',
@@ -326,14 +326,14 @@ $LANG['de'] = array(
'account' => 'Konto',
'ssl certificate' => 'SSL-Zertifikat',
'ssl key' => 'SSL Schlüssel',
- 'stats user password' => 'Statistik Benutzer Passwort',
- 'stats username' => 'Statistik Benutzername',
- 'stats password' => 'Statistik Password',
+ 'stats user password' => 'Benutzerpasswort-Statistik',
+ 'stats username' => 'Benutzernamen-Statistik',
+ 'stats password' => 'Passwort-Statistik',
'ftp user password' => 'FTP Benutzer Passwort',
'ftp user' => 'FTP Benutzer',
'Last 70 lines of %s.%s.log' => 'Die letzten 70 Zeilen von %s.%s.log',
- 'Download AccessLog' => 'AccessLog runterladen',
- 'Download ErrorLog' => 'ErrorLog runterladen',
+ 'Download AccessLog' => 'AccessLog herunterladen',
+ 'Download ErrorLog' => 'ErrorLog herunterladen',
'Country' => 'Land',
'2 letter code' => '2-Buchstaben-Code',
'State / Province' => 'Staat / Provinz',
@@ -343,11 +343,12 @@ $LANG['de'] = array(
'Protocol' => 'Protokoll',
'Port' => 'Port',
'Comment' => 'Kommentar',
- 'Banlist' => 'Bannliste',
- 'ranges are acceptable' => 'Bereiche sind akzeptabel',
+ 'Banlist' => 'schwarze Liste',
+ 'ranges are acceptable' => 'Bereiche sind erlaubt',
'CIDR format is supported' => 'CIDR-Format wird unterstützt',
+ 'Add one more Name Server' => 'Add one more Name Server',
- 'unlimited' => 'unlimited',
+ 'unlimited' => 'unbegrenzt',
'1 account' => '1 Konto',
'%s accounts' => '%s Konten',
'1 domain' => '1 Domain',
@@ -373,25 +374,25 @@ $LANG['de'] = array(
'1 object' => '1 Objekt',
'%s objects' => '%s Objekte',
'no exclusions' => 'Keine Ausschlüsse',
- '1 rule' => '1 regel',
- '%s rules' => '%s regeln',
- 'There are no currently banned IP' => 'Es gibt keine aktuell gesperrte IP',
+ '1 rule' => '1 Regel',
+ '%s rules' => '%s Regeln',
+ 'There are no currently banned IP' => 'Es gibt momentan keine gesperrte IP',
'USER_CREATED_OK' => 'Benutzer %s wurde erfolgreich angelegt.',
'WEB_DOMAIN_CREATED_OK' => 'Domain %s wurde erfolgreich angelegt.',
- 'DNS_DOMAIN_CREATED_OK' => 'DNS Domäne %s wurde erfolgreich angelegt.',
+ 'DNS_DOMAIN_CREATED_OK' => 'DNS Domain %s wurde erfolgreich angelegt.',
'DNS_RECORD_CREATED_OK' => 'Eintrag %s.%s wurde erfolgreich angelegt.',
- 'MAIL_DOMAIN_CREATED_OK' => 'Mail Domäne %s wurde erfolgreich angelegt.',
+ 'MAIL_DOMAIN_CREATED_OK' => 'Mail Domain %s wurde erfolgreich angelegt.',
'MAIL_ACCOUNT_CREATED_OK' => 'Mail Account %s@%s wurde erfolgreich angelegt.',
'DATABASE_CREATED_OK' => 'Datenbank %s wurde erfolgreich angelegt',
'CRON_CREATED_OK' => 'Cron Job wurde erfolgreich angelegt.',
'IP_CREATED_OK' => 'IP Adresse %s wurde erfolgreich hinzugefügt.',
'PACKAGE_CREATED_OK' => 'Packet %s wurde erfolgreich angelegt.',
- 'SSL_GENERATED_OK' => 'SSL zertifikat wurde erfolgreich angelegt.',
+ 'SSL_GENERATED_OK' => 'SSL Zertifikat wurde erfolgreich angelegt.',
'RULE_CREATED_OK' => 'Regel wurde erfolgreich erstellt.',
- 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled',
- 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled',
- 'Cronjob email reporting has been successfully enabled' => 'Cronjob E-Mail-Berichterstattung wurde erfolgreich aktiviert wurde',
+ 'Autoupdate has been successfully enabled' => 'Autoupdate wurde erfolgreich aktiviert',
+ 'Autoupdate has been successfully disabled' => 'Autoupdate wurde erfolgreich deaktiviert',
+ 'Cronjob email reporting has been successfully enabled' => 'Cronjob E-Mail-Berichterstattung wurde erfolgreich aktiviert',
'Cronjob email reporting has been successfully disabled' => 'Cronjob E-Mail-Berichterstattung wurde erfolgreich deaktiviert',
'Changes has been saved.' => 'Änderungen wurden gespeichert.',
'Confirmation' => 'Bestätigung',
@@ -415,35 +416,36 @@ $LANG['de'] = array(
'UNSUSPEND_CRON_CONFIRMATION' => 'Cron Job wirklich entsperren?',
'DELETE_BACKUP_CONFIRMATION' => 'Backup %s wirklich löschen?',
'DELETE_EXCLUSION_CONFIRMATION' => 'Ausschlüsse %s wirklich löschen?',
- 'DELETE_PACKAGE_CONFIRMATION' => 'Packet %s? wirklich löschen?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'Packet %s wirklich löschen?',
'DELETE_IP_CONFIRMATION' => '%s wirklich löschen?',
'DELETE_RULE_CONFIRMATION' => 'Regel #%s wirklich löschen?',
'SUSPEND_RULE_CONFIRMATION' => 'Regel #%s wirklich sperren?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Regel #%s wirklich entsperren?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => '%s wirklich neu starten?',
'Welcome' => 'Willkommen',
'LOGGED_IN_AS' => 'Angemeldet als %s',
'Error' => 'Fehler',
'Invalid username or password' => 'Falscher Benutzername oder Passwort',
'Invalid username or code' => 'Falscher Benutzername oder Code',
- 'Passwords not match' => 'Passwort stimmt nicht überein',
+ 'Passwords not match' => 'Passwörter stimmen nicht überein',
'Please enter valid email address.' => 'Bitte geben Sie eine gültige E-Mail Adresse ein.',
- 'Field "%s" can not be blank.' => 'Feld "%s" kann nicht leer bleiben.',
+ 'Field "%s" can not be blank.' => 'Feld "%s" darf nicht leer bleiben.',
'Password is too short.' => 'Passwort zu kurz (mindestens 6 Zeichen)',
'Error code:' => 'Fehler: %s',
'SERVICE_ACTION_FAILED' => '"%s" "%s" fehlgeschlagen',
'IP address is in use' => 'IP Adresse wir schon benutzt',
'BACKUP_SCHEDULED' => 'Job wurde in die Warteschlange eingereiht. Sie erhalten eine E-Mail wenn Ihr Backup zum Download bereit steht.',
'BACKUP_EXISTS' => 'Ein Backup Job läuft bereits. Bitte warten Sie bis dieser erledigt wurde.',
- 'RESTORE_SCHEDULED' => 'Job wurde in die Warteschlange eingereiht. Sie erhalten eine E-Mail wenn Ihr Backup hergestellt wurde.',
+ 'RESTORE_SCHEDULED' => 'Job wurde in die Warteschlange eingereiht. Sie erhalten eine E-Mail wenn Ihr Backup wiederhergestellt wurde.',
'RESTORE_EXISTS' => 'Ein Wiederherstellungs Job läuft bereits. Bitte warten Sie bis dieser erledigt wurde.',
- 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp",
- 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *",
- 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster",
- 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *",
- 'CRON_EXCLUSIONS' => "To exclude all jobs use *",
- 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *",
+ 'WEB_EXCLUSIONS' => "Einen Domainname pro Zeile eingeben. '*' um alle Domains auszuschließen. Folgendes Format um bestimmte Verzeichnisse auszuschließen: domain.de:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Einen Domainname pro Zeile eingeben. '*' um alle Domains auszuschließen.",
+ 'MAIL_EXCLUSIONS' => "Einen Domainname pro Zeile eingeben. '*' um alle Domains auszuschließen. Um bestimmte Konten auszuschließen folgendes Format verwenden: domain.de:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Einen Datenbanknamen pro Zeile eingeben. '*' um alle Datenbanken auszuschließen",
+ 'CRON_EXCLUSIONS' => "'*' um alle Cron Jobs auszuschließen",
+ 'USER_EXCLUSIONS' => "Pro Zeile einen Verzeichnisnamen eingeben. '*' um alle Verzeichnisse auszuschließen",
'Welcome to Vesta Control Panel' => 'Willkommen im Vesta Control Panel',
'MAIL_FROM' => 'Vesta Control Panel ',
@@ -462,35 +464,139 @@ $LANG['de'] = array(
'New Password' => 'Neues Passwort',
'Confirm Password' => 'Passwort bestätigen',
'Reset' => 'Zurücksetzen',
- 'Reset Code' => 'Zurücksetzen-Code',
+ 'Reset Code' => 'Rücksetz-Code',
'RESET_NOTICE' => '',
- 'RESET_CODE_SENT' => 'Passwort Zurücksetzen-Code wurde erfolgreich an Ihre Adresse gesandt ',
+ 'RESET_CODE_SENT' => 'Passwort Rücksetz-Code wurde an Ihre Adresse gesandt ',
'MAIL_RESET_SUBJECT' => 'Passwort Reset für %s',
- 'PASSWORD_RESET_REQUEST' => "Zum Zurücksetzten Ihre Passwortes, besuchen Sie bitte folgenden Link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativ, können Sie auf https://%s/reset/?action=code&user=%s gehen und dort folgenden Reset Code eingeben:\n%s\n\nWenn Sie Ihr Passwort nicht zurücksetzen wollten, ignorieren Sie diese Nachricht und entschuldigen Sie uns die Unannehmlichkeiten.\n\n--\nVesta Control Panel\n",
+ 'PASSWORD_RESET_REQUEST' => "Zum Zurücksetzen Ihres Passwortes, besuchen Sie bitte folgenden Link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativ, können Sie auf https://%s/reset/?action=code&user=%s gehen und dort folgenden Reset Code eingeben:\n%s\n\nWenn Sie Ihr Passwort nicht zurücksetzen wollten, ignorieren Sie diese Nachricht und entschuldigen Sie uns die Unannehmlichkeiten.\n\n--\nVesta Control Panel\n",
'Jan' => 'Jan',
'Feb' => 'Feb',
- 'Mar' => 'Mar',
+ 'Mar' => 'Mär',
'Apr' => 'Apr',
- 'May' => 'May',
+ 'May' => 'Mai',
'Jun' => 'Jun',
'Jul' => 'Jul',
'Aug' => 'Aug',
'Sep' => 'Sep',
'Oct' => 'Oct',
'Nov' => 'Nov',
- 'Dec' => 'Dec',
+ 'Dec' => 'Dez',
- 'Configuring Server' => 'Configuring Server',
+ 'Configuring Server' => 'Server konfigurieren',
'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
+ 'Time Zone' => 'Zeitzone',
+ 'Default Language' => 'Standardsprache',
+ 'FileSystem Disk Quota' => 'Dateisystem Nutzungskontingent',
'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
+ 'preview' => 'vorschau',
'Reseller Role' => 'Reseller Role',
'Web Config Editor' => 'Web Config Editor',
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
-);
+ 'FileManager' => 'Datei-Manager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sortieren',
+ 'Date' => 'Datum',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
+
+);
\ No newline at end of file
diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php
index 91f622cbc..068cc5595 100644
--- a/web/inc/i18n/el.php
+++ b/web/inc/i18n/el.php
@@ -348,6 +348,7 @@ $LANG['el'] = array(
'Banlist' => 'Λίστα απαγόρευσης',
'ranges are acceptable' => 'εύρος είναι αποδεκτό',
'CIDR format is supported' => 'To format CIDR υποστηρίζεται',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 λογαριασμός',
@@ -422,6 +423,7 @@ $LANG['el'] = array(
'DELETE_RULE_CONFIRMATION' => 'Είστε σίγουρος πως θέλετε να διαγράψετε τον κανόνα #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Είστε σίγουρος πως θέλετε να αποκλείσετε τον κανόνα #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Είστε σίγουρος πως θέλετε να αρθεί ο αποκλεισμός του κανόνα #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Είστε σίγουρος πως θέλετε να επανεκκινήσετε το %s?',
'Welcome' => 'Καλωσήρθατε',
'LOGGED_IN_AS' => 'Συνδεδεμένος ως χρήστης %s',
@@ -495,5 +497,108 @@ $LANG['el'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php
index b39397f02..a421ef410 100644
--- a/web/inc/i18n/en.php
+++ b/web/inc/i18n/en.php
@@ -159,7 +159,7 @@ $LANG['en'] = array(
'SSL Domains' => 'SSL Domains',
'Web Aliases' => 'Web Aliases',
'per domain' => 'per domain',
- 'DNS Domains' => 'DNS Domains',
+ 'DNS domains' => 'DNS Domains',
'DNS Domains' => 'DNS Domains',
'DNS records' => 'DNS records' ,
'Name Servers' => 'Name Servers',
@@ -219,6 +219,7 @@ $LANG['en'] = array(
'Bandwidth Usage eth0' => 'Bandwidth Usage eth0',
'FTP Usage' => 'FTP Usage',
'SSH Usage' => 'SSH Usage',
+ 'Exim Usage' => 'Exim Usage',
'reverse proxy' => 'reverse proxy',
'web server' => 'web server',
'dns server' => 'dns server',
@@ -347,6 +348,7 @@ $LANG['en'] = array(
'Banlist' => 'Banlist',
'ranges are acceptable' => 'ranges are acceptable',
'CIDR format is supported' => 'CIDR format is supported',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 account',
@@ -421,6 +423,7 @@ $LANG['en'] = array(
'DELETE_RULE_CONFIRMATION' => 'Are you sure you want to delete rule #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Are you sure you want to suspend rule #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Are you sure you want to unsuspend rule #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Are you sure you want to restart %s?',
'Welcome' => 'Welcome',
'LOGGED_IN_AS' => 'Logged in as user %s',
@@ -494,5 +497,110 @@ $LANG['en'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
-);
\ No newline at end of file
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
+
+);
diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php
index a6d48f849..f15425a88 100644
--- a/web/inc/i18n/es.php
+++ b/web/inc/i18n/es.php
@@ -347,6 +347,7 @@ $LANG['es'] = array(
'Banlist' => 'Lista negra',
'ranges are acceptable' => 'rangos son aceptables',
'CIDR format is supported' => 'Formato CIDR se admite',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 cuenta',
@@ -421,6 +422,7 @@ $LANG['es'] = array(
'DELETE_RULE_CONFIRMATION' => '¿Está seguro que desea eliminar la regla #%s',
'SUSPEND_RULE_CONFIRMATION' => '¿Está seguro que desea suspender la regla #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => '¿Está seguro que desea habilitar la regla #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => '¿Está seguro que desea reiniciar %s?',
'Welcome' => 'Bienvenido',
'LOGGED_IN_AS' => 'Conectado como el usuario %s',
@@ -439,12 +441,12 @@ $LANG['es'] = array(
'RESTORE_SCHEDULED' => "La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.",
'RESTORE_EXISTS' => "Una tarea se está ejecutando. Por favor espere a que esta termine.",
- 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp",
- 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *",
- 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster",
- 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *",
- 'CRON_EXCLUSIONS' => "To exclude all jobs use *",
- 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *",
+ 'WEB_EXCLUSIONS' => "Ingrese el nombre de dominio, uno por línea. Para excluir a todos utiliza *. Para excluir uno específico utilice el siguiente formato: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Ingrese el nombre de dominio, uno por línea. Para excluir a todos utiliza *",
+ 'MAIL_EXCLUSIONS' => "Ingrese el nombre del correo, uno por línea. Para excluir a todos utiliza *. Para excluir uno específico utilice el siguiente formato: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Ingrese el nombre completo de la base de datos, una por linea. Para excluir a todos utiliza *",
+ 'CRON_EXCLUSIONS' => "Para excluir todos los trabajos utiliza *",
+ 'USER_EXCLUSIONS' => "Ingrese el nombre del directorio, uno por linea. Para excluir todos los firectorios utiliza * To exlude all dirs use *",
'Welcome to Vesta Control Panel' => 'Bienvenido al Panel de Control Vesta',
'MAIL_FROM' => 'Panel de Control Vesta ',
@@ -469,30 +471,134 @@ $LANG['es'] = array(
'MAIL_RESET_SUBJECT' => 'Cambio de Contraseña en %s',
'PASSWORD_RESET_REQUEST' => "Para cambiar su contraseña del panel, por favor siga este link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativamente, puede dirigirse a https://%s/reset/?action=code&user=%s e ingresar el siguiente código de cambio:\n%s\n\nSi usted no ha solicitado un cambio de contraseña, por favor ignore este mensaje y acepte nuestras disculpas.\n\n--\nPanel de Control Vesta\n",
- 'Jan' => 'Jan',
+ 'Jan' => 'Ene',
'Feb' => 'Feb',
'Mar' => 'Mar',
- 'Apr' => 'Apr',
+ 'Apr' => 'Abr',
'May' => 'May',
'Jun' => 'Jun',
'Jul' => 'Jul',
- 'Aug' => 'Aug',
+ 'Aug' => 'Ago',
'Sep' => 'Sep',
'Oct' => 'Oct',
'Nov' => 'Nov',
- 'Dec' => 'Dec',
+ 'Dec' => 'Dic',
- 'Configuring Server' => 'Configuring Server',
+ 'Configuring Server' => 'Configurar Servidor',
'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
- 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
- 'Reseller Role' => 'Reseller Role',
- 'Web Config Editor' => 'Web Config Editor',
- 'Template Manager' => 'Template Manager',
- 'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
+ 'Time Zone' => 'Zona Horaria',
+ 'Default Language' => 'Idioma por Defecto',
+ 'FileSystem Disk Quota' => 'Cuota del disco FileSystem',
+ 'Vesta Control Panel Plugins' => 'Plugins de Vesta Control Panel',
+ 'preview' => 'previsualizar',
+ 'Reseller Role' => 'Revendedor',
+ 'Web Config Editor' => 'Editor de Configuración Web',
+ 'Template Manager' => 'Manejador de PLantilla',
+ 'Backup Migration Manager' => 'Manejador de Migracion de Respaldos',
+ 'FileManager' => 'Manejador de Archivos',
+
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'ordenar por',
+ 'Date' => 'Fecha',
+ 'Starred' => 'Favorito',
+ 'Name' => 'Nombre',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/fi.php b/web/inc/i18n/fi.php
index 89a7b78f4..75259aed5 100644
--- a/web/inc/i18n/fi.php
+++ b/web/inc/i18n/fi.php
@@ -351,6 +351,7 @@ $LANG['fi'] = array(
'Banlist' => 'Bannilista',
'ranges are acceptable' => 'vaihteluvälit ovat hyväksyttäviä',
'CIDR format is supported' => 'CIDR muotoa tuetaan',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 tili',
@@ -425,6 +426,7 @@ $LANG['fi'] = array(
'DELETE_RULE_CONFIRMATION' => 'Haluatko varmasti poistaa säännön #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Haluatko varmasti keskeyttää sääntöä #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Haluatko varmasti ottaa käyttöön sääntöä #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Haluatko varmasti käynnistää uudelleen %s?',
'Welcome' => 'Tervetuloa',
'LOGGED_IN_AS' => 'Kirjautunut käyttäjänä %s',
@@ -498,5 +500,108 @@ $LANG['fi'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php
index aee82b718..7772ba06e 100644
--- a/web/inc/i18n/fr.php
+++ b/web/inc/i18n/fr.php
@@ -349,6 +349,7 @@ $LANG['fr'] = array(
'Banlist' => 'Banlist',
'ranges are acceptable' => 'plages sont acceptables',
'CIDR format is supported' => 'Le format CIDR est pris en charge',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 compte',
@@ -423,6 +424,7 @@ $LANG['fr'] = array(
'DELETE_RULE_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer la règle #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre la règle #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver la règle #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Êtes-vous sûr de vouloir redémarrer le serveur %s ?',
'Welcome' => 'Bienvenue',
'LOGGED_IN_AS' => 'Connecté en tant que %s',
@@ -496,5 +498,108 @@ $LANG['fr'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/hu.php b/web/inc/i18n/hu.php
index a69241d3e..7da0338ba 100644
--- a/web/inc/i18n/hu.php
+++ b/web/inc/i18n/hu.php
@@ -1,28 +1,30 @@
'Csomagok',
- 'IP' => 'IP',
+ 'IP' => 'IP címek',
'Graphs' => 'Grafikonok',
'Statistics' => 'Statisztikák',
- 'Log' => 'Log',
- 'Server' => 'Szerveren',
+ 'Log' => 'Naplók',
+ 'Server' => 'Szerver',
+ 'Firewall' => 'Tűzfal',
'Services' => 'Szolgáltatások',
- 'Firewall' => 'Firewall',
'Updates' => 'Frissítések',
'Log in' => 'Belépés',
'Log out' => 'Kilépés',
- 'USER' => 'USER',
+ 'USER' => 'ÜGYFÉL',
'WEB' => 'WEB',
'DNS' => 'DNS',
- 'MAIL' => 'MAIL',
+ 'MAIL' => 'LEVELEZÉS',
'DB' => 'ADATBÁZIS',
'CRON' => 'CRON',
'BACKUP' => 'MENTÉS',
@@ -41,9 +43,9 @@ $LANG['hu'] = array(
'Restore All' => 'Összes visszaállítása',
'Add Package' => 'Csomag hozzáadása',
'Add IP' => 'Új IP',
- 'Add Rule' => 'Új szabály',
- 'Ban IP Address' => 'Új IP',
- 'Add one more FTP Account' => 'Add one more FTP Account',
+ 'Add Rule' => 'Új tűzfal szabály',
+ 'Ban IP Address' => 'IP cím tiltása',
+ 'Add one more FTP Account' => 'Új FTP hozzáférés',
'Search' => 'Keresés',
'Overall Statistics' => 'Átfogó statisztikák',
'Daily' => 'Napi',
@@ -55,8 +57,8 @@ $LANG['hu'] = array(
'Save' => 'Mentés',
'Submit' => 'OK',
- 'toggle all' => 'összes kinyit/bezár',
- 'apply to selected' => 'alkalmazás a kiválasztottakra',
+ 'toggle all' => 'összes kijelölése',
+ 'apply to selected' => 'művelet a kijelöltekkel',
'rebuild' => 'újratelepít',
'rebuild web' => 'web újraépítés',
'rebuild dns' => 'dns újraépítés',
@@ -64,10 +66,10 @@ $LANG['hu'] = array(
'rebuild db' => 'adatbázis újraépítés',
'rebuild cron' => 'cron újraépítés',
'update counters' => 'számlálók frissítése',
- 'suspend' => 'felfüggeszt',
- 'unsuspend' => 'újraaktivál',
+ 'suspend' => 'felfüggesztés',
+ 'unsuspend' => 'újraaktiválás',
'delete' => 'törlés',
- 'show per user' => 'felhasználónként listáz',
+ 'show per user' => 'minden felhasználó',
'login as' => 'bejelentkezés, mint',
'logout' => 'kilépés',
'edit' => 'szerkesztés',
@@ -78,13 +80,13 @@ $LANG['hu'] = array(
'list accounts' => '%s fiók listázása',
'add account' => 'fiók hozzáadása',
'open webmail' => 'webmail megnyitása',
- 'list fail2ban' => 'fail2ban listázása',
+ 'list fail2ban' => 'fail2ban lista',
'open %s' => '%s megnyitása',
'download' => 'letöltés',
'restore' => 'visszaállítás',
'configure restore settings' => 'visszaállítási beállítások konfigurálása',
- 'stop' => 'stop',
- 'start' => 'start',
+ 'stop' => 'leállítás',
+ 'start' => 'indítás',
'restart' => 'újraindítás',
'update' => 'frissítés',
'generate' => 'létrehoz',
@@ -92,8 +94,8 @@ $LANG['hu'] = array(
'reread IP' => 'IP újraolvasása',
'enable autoupdate' => 'automatikus frissítés engedélyezése',
'disable autoupdate' => 'automatikus frissítés tiltása',
- 'turn on notifications' => 'bekapcsol értesítések',
- 'turn off notifications' => 'kikapcsolni értesítések',
+ 'turn on notifications' => 'értesítések bekapcsolása',
+ 'turn off notifications' => 'értesítések kikapcsolása',
'Adding User' => 'Felhasználó hozzáadása',
'Editing User' => 'Felhasználó szerkesztése',
@@ -117,10 +119,10 @@ $LANG['hu'] = array(
'Editing IP Address' => 'IP cím szerkesztése',
'Editing Backup Exclusions' => 'Mentési kivételek szerkesztése',
'Generating CSR' => 'CSR generálása',
- 'Listing' => 'Listázás',
+ 'Listing' => 'Lista:',
'Search Results' => 'Keresési eredmények',
- 'Adding Firewall Rule' => 'Firewal hozzáadása',
- 'Editing Firewall Rule' => 'Firewall szerkesztése',
+ 'Adding Firewall Rule' => 'Tűzfal szabály hozzáadása',
+ 'Editing Firewall Rule' => 'Tűzfal szabály szerkesztése',
'Adding IP Address to Banlist' => 'IP cím hozzáadása',
'active' => 'aktív',
@@ -157,20 +159,20 @@ $LANG['hu'] = array(
'Backend Template' => 'Backend sablon',
'Proxy Template' =>'Proxy sablon',
'DNS Template' => 'DNS sablon',
- 'Web Domains' => 'Web Domainek',
- 'SSL Domains' => 'SSL Domainek',
- 'Web Aliases' => 'Web Alias',
+ 'Web Domains' => 'Web domain',
+ 'SSL Domains' => 'SSL domain',
+ 'Web Aliases' => 'Web alias',
'per domain' => 'domainenként',
- 'DNS Domains' => 'DNS Domainek',
- 'DNS Domains' => 'DNS Domainek',
- 'DNS records' => 'DNS recordok' ,
- 'Name Servers' => 'Name Serverek',
- 'Mail Domains' => 'Mail Domainek',
- 'Mail Accounts' => 'Mail Fiókok',
- 'Cron Jobs' => 'Cron Jobs',
+ 'DNS Domains' => 'DNS domain',
+ 'DNS Domains' => 'DNS domain',
+ 'DNS records' => 'DNS record' ,
+ 'Name Servers' => 'Névszerverek',
+ 'Mail Domains' => 'Mail domain',
+ 'Mail Accounts' => 'Mail fiók',
+ 'Cron Jobs' => 'Cron feladat',
'SSH Access' => 'SSH hozzáférés',
- 'IP Addresses' => 'IP Címek',
- 'Backups' => 'Mentések',
+ 'IP Addresses' => 'IP cím',
+ 'Backups' => 'Mentés',
'Backup System' => 'Mentési rendszer',
'backup exclusions' => 'kihagyás a mentésből',
'template' => 'sablon',
@@ -184,7 +186,7 @@ $LANG['hu'] = array(
'TTL' => 'TTL',
'Expire' => 'Lejár',
'Records' => 'Rekordok',
- 'Catchall email' => 'Catchall email',
+ 'Catchall email' => 'Catchall e-mail',
'AntiVirus Support' => 'AntiVirus támogatás',
'AntiSpam Support' => 'AntiSpam támogatás',
'DKIM Support' => 'DKIM támogatás',
@@ -195,7 +197,7 @@ $LANG['hu'] = array(
'Do not store forwarded mail' => 'Továbbított e-mailek mentésének tiltása',
'database' => 'adatbázis',
'User' => 'Felhasználó',
- 'Host' => 'Hoszt',
+ 'Host' => 'Adatbázis szerver',
'Charset' => 'Karakterkódolás',
'Min' => 'Perc',
'Hour' => 'Óra',
@@ -206,19 +208,21 @@ $LANG['hu'] = array(
'Run Time' => 'Futási idő',
'Backup Size' => 'Mentés mérete',
'SYS' => 'SYS',
- 'Domains' => 'Domainek',
+ 'Domains' => 'Domain',
'Status' => 'Státusz',
'shared' => 'megosztott',
'dedicated' => 'dedikált',
'Owner' => 'Tulajdonos',
'Users' => 'Felhasználók',
- 'Load Average' => 'Load átlag',
+ 'Load Average' => 'Átlag terhelés',
'Memory Usage' => 'Memória használat',
'HTTPD Usage' => 'HTTPD használat',
'NGINX Usage' => 'NGINX használat',
'MySQL Usage on localhost' => 'MySQL használat a localhoston',
'PostgreSQL Usage on localhost' => 'PostgreSQL használat a localhoston',
'Bandwidth Usage eth0' => 'eth0 sávszélesség használat',
+ 'Bandwidth Usage eth1' => 'eth1 sávszélesség használat',
+ 'Exim Usage' => 'Exim használat',
'FTP Usage' => 'FTP használat',
'SSH Usage' => 'SSH használat',
'reverse proxy' => 'fordított proxy',
@@ -226,10 +230,12 @@ $LANG['hu'] = array(
'dns server' => 'dns szerver',
'mail server' => 'mail szerver',
'pop/imap server' => 'pop/imap szerver',
- 'email antivirus' => 'email antivirus',
- 'email antispam' => 'email antispam',
+ 'email antivirus' => 'e-mail antivirus',
+ 'email antispam' => 'e-mail antispam',
'database server' => 'adatbázis szerver',
'ftp server' => 'ftp szerver',
+ 'brute-force monitor' => 'betörésvédelem',
+ 'firewall' => 'tűzfal',
'job scheduler' => 'job ütemező',
'CPU' => 'CPU',
'Memory' => 'Memória',
@@ -244,11 +250,11 @@ $LANG['hu'] = array(
'Owner' => 'Tulajdonos',
'Username' => 'Felhasználónév',
'Password' => 'Jelszó',
- 'Email' => 'Email',
+ 'Email' => 'E-mail',
'Package' => 'Csomag',
'Language' => 'Nyelv',
- 'First Name' => 'Keresztnév',
- 'Last Name' => 'Vezetéknév',
+ 'First Name' => 'Vezetéknév',
+ 'Last Name' => 'Keresztnév',
'Send login credentials to email address' => 'Belépési adatok küldése e-mailben',
'Default Template' => 'Alapértelmezett sablon',
'Default Name Servers' => 'Alapértelmezett névszerverek',
@@ -268,6 +274,7 @@ $LANG['hu'] = array(
'Account' => 'Fiók',
'Prefix will be automaticaly added to username' => 'A(z) %s előtag automatikusan hozzáadásra kerül a felhasználónévhez.',
'Send FTP credentials to email' => 'FTP adatok küldése e-mailben',
+ 'Path' => 'Útvonal',
'Expiration Date' => 'Lejárati dárum',
'YYYY-MM-DD' => 'ÉÉÉÉ-HH-NN',
'Name servers' => 'Névszerverek',
@@ -291,24 +298,24 @@ $LANG['hu'] = array(
'Assigned user' => 'Hozzárendelt felhasználó',
'Assigned domain' => 'Hozzárendelt domain',
'NAT IP association' => 'NAT IP hozzárendelés',
- 'shell' => 'rendszerhéj',
- 'web domains' => 'web domainek',
- 'web aliases' => 'web aliaszok',
- 'dns records' => 'dns rekordok',
- 'mail domains' => 'mail domainek',
- 'mail accounts' => 'mail fiókok',
- 'accounts' => 'fiókok',
- 'databases' => 'adatbázisok',
- 'cron jobs' => 'cron jobs',
- 'backups' => 'mentések',
+ 'shell' => 'shell',
+ 'web domains' => 'web domain',
+ 'web aliases' => 'web aliasz',
+ 'dns records' => 'dns rekord',
+ 'mail domains' => 'mail domain',
+ 'mail accounts' => 'mail fiók',
+ 'accounts' => 'fiók',
+ 'databases' => 'adatbázis',
+ 'cron jobs' => 'cron feladat',
+ 'backups' => 'mentés',
'quota' => 'kvóta',
'day of week' => 'a hét napja',
'cmd' => 'cmd',
- 'users' => 'felhasználók',
+ 'users' => 'felhasználó',
'domains' => 'domainek',
- 'aliases' => 'aliaszok',
- 'records' => 'rekordok',
- 'jobs' => 'jobs',
+ 'aliases' => 'aliasz',
+ 'records' => 'rekord',
+ 'jobs' => 'feladat',
'username' => 'felhasználónév',
'password' => 'jelszó',
'type' => 'típus',
@@ -323,7 +330,7 @@ $LANG['hu'] = array(
'ns1' => 'ns1',
'ns2' => 'ns2',
'user' => 'felhasználó',
- 'email' => 'email',
+ 'email' => 'e-mail',
'first name' => 'vezetéknév',
'last name' => 'keresztnév',
'account' => 'fiók',
@@ -338,7 +345,7 @@ $LANG['hu'] = array(
'Download AccessLog' => 'AccessLog letöltése',
'Download ErrorLog' => 'ErrorLog letöltése',
'Country' => 'Ország',
- '2 letter code' => '2 Irányítószám',
+ '2 letter code' => 'Országkód (2 karakter)',
'State / Province' => 'Megye',
'City / Locality' => 'Város',
'Organization' => 'Szervezet',
@@ -347,18 +354,19 @@ $LANG['hu'] = array(
'Port' => 'Port',
'Comment' => 'Megjegyzés',
'Banlist' => 'Banlista',
- 'ranges are acceptable' => 'tartományok megengedett',
- 'CIDR format is supported' => 'CIDR formátum támogatott',
+ 'ranges are acceptable' => 'tartományok használata megengedett',
+ 'CIDR format is supported' => 'a CIDR formátum támogatott',
+ 'Add one more Name Server' => 'Add one more Name Server',
- 'unlimited' => 'unlimited',
+ 'unlimited' => 'végtelen',
'1 account' => '1 fiók',
'%s accounts' => '%s fiók',
'1 domain' => '1 domain',
- '%s domains' => '%s domainek',
+ '%s domains' => '%s domain',
'1 record' => '1 rekord',
- '%s records' => '%s recordok',
+ '%s records' => '%s record',
'1 mail account' => '1 mail fiók',
- '%s mail accounts' => '%s mail fiókok',
+ '%s mail accounts' => '%s mail fiók',
'1 database' => '1 adatbázis',
'%s databases' => '%s adatbázis',
'1 cron job' => '1 cron job',
@@ -377,8 +385,8 @@ $LANG['hu'] = array(
'%s objects' => '%s objektum',
'no exclusions' => 'nincs kihagyás',
'1 rule' => '1 szabály',
- '%s rules' => '%s szabályok',
- 'There are no currently banned IP' => 'Nem tiltott IP',
+ '%s rules' => '%s szabály',
+ 'There are no currently banned IP' => 'Jelenleg nincs tiltott IP',
'USER_CREATED_OK' => '%s felhasználó sikeresen létrehozva.',
'WEB_DOMAIN_CREATED_OK' => '%s domain sikeresen létrehozva.',
@@ -394,8 +402,8 @@ $LANG['hu'] = array(
'RULE_CREATED_OK' => 'Szabály sikeresen létrehozva.',
'Autoupdate has been successfully enabled' => 'Az automatikus frissítés bekapcsolva.',
'Autoupdate has been successfully disabled' => 'Az automatikus frissítés kikapcsolva.',
- 'Cronjob email reporting has been successfully enabled' => 'Cronjob email reporting has been successfully enabled',
- 'Cronjob email reporting has been successfully disabled' => 'Cronjob email reporting has been successfully disabled',
+ 'Cronjob email reporting has been successfully enabled' => 'Cronjob e-mail jelentés bekapcsolva.',
+ 'Cronjob email reporting has been successfully disabled' => 'Cronjob e-mail jelentés kikapcsolva.',
'Changes has been saved.' => 'A módosítások sikeresen mentésre kerültek.',
'Confirmation' => 'Megerősítés',
'DELETE_USER_CONFIRMATION' => 'Biztos, hogy törölni szeretnéd %s felhasználót?',
@@ -422,6 +430,7 @@ $LANG['hu'] = array(
'DELETE_IP_CONFIRMATION' => 'Biztos, hogy törlöd a(z) IP címet?',
'DELETE_RULE_CONFIRMATION' => 'Biztos, hogy törlöd a #%s szabályok?',
'SUSPEND_RULE_CONFIRMATION' => 'Biztos, hogy felfüggeszted a #%s szabályok?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Biztos, hogy újra szeretnéd aktiválni a #%s szabályok?',
'RESTART_CONFIRMATION' => 'Are you sure you want to restart %s?',
'Welcome' => 'Üdvözöljük',
@@ -448,8 +457,8 @@ $LANG['hu'] = array(
'CRON_EXCLUSIONS' => "Az összes job kihagyásához használj "*" -ot.",
'USER_EXCLUSIONS' => "Írd be a könyvtár nevét, soronként egyet. Az összes kihagyásához használj "*" -ot.",
- 'Welcome to Vesta Control Panel' => 'Üdv, a Kezelőfelület!',
- 'MAIL_FROM' => 'Kezelőfelület ',
+ 'Welcome to Vesta Control Panel' => 'Üdvözli a Vesta Control Panel!',
+ 'MAIL_FROM' => 'Vesta Control Panel ',
'GREETINGS_GORDON_FREEMAN' => "Üdv, %s %s,\n",
'GREETINGS' => "Üdv,\n",
'ACCOUNT_READY' => "A fiókod létrejött és készen áll a használatra.\n\nhttps://%s/login/\nFelhasználónév: %s\nJelszó: %s\n\n--\nKezelőfelület\n",
@@ -473,28 +482,131 @@ $LANG['hu'] = array(
'Jan' => 'Jan',
'Feb' => 'Feb',
- 'Mar' => 'Mar',
- 'Apr' => 'Apr',
- 'May' => 'May',
- 'Jun' => 'Jun',
- 'Jul' => 'Jul',
+ 'Mar' => 'Már',
+ 'Apr' => 'Ápr',
+ 'May' => 'Máj',
+ 'Jun' => 'Jún',
+ 'Jul' => 'Júl',
'Aug' => 'Aug',
- 'Sep' => 'Sep',
- 'Oct' => 'Oct',
+ 'Sep' => 'Sze',
+ 'Oct' => 'Okt',
'Nov' => 'Nov',
'Dec' => 'Dec',
- 'Configuring Server' => 'Configuring Server',
+ 'Configuring Server' => 'Szerver beállítások',
'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
- 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
- 'Reseller Role' => 'Reseller Role',
- 'Web Config Editor' => 'Web Config Editor',
- 'Template Manager' => 'Template Manager',
+ 'Time Zone' => 'Időzóna',
+ 'Default Language' => 'Alapértelmezett nyelv',
+ 'FileSystem Disk Quota' => 'Fájlrendszer kvóta',
+ 'Vesta Control Panel Plugins' => 'Vesta Control Panel Pluginek',
+ 'preview' => 'előnézet',
+ 'Reseller Role' => 'Viszonteladói jogosultságok',
+ 'Web Config Editor' => 'Web konfiguráció szerkesztő',
+ 'Template Manager' => 'Sablonkezelő',
'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
+ 'FileManager' => 'Fájlmenedzser',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php
index 1b5d26d56..0a0d935a6 100644
--- a/web/inc/i18n/id.php
+++ b/web/inc/i18n/id.php
@@ -350,6 +350,7 @@ $LANG['id'] = array(
'Banlist' => 'Banlist',
'ranges are acceptable' => 'rentang diperbolehkan',
'CIDR format is supported' => 'Format CIDR didukung',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 pengguna',
@@ -424,6 +425,7 @@ $LANG['id'] = array(
'DELETE_RULE_CONFIRMATION' => 'Aturan #%s beneran mau dihapus?',
'SUSPEND_RULE_CONFIRMATION' => 'Aturan #%s beneran mau ditangguhin?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Penangguhan aturan #%s mau dibatalin. Yakin?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => '%s mau me-restart?',
'Welcome' => 'Selamat Datang',
'LOGGED_IN_AS' => 'Masuk sebagai pengguna %s',
@@ -497,5 +499,108 @@ $LANG['id'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/it.php b/web/inc/i18n/it.php
index 933cc2341..46fc8981f 100644
--- a/web/inc/i18n/it.php
+++ b/web/inc/i18n/it.php
@@ -348,6 +348,7 @@ $LANG['it'] = array(
'Banlist' => 'Banlista',
'ranges are acceptable' => 'gamme sono ammessi',
'CIDR format is supported' => 'formato CIDR e supportato',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 account',
@@ -422,6 +423,7 @@ $LANG['it'] = array(
'DELETE_RULE_CONFIRMATION' => 'Sei sicuro di voler cancellare il regola #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Sei sicuro di voler disabilitare il regola #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Sei sicuro di voler riabilitare il regola #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Sei sicuro di voler riavviare %s?',
'Welcome' => 'Benvenuto',
'LOGGED_IN_AS' => 'Connesso come l\'utente %s',
@@ -495,5 +497,108 @@ $LANG['it'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Data',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/ja.php b/web/inc/i18n/ja.php
new file mode 100644
index 000000000..7f664cb15
--- /dev/null
+++ b/web/inc/i18n/ja.php
@@ -0,0 +1,603 @@
+ 'パッケージ',
+ 'IP' => 'IPアドレス',
+ 'Graphs' => 'グラフ',
+ 'Statistics' => '統計',
+ 'Log' => 'ログ',
+ 'Server' => 'サーバー',
+ 'Services' => 'サービス',
+ 'Firewall' => 'ファイアウォール',
+ 'Updates' => '更新',
+ 'Log in' => 'ログイン',
+ 'Log out' => 'ログアウト',
+
+ 'USER' => 'ユーザー',
+ 'WEB' => 'ウェブ',
+ 'DNS' => 'DNS',
+ 'MAIL' => 'メール',
+ 'DB' => 'データベース',
+ 'CRON' => 'Cron',
+ 'BACKUP' => 'バックアップ',
+
+ 'Add User' => 'ユーザーを追加',
+ 'Add Domain' => 'ドメインを追加',
+ 'Add Web Domain' => 'ウェブドメインを追加',
+ 'Add DNS Domain' => 'DNSドメインを追加',
+ 'Add DNS Record' => 'DNSレコードを追加',
+ 'Add Mail Domain' => 'メールドメインを追加',
+ 'Add Mail Account' => 'メールアカウントを追加',
+ 'Add Database' => 'データベースを追加',
+ 'Add Cron Job' => 'Cronジョブを追加',
+ 'Create Backup' => 'バックアップを作成',
+ 'Configure' => '設定',
+ 'Restore All' => 'すべて復元',
+ 'Add Package' => 'パッケージを追加',
+ 'Add IP' => 'IPアドレスを追加',
+ 'Add Rule' => '規則を追加',
+ 'Ban IP Address' => 'BANされているIPアドレス',
+ 'Search' => '検索',
+ 'Add one more FTP Account' => 'FTPアカウントを追加',
+ 'Overall Statistics' => '全統計',
+ 'Daily' => '日別',
+ 'Weekly' => '週別',
+ 'Monthly' => '月別',
+ 'Yearly' => '年別',
+ 'Add' => '追加',
+ 'Back' => '戻る',
+ 'Save' => '保存',
+ 'Submit' => '送信',
+
+ 'toggle all' => 'すべて選択',
+ 'apply to selected' => '選択された項目に適用:',
+ 'rebuild' => '再構築',
+ 'rebuild web' => 'ウェブを再構築',
+ 'rebuild dns' => 'DNSを再構築',
+ 'rebuild mail' => 'メールを再構築',
+ 'rebuild db' => 'データベースを再構築',
+ 'rebuild cron' => 'Cronを再構築',
+ 'update counters' => 'カウンタを更新',
+ 'suspend' => '凍結',
+ 'unsuspend' => '凍結解除',
+ 'delete' => '削除',
+ 'show per user' => 'ユーザー別',
+ 'login as' => '次のユーザーとしてログイン:',
+ 'logout' => 'ログアウト',
+ 'edit' => '編集',
+ 'open webstats' => 'ウェブ統計を開く',
+ 'view logs' => 'ログを表示',
+ 'list records' => '%s個のレコード',
+ 'add record' => 'レコードを追加',
+ 'list accounts' => '%s個のアカウント',
+ 'add account' => 'アカウントを追加',
+ 'open webmail' => 'ウェブメールを開く',
+ 'list fail2ban' => 'fail2banリスト',
+ 'open %s' => '%s を開く',
+ 'download' => 'ダウンロード',
+ 'restore' => '復元',
+ 'configure restore settings' => '設定を復元',
+ 'stop' => '停止',
+ 'start' => '開始',
+ 'restart' => '再起動',
+ 'update' => '更新',
+ 'generate' => '生成',
+ 'Generate CSR' => '証明書署名要求を生成',
+ 'reread IP' => 'IPアドレスを再読み込み',
+ 'enable autoupdate' => '自動更新を有効化',
+ 'disable autoupdate' => '自動更新を無効化',
+ 'turn on notifications' => '通知をオンにする',
+ 'turn off notifications' => '通知をオフにする',
+
+ 'Adding User' => 'ユーザーの追加',
+ 'Editing User' => 'ユーザーの編集',
+ 'Adding Domain' => 'ドメインの追加',
+ 'Editing Domain' => 'ドメインの編集',
+ 'Adding DNS Domain' => 'DNSドメインの追加',
+ 'Editing DNS Domain' => 'DNSドメインの編集',
+ 'Adding DNS Record' => 'DNSレコードの追加',
+ 'Editing DNS Record' => 'DNSレコードの編集',
+ 'Adding Mail Domain' => 'メールドメインの追加',
+ 'Editing Mail Domain' => 'メールドメインの編集',
+ 'Adding Mail Account' => 'メールアカウントの追加',
+ 'Editing Mail Account' => 'メールアカウントの編集',
+ 'Adding database' => 'データベースの追加',
+ 'Editing Cron Job' => 'Cronジョブの編集',
+ 'Adding Cron Job' => 'Cronジョブの追加',
+ 'Editing Database' => 'データベースの編集',
+ 'Adding Package' => 'パッケージの追加',
+ 'Editing Package' => 'パッケージの編集',
+ 'Adding IP address' => 'IPアドレスの追加',
+ 'Editing IP Address' => 'IPアドレスの編集',
+ 'Editing Backup Exclusions' => 'バックアップ除外設定の編集',
+ 'Generating CSR' => '証明書署名要求の生成',
+ 'Listing' => 'リスト中:',
+ 'Search Results' => '検索結果',
+ 'Adding Firewall Rule' => 'ファイアウォールの規則の追加',
+ 'Editing Firewall Rule' => 'ファイアウォールの規則の編集',
+ 'Adding IP Address to Banlist' => 'BANリストへのIPアドレスの追加',
+
+ 'active' => 'アクティブ',
+ 'spnd' => '凍結中',
+ 'suspended' => '凍結中',
+ 'running' => '実行中',
+ 'stopped' => '停止中',
+ 'outdated' => '旧版',
+ 'updated' => '最新版',
+
+ 'yes' => 'はい',
+ 'no' => 'いいえ',
+ 'none' => 'なし',
+ 'pb' => 'PB',
+ 'tb' => 'TB',
+ 'gb' => 'GB',
+ 'mb' => 'MB',
+ 'minute' => '分',
+ 'hour' => '時間',
+ 'day' => '日',
+ 'days' => '日',
+ 'hours' => '時間',
+ 'minutes' => '分',
+ 'month' => '月',
+ 'package' => 'パッケージ',
+ 'Bandwidth' => '帯域幅',
+ 'Disk' => 'ディスク',
+ 'Web' => 'ウェブ',
+ 'Mail' => 'メール',
+ 'Databases' => 'データベース',
+ 'User Directories' => 'ユーザーディレクトリ',
+ 'Template' => 'テンプレート',
+ 'Web Template' => 'ウェブ テンプレート',
+ 'Backend Template' => 'バックエンド テンプレート',
+ 'Proxy Template' =>'プロキシ テンプレート',
+ 'DNS Template' => 'DNSテンプレート',
+ 'Web Domains' => 'ウェブドメイン',
+ 'SSL Domains' => 'SSLドメイン',
+ 'Web Aliases' => 'ウェブエイリアス',
+ 'per domain' => 'ドメインごと',
+ 'DNS Domains' => 'DNSドメイン',
+ 'DNS Domains' => 'DNSドメイン',
+ 'DNS records' => 'DNSレコード',
+ 'Name Servers' => 'ネームサーバー',
+ 'Mail Domains' => 'メールドメイン',
+ 'Mail Accounts' => 'メールアカウント',
+ 'Cron Jobs' => 'Cronジョブ',
+ 'SSH Access' => 'SSHアクセス',
+ 'IP Addresses' => 'IPアドレス',
+ 'Backups' => 'バックアップ',
+ 'Backup System' => 'システムをバックアップ',
+ 'backup exclusions' => 'バックアップ除外設定',
+ 'template' => 'テンプレート',
+ 'SSL Support' => 'SSLのサポート',
+ 'SSL Home Directory' => 'SSLホームディレクトリ',
+ 'Proxy Support' => 'プロキシのサポート',
+ 'Proxy Extensions' => 'プロキシ対象拡張子',
+ 'Web Statistics' => 'ウェブアクセス統計',
+ 'Additional FTP Account' => '追加のFTPアカウント',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => '有効期限',
+ 'Records' => 'レコード',
+ 'Catchall email' => 'キャッチオール アドレス',
+ 'AntiVirus Support' => 'アンチウイルスのサポート',
+ 'AntiSpam Support' => 'アンチスパムのサポート',
+ 'DKIM Support' => 'DKIMのサポート',
+ 'Accounts' => 'アカウント',
+ 'Quota' => '割り当て量',
+ 'Autoreply' => '自動返信',
+ 'Forward to' => '転送先',
+ 'Do not store forwarded mail' => '転送されたメールを保存しない',
+ 'database' => 'データベース',
+ 'User' => 'ユーザー',
+ 'Host' => 'ホスト',
+ 'Charset' => '文字セット',
+ 'Min' => '分',
+ 'Hour' => '時',
+ 'Day' => '日',
+ 'Month' => '月',
+ 'Day of week' => '曜日',
+ 'local' => 'ローカル',
+ 'Run Time' => '実行時間',
+ 'Backup Size' => 'バックアップ容量',
+ 'SYS' => 'SYS',
+ 'Domains' => 'ドメイン',
+ 'Status' => '状態',
+ 'shared' => '共用',
+ 'dedicated' => '専用',
+ 'Owner' => '所有者',
+ 'Users' => 'ユーザー',
+ 'Load Average' => 'ロードアベレージ',
+ 'Memory Usage' => 'メモリ使用量',
+ 'HTTPD Usage' => 'HTTPD使用量',
+ 'NGINX Usage' => 'NGINX使用量',
+ 'MySQL Usage on localhost' => 'localhostにおけるMySQLの使用量',
+ 'PostgreSQL Usage on localhost' => 'localhostにおけるPostgreSQLの使用量',
+ 'Bandwidth Usage eth0' => 'eth0における帯域幅使用量',
+ 'FTP Usage' => 'FTP使用量',
+ 'SSH Usage' => 'SSH使用量',
+ 'reverse proxy' => 'リバースプロキシ',
+ 'web server' => 'ウェブサーバー',
+ 'dns server' => 'DNSサーバー',
+ 'mail server' => 'メールサーバー',
+ 'pop/imap server' => 'POP/IMAPサーバー',
+ 'email antivirus' => 'メールアンチウイルス',
+ 'email antispam' => 'アンチスパム',
+ 'database server' => 'データベースサーバー',
+ 'ftp server' => 'FTPサーバー',
+ 'job scheduler' => 'ジョブ スケジューラ',
+ 'CPU' => 'CPU',
+ 'Memory' => 'メモリ',
+ 'Uptime' => '稼働時間',
+ 'core package' => 'コアパッケージ',
+ 'php interpreter' => 'PHPインタプリタ',
+ 'internal web server' => '内部ウェブサーバー',
+ 'Version' => 'バージョン',
+ 'Release' => 'リリース',
+ 'Architecture' => 'アーキテクチャ',
+ 'Object' => 'オブジェクト',
+ 'Owner' => '所有者',
+ 'Username' => 'ユーザー名',
+ 'Password' => 'パスワード',
+ 'Email' => 'メールアドレス',
+ 'Package' => 'パッケージ',
+ 'Language' => '言語',
+ 'First Name' => '名',
+ 'Last Name' => '姓',
+ 'Send login credentials to email address' => 'ログイン情報をメールアドレスに送信',
+ 'Default Template' => '規定のテンプレート',
+ 'Default Name Servers' => '規定のネームサーバー',
+ 'Domain' => 'ドメイン',
+ 'DNS Support' => 'DNSのサポート',
+ 'Mail Support' => 'メールのサポート',
+ 'Advanced options' => '詳細設定',
+ 'Aliases' => 'エイリアス',
+ 'SSL Certificate' => 'SSL証明書',
+ 'SSL Key' => 'SSL鍵',
+ 'SSL Certificate Authority / Intermediate' => 'SSL認証局',
+ 'SSL CSR' => 'SSL証明書署名要求',
+ 'optional' => '任意',
+ 'internal' => '内部',
+ 'Statistics Authorization' => '統計の認証',
+ 'Statistics Auth' => '統計の認証',
+ 'Account' => 'アカウント',
+ 'Prefix will be automaticaly added to username' => 'ユーザー名には接頭辞 %s が自動的に付加されます',
+ 'Send FTP credentials to email' => 'FTPログイン情報をメールアドレスに送信',
+ 'Expiration Date' => '有効期限',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
+ 'Name servers' => 'ネームサーバー',
+ 'Record' => 'レコード',
+ 'IP or Value' => 'IPアドレスまたは値',
+ 'Priority' => '優先度',
+ 'Record Number' => 'レコード番号',
+ 'in megabytes' => 'MB単位',
+ 'Message' => 'メッセージ',
+ 'use local-part' => 'ローカルパートを使用',
+ 'one or more email addresses' => '1つ以上のメールアドレス',
+ 'Prefix will be automaticaly added to database name and database user' => 'データベース名およびユーザー名には接頭辞 %s が自動的に付加されます',
+ 'Database' => 'データベース',
+ 'Type' => '種類',
+ 'Minute' => '分',
+ 'Command' => 'コマンド',
+ 'Package Name' => 'パッケージ名',
+ 'Netmask' => 'ネットマスク',
+ 'Interface' => 'インターフェイス',
+ 'Shared' => '共用',
+ 'Assigned user' => '割り当てユーザー',
+ 'Assigned domain' => '割り当てドメイン',
+ 'NAT IP association' => 'NAT IP 割り当て',
+ 'shell' => 'シェル',
+ 'web domains' => 'ウェブドメイン',
+ 'web aliases' => 'ウェブエイリアス',
+ 'dns records' => 'DNSレコード',
+ 'mail domains' => 'メールドメイン',
+ 'mail accounts' => 'メールアカウント',
+ 'accounts' => 'アカウント',
+ 'databases' => 'データベース',
+ 'cron jobs' => 'Cronジョブ',
+ 'backups' => 'バックアップ',
+ 'quota' => '割り当て量',
+ 'day of week' => '曜日',
+ 'cmd' => 'コマンド',
+ 'users' => 'ユーザー',
+ 'domains' => 'ドメイン',
+ 'aliases' => 'エイリアス',
+ 'records' => 'レコード',
+ 'jobs' => 'ジョブ',
+ 'username' => 'ユーザー名',
+ 'password' => 'パスワード',
+ 'type' => '種類',
+ 'charset' => '文字セット',
+ 'domain' => 'ドメイン',
+ 'ip' => 'IPアドレス',
+ 'ip address' => 'IPアドレス',
+ 'IP address' => 'IPアドレス',
+ 'netmask' => 'ネットマスク',
+ 'interface' => 'インターフェイス',
+ 'assigned user' => '割り当てユーザー',
+ 'ns1' => 'ネームサーバー1',
+ 'ns2' => 'ネームサーバー2',
+ 'user' => 'ユーザー',
+ 'email' => 'メール',
+ 'first name' => '名',
+ 'last name' => '姓',
+ 'account' => 'アカウント',
+ 'ssl certificate' => 'SSL証明書',
+ 'ssl key' => 'SSL鍵',
+ 'stats user password' => 'statsユーザーパスワード',
+ 'stats username' => 'statsユーザー名',
+ 'stats password' => 'statsパスワード',
+ 'ftp user password' => 'FTPユーザーパスワード',
+ 'ftp user' => 'FTPユーザー',
+ 'Last 70 lines of %s.%s.log' => '%s.%s.log の最新70行',
+ 'Download AccessLog' => 'AccessLogをダウンロード',
+ 'Download ErrorLog' => 'ErrorLogをダウンロード',
+ 'Country' => '国',
+ '2 letter code' => '2レターコード',
+ 'State / Province' => '州 / 都道府県',
+ 'City / Locality' => '市区町村',
+ 'Organization' => '組織',
+ 'Action' => 'アクション',
+ 'Protocol' => 'プロトコル',
+ 'Port' => 'ポート',
+ 'Comment' => 'コメント',
+ 'Banlist' => 'BANリスト',
+ 'ranges are acceptable' => '範囲指定が可能です',
+ 'CIDR format is supported' => 'CIDRフォーマットが使用できます',
+ 'Add one more Name Server' => 'ネームサーバーを追加',
+
+ 'unlimited' => '無制限',
+ '1 account' => '1個のアカウント',
+ '%s accounts' => '%s個のアカウント',
+ '1 domain' => '1個のドメイン',
+ '%s domains' => '%s個のドメイン',
+ '1 record' => '1個のレコード',
+ '%s records' => '%s個のレコード',
+ '1 mail account' => '1個のメールアカウント',
+ '%s mail accounts' => '%s個のメールアカウント',
+ '1 database' => '1個のデータベース',
+ '%s databases' => '%s個のデータベース',
+ '1 cron job' => '1個のCronジョブ',
+ '%s cron jobs' => '%s個のCronジョブ',
+ '1 archive' => '1個のアーカイブ',
+ '%s archives' => '%s個のアーカイブ',
+ '1 package' => '1個のパッケージ',
+ '%s packages' => '%s個のパッケージ',
+ '1 IP address' => '1個のIPアドレス',
+ '%s IP addresses' => '%s個のIPアドレス',
+ '1 month' => '1ヶ月',
+ '%s months' => '%sヶ月',
+ '1 log record' => '1個のログレコード',
+ '%s log records' => '%s個のログレコード',
+ '1 object' => '1個のオブジェクト',
+ '%s objects' => '%s個のオブジェクト',
+ 'no exclusions' => '除外しない',
+ '1 rule' => '1個の規則',
+ '%s rules' => '%s個の規則',
+ 'There are no currently banned IP' => '現在BANされているIPはありません',
+
+ 'USER_CREATED_OK' => 'ユーザー %s は正常に作成されました',
+ 'WEB_DOMAIN_CREATED_OK' => 'ドメイン %s は正常に作成されました',
+ 'DNS_DOMAIN_CREATED_OK' => 'DNSドメイン %s は正常に作成されました',
+ 'DNS_RECORD_CREATED_OK' => 'レコード %s.%s は正常に作成されました',
+ 'MAIL_DOMAIN_CREATED_OK' => 'メールドメイン %s は正常に作成されました',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'メールアカウント %s@%s は正常に作成されました',
+ 'DATABASE_CREATED_OK' => 'データベース %s は正常に作成されました',
+ 'CRON_CREATED_OK' => 'Cronジョブは正常に作成されました',
+ 'IP_CREATED_OK' => 'IPアドレス %s は正常に作成されました',
+ 'PACKAGE_CREATED_OK' => 'パッケージ %s は正常に作成されました',
+ 'SSL_GENERATED_OK' => '証明書は正常に生成されました',
+ 'RULE_CREATED_OK' => '規則は正常に作成されました',
+ 'Autoupdate has been successfully enabled' => '自動更新が有効化されました',
+ 'Autoupdate has been successfully disabled' => '自動更新が無効化されました',
+ 'Cronjob email reporting has been successfully enabled' => 'Cronジョブのメール報告が有効化されました',
+ 'Cronjob email reporting has been successfully disabled' => 'Cronジョブのメール報告が無効化されました',
+ 'Changes has been saved.' => '変更が保存されました',
+ 'Confirmation' => '確認',
+ 'DELETE_USER_CONFIRMATION' => 'ユーザー %s を削除してもよろしいですか?',
+ 'SUSPEND_USER_CONFIRMATION' => 'ユーザー %s を凍結してもよろしいですか?',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'ユーザー %s の凍結を解除してもよろしいですか?',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'ドメイン %s を削除してもよろしいですか?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'ドメイン %s を凍結してもよろしいですか?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'ドメイン %s の凍結を解除してもよろしいですか?',
+ 'DELETE_RECORD_CONFIRMATION' => 'レコード %s を削除してもよろしいですか?',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'レコード %s を凍結してもよろしいですか?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'レコード %s の凍結を解除してもよろしいですか?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'メールアカウント %s を削除してもよろしいですか?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'メールアカウント %s を凍結してもよろしいですか?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'メールアカウント %s の凍結を解除してもよろしいですか?',
+ 'DELETE_DATABASE_CONFIRMATION' => 'データベース %s を削除してもよろしいですか?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'データベース %s を凍結してもよろしいですか?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'データベース %s の凍結を解除してもよろしいですか?',
+ 'DELETE_CRON_CONFIRMATION' => 'Cronジョブを削除してもよろしいですか?',
+ 'SUSPEND_CRON_CONFIRMATION' => 'Cronジョブを凍結してもよろしいですか?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'Cronジョブの凍結を解除してもよろしいですか?',
+ 'DELETE_BACKUP_CONFIRMATION' => 'バックアップ %s を削除してもよろしいですか?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'バックアップ除外設定 %s を削除してもよろしいですか?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'パッケージ %s を削除してもよろしいですか?',
+ 'DELETE_IP_CONFIRMATION' => 'IPアドレス %s を削除してもよろしいですか?',
+ 'DELETE_RULE_CONFIRMATION' => '規則 #%s を削除してもよろしいですか?',
+ 'SUSPEND_RULE_CONFIRMATION' => '規則 #%s を凍結してもよろしいですか?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => '規則 %s の凍結を解除してもよろしいですか?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'ページを離れてもよろしいですか?',
+ 'RESTART_CONFIRMATION' => '%s を再起動してもよろしいですか?',
+ 'Welcome' => 'ようこそ',
+ 'LOGGED_IN_AS' => '%s としてログインしました',
+ 'Error' => 'エラー',
+ 'Invalid username or password' => 'ユーザー名またはパスワードが無効です',
+ 'Invalid username or code' => 'ユーザー名またはコードが無効です',
+ 'Passwords not match' => 'パスワードが一致しません',
+ 'Please enter valid email address.' => '有効なメールアドレスを入力してください',
+ 'Field "%s" can not be blank.' => '"%s" を入力してください',
+ 'Password is too short.' => 'パスワードが短すぎます(少なくとも6文字必要です)',
+ 'Error code:' => 'エラーコード: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" に失敗しました',
+ 'IP address is in use' => 'IPアドレスは既に使われています',
+ 'BACKUP_SCHEDULED' => 'タスクがキューに追加されました バックアップがダウンロード可能になると、メールによる通知が送信されます',
+ 'BACKUP_EXISTS' => '現在バックアップが実行中です バックアップが完了するまでお待ちください',
+ 'RESTORE_SCHEDULED' => 'タスクがキューに追加されました 復元が完了するとメールによる通知が送信されます',
+ 'RESTORE_EXISTS' => '現在復元作業が実行中です 再度操作を行う前に復元作業が完了するまでお待ちください',
+
+ 'WEB_EXCLUSIONS' => "ドメイン名を一行ずつ入力してください
すべてのドメインを除外するには*を使用してください
特定のディレクトリを除外するには次の形式を用いてください: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "ドメイン名を一行ずつ入力してください
すべてのドメインを除外するには*を使用してください",
+ 'MAIL_EXCLUSIONS' => "ドメイン名を一行ずつ入力してください
すべてのドメインを除外するには*を使用してください
特定のアカウントを除外するには次の形式を用いてください: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "完全なデータベース名を一行ずつ入力してください
すべてのデータベースを除外するには*を使用してください",
+ 'CRON_EXCLUSIONS' => "すべてのジョブを除外するには*を使用してください",
+ 'USER_EXCLUSIONS' => "ディレクトリ名を一行ずつ入力してください
すべてのディレクトリを除外するには*を使用してください",
+
+ 'Welcome to Vesta Control Panel' => 'Vesta Control Panel にようこそ',
+ 'MAIL_FROM' => 'Vesta Control Panel ',
+ 'GREETINGS_GORDON_FREEMAN' => "こんにちは、 %s %s さん\n",
+ 'GREETINGS' => "こんにちは\n",
+ 'ACCOUNT_READY' => "アカウントは正常に作成され、使用する準備ができました\n\nhttps://%s/login/\nユーザー名: %s\nパスワード: %s\n\n--\nVesta Control Panel\n",
+
+ 'FTP login credentials' => 'FTPログイン情報',
+ 'FTP_ACCOUNT_READY' => "FTPアカウントは正常に作成され、使用する準備ができました\n\nホスト名: %s\nユーザー名: %s_%s\nパスワード: %s\n\n--\nVesta Control Panel\n",
+
+ 'Database Credentials' => 'データベースログイン情報',
+ 'DATABASE_READY' => "データベースは正常に作成されました\n\nデータベース名: %s\nユーザー名: %s\nパスワード: %s\n%s\n\n--\nVesta Control Panel\n",
+
+ 'forgot password' => 'パスワードを忘れた場合',
+ 'Confirm' => '確認',
+ 'New Password' => '新しいパスワード',
+ 'Confirm Password' => 'パスワードを再入力',
+ 'Reset' => 'リセット',
+ 'Reset Code' => 'リセットコード',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => '登録されたメールアドレスにパスワードのリセットコードが送信されました ',
+ 'MAIL_RESET_SUBJECT' => '%s のパスワードのリセット',
+ 'PASSWORD_RESET_REQUEST' => "コントロールパネルのパスワードをリセットするには、以下のリンクの手順に従ってください\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nもしくは、次のリンク( https://%s/reset/?action=code&user=%s )で以下のリセットコードを入力することもできます\n%s\n\nもしパスワードのリセットを要求していない場合は、このメールを無視してください\n\n--\nVesta Control Panel\n",
+
+ 'Jan' => '1月',
+ 'Feb' => '2月',
+ 'Mar' => '3月',
+ 'Apr' => '4月',
+ 'May' => '5月',
+ 'Jun' => '6月',
+ 'Jul' => '7月',
+ 'Aug' => '8月',
+ 'Sep' => '9月',
+ 'Oct' => '10月',
+ 'Nov' => '11月',
+ 'Dec' => '12月',
+
+ 'Configuring Server' => 'サーバー設定',
+ 'Hostname' => 'ホスト名',
+ 'Time Zone' => 'タイムゾーン',
+ 'Default Language' => '規定の言語',
+ 'FileSystem Disk Quota ' => 'ディスク割り当て量',
+ 'Vesta Control Panel Plugins' => 'Vesta Control Panel プラグイン',
+ 'preview' => 'プレビュー',
+ 'Reseller Role' => 'リセラーの役割',
+ 'Web Config Editor' => 'ウェブ設定エディタ',
+ 'Template Manager' => 'テンプレートマネージャー',
+ 'Backup Migration Manager' => 'バックアップ移行マネージャー',
+ 'FileManager' => 'ファイルマネージャー',
+ 'show: CPU / MEM / NET / DISK' => '表示: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'ソート',
+ 'Date' => '日付',
+ 'Starred' => 'スター付き',
+ 'Name' => '名前',
+
+ 'File Manager' => 'ファイルマネージャー',
+ 'type' => '種類',
+ 'size' => '容量',
+ 'date' => '日付',
+ 'name' => '名前',
+ 'Initializing' => '初期化中',
+ 'UPLOAD' => 'アップロード',
+ 'NEW FILE' => '新規ファイル',
+ 'NEW DIR' => '新規ディレクトリ',
+ 'DELETE' => '削除',
+ 'RENAME' => '名前の変更',
+ 'COPY' => 'コピー',
+ 'ARCHIVE' => 'アーカイブ',
+ 'EXTRACT' => '展開',
+ 'DOWNLOAD' => 'ダウンロード',
+ 'Hit' => '',
+ 'to reload the page' => 'を押すとページを再読み込みします',
+ 'Directory name cannot be empty' => 'ディレクトリ名を入力してください',
+ 'File name cannot be empty' => 'ファイル名を入力してください',
+ 'No file selected' => 'ファイルが選択されていません',
+ 'No file or folder selected' => 'ファイルやフォルダが選択されていません',
+ 'File type not supported' => 'サポートされていないファイル形式です',
+ 'Directory download not available in current version' => '現在のバージョンではディレクトリのダウンロードはできません',
+ 'Directory not available' => 'ディレクトリが使用できません',
+ 'Done' => '完了',
+ 'Close' => '閉じる',
+ 'Copy' => 'コピー',
+ 'Cancel' => 'キャンセル',
+ 'Rename' => '名前を変更',
+ 'Delete' => '削除',
+ 'Extract' => '展開',
+ 'Create' => '作成',
+ 'Compress' => '圧縮',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => '次のファイルをコピーしてもよろしいですか',
+ 'Are you sure you want to delete' => '次のファイルを削除してもよろしいですか',
+ 'into' => 'から',
+ 'existing files will be replaced' => '既に存在するファイルは置き換えられます',
+ 'Original name' => '元の名前',
+ 'File' => 'ファイル',
+ 'already exists' => 'は既に存在します',
+ 'Create file' => 'ファイルの作成',
+ 'Create directory' => 'ディレクトリの作成',
+
+ 'Add New object' => '新しい項目を追加する',
+ 'Save Form' => '変更を保存する',
+ 'Cancel saving form' => '変更を破棄する',
+ 'Go to USER list' => 'ユーザーの一覧に移動',
+ 'Go to WEB list' => 'ウェブの一覧に移動',
+ 'Go to DNS list' => 'DNSの一覧に移動',
+ 'Go to MAIL list' => 'メールの一覧に移動',
+ 'Go to DB list' => 'データベースの一覧に移動',
+ 'Go to CRON list' => 'CRONの一覧に移動',
+ 'Go to BACKUP list' => 'バックアップの一覧に移動',
+ 'Focus on search' => '検索欄にフォーカスする',
+ 'Display/Close shortcuts' => 'ショートカットの表示を切り替える',
+ 'Move backward through top menu' => '上部のメニューにおいて後方の項目に移動します',
+ 'Move forward through top menu' => '上部のメニューにおいて前方の項目に移動します',
+ 'Enter focused element' => 'フォーカスされた項目に入ります',
+
+ 'Upload' => 'アップロード',
+ 'New File' => 'ファイルの作成',
+ 'New Folder' => 'フォルダの作成',
+ 'Download' => 'ダウンロード',
+ 'Rename' => '名前の変更',
+ 'Copy' => 'コピー',
+ 'Archive' => 'アーカイブ',
+ 'Delete' => '削除',
+ 'Save File (in text editor)' => 'ファイルの保存(テキストエディタ上で)',
+ 'Close Popup / Cancel' => 'ポップアップを閉じる / キャンセルする',
+ 'Move Cursor Up' => 'カーソルを上に移動する',
+ 'Move Cursor Dow' => 'カーソルを下に移動する',
+ 'Switch to Left Tab' => '左のタブに切り替える',
+ 'Switch to Right Tab' => '右のタブに切り替える',
+ 'Switch Tab' => 'タブを切り替える',
+ 'Go to the Top of File List' => 'ファイルリストの先頭に移動する',
+ 'Go to the Last File' => '最後のファイルに移動する',
+ 'Open File/Enter Directory' => 'ファイルを開く / ディレクトリに入る',
+ 'Go to Parent Directory' => '親ディレクトリに移動する',
+ 'Select Current File' => 'ファイルを選択する',
+ 'Select Bunch of Files' => 'ファイルを範囲選択する',
+ 'Append File to the Current Selection' => 'ファイルを追加選択する',
+ 'Select All Files' => 'すべてのファイルを選択する',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'ライセンスキー',
+ 'Enter License Key' => 'ライセンスキーを入力',
+ 'Buy Licence' => 'ライセンスを購入',
+ 'Buy Lifetime License' => '永久ライセンスを購入',
+ 'Disable and Cancel Licence' => 'ライセンスをキャンセルして無効化する',
+ 'Licence Activated' => 'ライセンスが有効化されました',
+ 'Licence Deactivated' => 'ライセンスが無効化されました',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'ユーザーによるSSHの使用を禁止し、各自のホームディレクトリにのみアクセスできるように制限します',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => '高機能なファイルマネージャーを用いてウェブ上のファイルを閲覧、コピー、編集、表示、復旧できます',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'これは有償の機能で、有効化するにはライセンスキーを購入する必要があります'
+
+);
diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php
index 479755ba1..96e6ad576 100644
--- a/web/inc/i18n/nl.php
+++ b/web/inc/i18n/nl.php
@@ -348,6 +348,7 @@ $LANG['nl'] = array(
'Banlist' => 'Banlist',
'ranges are acceptable' => 'marges zijn toegestaan',
'CIDR format is supported' => 'CIDR-indeling wordt ondersteund',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 account',
@@ -422,6 +423,7 @@ $LANG['nl'] = array(
'DELETE_RULE_CONFIRMATION' => 'Weet u zeker dat u regel #%s wilt verwijderen?',
'SUSPEND_RULE_CONFIRMATION' => 'Weet u zeker dat u regel #%s wilt uitschakelen?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Weet u zeker dat u regel #%s weer wilt inschakelen?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Weet u zeker dat %s wilt herstarten?',
'Welcome' => 'Welkom',
'LOGGED_IN_AS' => 'Ingelogd als gebruiker %s',
@@ -495,5 +497,108 @@ $LANG['nl'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/no.php b/web/inc/i18n/no.php
index 0f7cd84bc..a3c8a92e2 100644
--- a/web/inc/i18n/no.php
+++ b/web/inc/i18n/no.php
@@ -348,6 +348,7 @@ $LANG['no'] = array(
'Banlist' => 'Blokkeringsliste',
'ranges are acceptable' => 'områder er tillatt',
'CIDR format is supported' => 'CIDR-format støttes',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 konto',
@@ -422,6 +423,7 @@ $LANG['no'] = array(
'DELETE_RULE_CONFIRMATION' => 'Er du sikker på at du vil slette regel #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Er du sikker på at du vil suspendere regel #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Er du sikker på at du vil oppheve suspensjon av regel #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Er du sikker på at du vil omstarte %s?',
'Welcome' => 'Velkommen',
'LOGGED_IN_AS' => 'Logget inn som %s',
@@ -495,5 +497,108 @@ $LANG['no'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
-);
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
+
+);
\ No newline at end of file
diff --git a/web/inc/i18n/pl.php b/web/inc/i18n/pl.php
new file mode 100644
index 000000000..19483d664
--- /dev/null
+++ b/web/inc/i18n/pl.php
@@ -0,0 +1,602 @@
+
+ */
+
+$LANG['pl'] = array(
+ 'Packages' => 'Pakiety',
+ 'IP' => 'IP',
+ 'Graphs' => 'Wykresy',
+ 'Statistics' => 'Statystyki',
+ 'Log' => 'Log',
+ 'Server' => 'Serwer',
+ 'Services' => 'Usługi',
+ 'Firewall' => 'Firewall',
+ 'Updates' => 'Aktualizacje',
+ 'Log in' => 'Zaloguj',
+ 'Log out' => 'Wyloguj',
+
+ 'USER' => 'USER',
+ 'WEB' => 'WEB',
+ 'DNS' => 'DNS',
+ 'MAIL' => 'MAIL',
+ 'DB' => 'DB',
+ 'CRON' => 'CRON',
+ 'BACKUP' => 'BACKUP',
+
+ 'Add User' => 'Dodaj użytkownika',
+ 'Add Domain' => 'Dodaj domenę',
+ 'Add Web Domain' => 'Dodaj domenę Web',
+ 'Add DNS Domain' => 'Dodaj domenę DNS',
+ 'Add DNS Record' => 'Dodaj rekord DNS',
+ 'Add Mail Domain' => 'Dodaj domenę mailową',
+ 'Add Mail Account' => 'Dodaj konto mailowe',
+ 'Add Database' => 'Dodaj bazę danych',
+ 'Add Cron Job' => 'Dodaj zadanie Crona',
+ 'Create Backup' => 'Stwórz kopię zapasową',
+ 'Configure' => 'Konfiguracja',
+ 'Restore All' => 'Przywróć wszystkie',
+ 'Add Package' => 'Dodaj pakiet',
+ 'Add IP' => 'Dodaj adres IP',
+ 'Add Rule' => 'Dodaj regułę',
+ 'Ban IP Address' => 'Zbanuj adres IP',
+ 'Search' => 'Wyszukaj',
+ 'Add one more FTP Account' => 'Dodaj następne konto FTP',
+ 'Overall Statistics' => 'Ogólne statystyki',
+ 'Daily' => 'Codzienne',
+ 'Weekly' => 'Tygodniowe',
+ 'Monthly' => 'Miesięczne',
+ 'Yearly' => 'Roczne',
+ 'Add' => 'Dodaj',
+ 'Back' => 'Wstecz',
+ 'Save' => 'Zapisz',
+ 'Submit' => 'Zastosuj',
+
+ 'toggle all' => 'zmień wszystkie',
+ 'apply to selected' => 'zastosuj w wybranych',
+ 'rebuild' => 'przebuduj',
+ 'rebuild web' => 'przebuduj web',
+ 'rebuild dns' => 'przebuduj dns',
+ 'rebuild mail' => 'przebuduj mail',
+ 'rebuild db' => 'przebuduj db',
+ 'rebuild cron' => 'przebuduj cron',
+ 'update counters' => 'zaktualizuj liczniki',
+ 'suspend' => 'zawieś',
+ 'unsuspend' => 'przywróć',
+ 'delete' => 'usuń',
+ 'show per user' => 'pokaż na użytkownika',
+ 'login as' => 'zaloguj jako',
+ 'logout' => 'wyloguj',
+ 'edit' => 'edytuj',
+ 'open webstats' => 'otwórz statystyki',
+ 'view logs' => 'pokaż logi',
+ 'list records' => 'pokaż %s rekordów',
+ 'add record' => 'dodaj rekord',
+ 'list accounts' => 'pokaż %s kont',
+ 'add account' => 'dodaj konto',
+ 'open webmail' => 'otwórz webmail',
+ 'list fail2ban' => 'pokaż listę fail2ban',
+ 'open %s' => 'otwórz %s',
+ 'download' => 'pobierz',
+ 'restore' => 'przywróć',
+ 'configure restore settings' => 'skonfiguruj przywracanie',
+ 'stop' => 'stop',
+ 'start' => 'start',
+ 'restart' => 'restart',
+ 'update' => 'zaktualizuj',
+ 'generate' => 'wygeneruj',
+ 'Generate CSR' => 'Wygeneruj CSR',
+ 'reread IP' => 'odczytaj ponownie IP',
+ 'enable autoupdate' => 'aktywuj automatyczną aktualizację',
+ 'disable autoupdate' => 'wyłącz automatyczną aktualizację',
+ 'turn on notifications' => 'włącz powiadomienia',
+ 'turn off notifications' => 'wyłącz powiadomienia',
+
+ 'Adding User' => 'Dodawanie użytkownika',
+ 'Editing User' => 'Edytowanie użytkownika',
+ 'Adding Domain' => 'Dodawanie domeny',
+ 'Editing Domain' => 'Edytowanie domeny',
+ 'Adding DNS Domain' => 'Dodawanie domeny DNS',
+ 'Editing DNS Domain' => 'Edytowanie domeny DNS',
+ 'Adding DNS Record' => 'Dodawanie rekordu DNS',
+ 'Editing DNS Record' => 'Edytowanie rekordu DNS',
+ 'Adding Mail Domain' => 'Dodawanie domeny email',
+ 'Editing Mail Domain' => 'Edytowanie domeny email',
+ 'Adding Mail Account' => 'Dodawanie konta email',
+ 'Editing Mail Account' => 'Edytowanie konta email',
+ 'Adding database' => 'Dodawanie bazy danych',
+ 'Editing Cron Job' => 'Edytowanie zadania Cron',
+ 'Adding Cron Job' => 'Dodawniae zadania Cron',
+ 'Editing Database' => 'Edytowanie bazy danych',
+ 'Adding Package' => 'Dodawanie pakietu',
+ 'Editing Package' => 'Edytowanie pakietu',
+ 'Adding IP address' => 'Dodawanie adresu IP',
+ 'Editing IP Address' => 'Edytowanie adresu IP',
+ 'Editing Backup Exclusions' => 'Edytowanie wyłączeń kopii zapasowej',
+ 'Generating CSR' => 'Generowanie CSR',
+ 'Listing' => 'Listowanie',
+ 'Search Results' => 'Wyniki wyszukiwania',
+ 'Adding Firewall Rule' => 'Dodawanie reguły zapory',
+ 'Editing Firewall Rule' => 'Edytowanie reguły zapory',
+ 'Adding IP Address to Banlist' => 'Dodawanie adresu IP do listy zbanowanych',
+
+ 'active' => 'aktywne',
+ 'spnd' => 'wstrzymane',
+ 'suspended' => 'zawieszone',
+ 'running' => 'działa',
+ 'stopped' => 'zatrzymane',
+ 'outdated' => 'nieaktualne',
+ 'updated' => 'zaktualizowane',
+
+ 'yes' => 'tak',
+ 'no' => 'nie',
+ 'none' => 'żadne',
+ 'pb' => 'pb',
+ 'tb' => 'tb',
+ 'gb' => 'gb',
+ 'mb' => 'mb',
+ 'minute' => 'minuta',
+ 'hour' => 'godzina',
+ 'day' => 'dzień',
+ 'days' => 'dni',
+ 'hours' => 'godziny',
+ 'minutes' => 'minuty',
+ 'month' => 'miesiąc',
+ 'package' => 'pakiet',
+ 'Bandwidth' => 'Transfer',
+ 'Disk' => 'Dysk',
+ 'Web' => 'Web',
+ 'Mail' => 'Mail',
+ 'Databases' => 'Bazy danych',
+ 'User Directories' => 'Katalogi użytkownika',
+ 'Template' => 'Szablon',
+ 'Web Template' => 'Szablon Web',
+ 'Backend Template' => 'Szablon Backendu',
+ 'Proxy Template' =>'Szablon Proxy',
+ 'DNS Template' => 'Szablon DNS',
+ 'Web Domains' => 'Domeny Web',
+ 'SSL Domains' => 'Domeny SSL',
+ 'Web Aliases' => 'Aliasy Web',
+ 'per domain' => 'na domenę',
+ 'DNS Domains' => 'Domeny DNS',
+ 'DNS records' => 'Rekordy DNS',
+ 'Name Servers' => 'Serwery nazw',
+ 'Mail Domains' => 'Domeny email',
+ 'Mail Accounts' => 'Konta email',
+ 'Cron Jobs' => 'Zadania Crona',
+ 'SSH Access' => 'Dostęp SSH',
+ 'IP Addresses' => 'Adresy IP',
+ 'Backups' => 'Kopie zapasowe',
+ 'Backup System' => 'System kopii zapasowych',
+ 'backup exclusions' => 'wyłączenia kopii zapasowej',
+ 'template' => 'szablon',
+ 'SSL Support' => 'Wsparcie dla SSL',
+ 'SSL Home Directory' => 'Folder główny SSL',
+ 'Proxy Support' => 'Wsparcie dla Proxy',
+ 'Proxy Extensions' => 'Rozszerzenia Proxy',
+ 'Web Statistics' => 'Statystyki Web',
+ 'Additional FTP Account' => 'Dodatkowe FTP',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => 'Wygasa',
+ 'Records' => 'Rekordy',
+ 'Catchall email' => 'Email Catchall',
+ 'AntiVirus Support' => 'Wsparcie dla antywirusa',
+ 'AntiSpam Support' => 'Wsparcie dla filtru antyspamowego',
+ 'DKIM Support' => 'Wsparcie dla DKIM',
+ 'Accounts' => 'Konta',
+ 'Quota' => 'Quota',
+ 'Autoreply' => 'Autoodpowiedź',
+ 'Forward to' => 'Przekaż dalej do',
+ 'Do not store forwarded mail' => 'Nie zapisuj przekazanych maili',
+ 'database' => 'baza danych',
+ 'User' => 'Użytkownik',
+ 'Host' => 'Host',
+ 'Charset' => 'Zestaw znaków',
+ 'Min' => 'Min',
+ 'Hour' => 'Godzina',
+ 'Day' => 'Dzień',
+ 'Month' => 'Miesiąc',
+ 'Day of week' => 'Dzień tygodnia',
+ 'local' => 'lokalne',
+ 'Run Time' => 'Czas uruchomienia',
+ 'Backup Size' => 'Wielkość kopii zapasowej',
+ 'SYS' => 'SYS',
+ 'Domains' => 'Domeny',
+ 'Status' => 'Status',
+ 'shared' => 'współdzielone',
+ 'dedicated' => 'dedykowane',
+ 'Owner' => 'Właściciel',
+ 'Users' => 'Użytkownicy',
+ 'Load Average' => 'Średnie obciążenie',
+ 'Memory Usage' => 'Użycie pamięci',
+ 'HTTPD Usage' => 'Użycie HTTPD',
+ 'NGINX Usage' => 'Użycie NGINX',
+ 'MySQL Usage on localhost' => 'Użycie MySQL na localhost',
+ 'PostgreSQL Usage on localhost' => 'Użycie PostgreSQL na localhost',
+ 'Bandwidth Usage eth0' => 'Użycie łącza eth0',
+ 'FTP Usage' => 'Użycie FTP',
+ 'SSH Usage' => 'Użycie SSH',
+ 'reverse proxy' => 'odwrotne proxy',
+ 'web server' => 'serwer web',
+ 'dns server' => 'serwer dns',
+ 'mail server' => 'serwer email',
+ 'pop/imap server' => 'serwer pop/imap',
+ 'email antivirus' => 'antywirus email',
+ 'email antispam' => 'antyspam email',
+ 'database server' => 'serwer bazy danych',
+ 'ftp server' => 'serwer ftp',
+ 'job scheduler' => 'planer zadań',
+ 'CPU' => 'CPU',
+ 'Memory' => 'Pamięć',
+ 'Uptime' => 'Czas uruchomienia',
+ 'core package' => 'pakiet jądra',
+ 'php interpreter' => 'interpreter php',
+ 'internal web server' => 'wewnętrzny serwer web',
+ 'Version' => 'Wersja',
+ 'Release' => 'Wydanie',
+ 'Architecture' => 'Architektura',
+ 'Object' => 'Objekt',
+ 'Owner' => 'Właściciel',
+ 'Username' => 'Nazwa użytkownika',
+ 'Password' => 'Hasło',
+ 'Email' => 'Email',
+ 'Package' => 'Pakiet',
+ 'Language' => 'Język',
+ 'First Name' => 'Imię',
+ 'Last Name' => 'Nazwisko',
+ 'Send login credentials to email address' => 'Wyślij dane logowania na adres email',
+ 'Default Template' => 'Domyślny szablon',
+ 'Default Name Servers' => 'Domyślne serwery nazw',
+ 'Domain' => 'Domena',
+ 'DNS Support' => 'Wsparcie dla DNS',
+ 'Mail Support' => 'Wsparcie dla poczty email',
+ 'Advanced options' => 'Ustawienia zaawansowane',
+ 'Aliases' => 'Aliasy',
+ 'SSL Certificate' => 'Certyfikat SSL',
+ 'SSL Key' => 'Klucz SSL',
+ 'SSL Certificate Authority / Intermediate' => 'Użąd certyfikacji SSL (CA) root / pośredni',
+ 'SSL CSR' => 'SSL CSR',
+ 'optional' => 'opcjonalne',
+ 'internal' => 'wewnętrzne',
+ 'Statistics Authorization' => 'Autoryzacja statystyk',
+ 'Statistics Auth' => 'Autoryzacja statystyk',
+ 'Account' => 'Konto',
+ 'Prefix will be automaticaly added to username' => 'Przedrostek %s zostanie automatycznie dodany do nazwy użytkownika',
+ 'Send FTP credentials to email' => 'Wyślij dane do logowania FTP na maila',
+ 'Expiration Date' => 'Data ważności',
+ 'YYYY-MM-DD' => 'DD-MM-YYYY',
+ 'Name servers' => 'Serwery nazw',
+ 'Record' => 'Rekord',
+ 'IP or Value' => 'IP lub wartość',
+ 'Priority' => 'Priorytet',
+ 'Record Number' => 'Numer rekordu',
+ 'in megabytes' => 'w megabajtach',
+ 'Message' => 'Wiadomość',
+ 'use local-part' => 'użyj części lokalnej',
+ 'one or more email addresses' => 'jeden lub więcej adresów email',
+ 'Prefix will be automaticaly added to database name and database user' => 'Przedrostek %s zostanie automatycznie dodany do nazwy bazy danych i nazwy użytkownika.',
+ 'Database' => 'Baza danych',
+ 'Type' => 'Typ',
+ 'Minute' => 'Minuta',
+ 'Command' => 'Komenda',
+ 'Package Name' => 'Nazwa pakietu',
+ 'Netmask' => 'Maska podsieci',
+ 'Interface' => 'Interfejs',
+ 'Shared' => 'Współdzielone',
+ 'Assigned user' => 'Przypisany użytkownik',
+ 'Assigned domain' => 'Przypisana domena',
+ 'NAT IP association' => 'Przypisany IP NAT-u',
+ 'shell' => 'powłoka',
+ 'web domains' => 'domeny web',
+ 'web aliases' => 'aliasy web',
+ 'dns records' => 'rekordy dns',
+ 'mail domains' => 'domeny email',
+ 'mail accounts' => 'konta email',
+ 'accounts' => 'konta',
+ 'databases' => 'bazy danych',
+ 'cron jobs' => 'zadania crona',
+ 'backups' => 'kopie zapasowe',
+ 'quota' => 'quota',
+ 'day of week' => 'dzień tygodnia',
+ 'cmd' => 'cmd',
+ 'users' => 'użytkowników',
+ 'domains' => 'domen',
+ 'aliases' => 'aliasów',
+ 'records' => 'rekordów',
+ 'jobs' => 'zadań',
+ 'username' => 'nazwa użytkownika',
+ 'password' => 'hasło',
+ 'type' => 'typ',
+ 'charset' => 'zestaw znaków',
+ 'domain' => 'domena',
+ 'ip' => 'ip',
+ 'ip address' => 'adres ip',
+ 'IP address' => 'adres IP',
+ 'netmask' => 'maska podsieci',
+ 'interface' => 'interfejs',
+ 'assigned user' => 'przypisany użytkownik',
+ 'ns1' => 'ns1',
+ 'ns2' => 'ns2',
+ 'user' => 'użytkownik',
+ 'email' => 'email',
+ 'first name' => 'imię',
+ 'last name' => 'nazwisko',
+ 'account' => 'konto',
+ 'ssl certificate' => 'certyfikat ssl',
+ 'ssl key' => 'klucz ssl',
+ 'stats user password' => 'hasło użytkownika statystyk',
+ 'stats username' => 'nazwa użytkownika statystyk',
+ 'stats password' => 'hasło statystyk',
+ 'ftp user password' => 'hasło użytkownika ftp',
+ 'ftp user' => 'nazwa użytkownika ftp',
+ 'Last 70 lines of %s.%s.log' => 'Ostatnie 70 linijek %s.%s.log',
+ 'Download AccessLog' => 'Pobierz AccessLog',
+ 'Download ErrorLog' => 'Pobierz ErrorLog',
+ 'Country' => 'Kraj',
+ '2 letter code' => '2 literowy kod',
+ 'State / Province' => 'Województwo (ST)',
+ 'City / Locality' => 'Miasto (L)',
+ 'Organization' => 'Organizacja (O)',
+ 'Action' => 'Akcja',
+ 'Protocol' => 'Protokół',
+ 'Port' => 'Port',
+ 'Comment' => 'Komentarz',
+ 'Banlist' => 'Lista zbanowanych',
+ 'ranges are acceptable' => 'zakresy są uznawane',
+ 'CIDR format is supported' => 'format CIDR jest wspierany',
+ 'Add one more Name Server' => 'Dodaj jeszcze jeden serwer DNS',
+
+ 'unlimited' => 'nielimitowne',
+ '1 account' => '1 konto',
+ '%s accounts' => '%s kont',
+ '1 domain' => '1 domena',
+ '%s domains' => '%s domen',
+ '1 record' => '1 rekord',
+ '%s records' => '%s rekordów',
+ '1 mail account' => '1 konto email',
+ '%s mail accounts' => '%s kont email',
+ '1 database' => '1 baza danych',
+ '%s databases' => '%s baz danych',
+ '1 cron job' => '1 zadanie cron',
+ '%s cron jobs' => '%s zadań cron',
+ '1 archive' => '1 archiwum',
+ '%s archives' => '%s archiwów',
+ '1 package' => '1 pakiet',
+ '%s packages' => '%s pakietów',
+ '1 IP address' => '1 adres IP',
+ '%s IP addresses' => '%s adresów IP',
+ '1 month' => '1 miesiąc',
+ '%s months' => '%s miesięcy',
+ '1 log record' => '1 rekord log',
+ '%s log records' => '%s rekordów log',
+ '1 object' => '1 objekt',
+ '%s objects' => '%s objektów',
+ 'no exclusions' => 'brak wyłączeń',
+ '1 rule' => '1 zasada',
+ '%s rules' => '%s zasad',
+ 'There are no currently banned IP' => 'Nie ma aktualnie zbanowanych adresów IP',
+
+ 'USER_CREATED_OK' => 'Stworzono użytkownika %s .',
+ 'WEB_DOMAIN_CREATED_OK' => 'Stworzono domenę Web %s .',
+ 'DNS_DOMAIN_CREATED_OK' => 'Stworzono domenę DNS %s .',
+ 'DNS_RECORD_CREATED_OK' => 'Stworzono rekord %s.%s .',
+ 'MAIL_DOMAIN_CREATED_OK' => 'Stworzono domenę email %s .',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'Stworzono konto email %s@%s .',
+ 'DATABASE_CREATED_OK' => 'Stworono bazę danych %s .',
+ 'CRON_CREATED_OK' => 'Stworzono zadanie crona.',
+ 'IP_CREATED_OK' => 'Stworzono adres IP %s .',
+ 'PACKAGE_CREATED_OK' => 'Stworzono pakiet %s .',
+ 'SSL_GENERATED_OK' => 'Wygenerowano certyfikat.',
+ 'RULE_CREATED_OK' => 'Stworzono zasadę.',
+ 'Autoupdate has been successfully enabled' => 'Uaktywniono automatyczne aktualizacje.',
+ 'Autoupdate has been successfully disabled' => 'Wyłączono automatyczne aktualizacje.',
+ 'Cronjob email reporting has been successfully enabled' => 'Uaktywniono raportowanie zadań crona na maila',
+ 'Cronjob email reporting has been successfully disabled' => 'Wyłączono raportowanie zadań crona na maila',
+ 'Changes has been saved.' => 'Zapisano zmiany.',
+ 'Confirmation' => 'Potwierdzenie',
+ 'DELETE_USER_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć użytkownika %s?',
+ 'SUSPEND_USER_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić użytkownika %s?',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'Czy jesteś pewien, że chcesz przywrócić użytkownika %s?',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć domenę %s?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić domenę %s?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Czy jesteś pewien, że chcesz przywrócić domenę %s?',
+ 'DELETE_RECORD_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć rekord %s?',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić rekord %s?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'Czy jesteś pewien, że chcesz przywrócić rekord %s?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć %s?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić %s?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Czy jesteś pewien, że chcesz przywrócić %s?',
+ 'DELETE_DATABASE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć bazę danych %s?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić bazę danych %s?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz prywrócić bazę danych %s?',
+ 'DELETE_CRON_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć zadanie crona?',
+ 'SUSPEND_CRON_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić zadanie crona?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'Czy jesteś pewien, że chcesz przywrócić zadanie crona?',
+ 'DELETE_BACKUP_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć kopię zapasową %s?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć wykluczenie %s?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć pakiet %s?',
+ 'DELETE_IP_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć adres IP %s?',
+ 'DELETE_RULE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz usunąć zasadę nr %s?',
+ 'SUSPEND_RULE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zawiesić zasadę nr %s?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => 'Czy jesteś pewien, że chcesz przywrócić zasadę nr %s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Opuścić stronę?',
+ 'RESTART_CONFIRMATION' => 'Czy jesteś pewien, że chcesz zrestartować %s?',
+ 'Welcome' => 'Witaj',
+ 'LOGGED_IN_AS' => 'Zalogowany jako %s',
+ 'Error' => 'Błąd',
+ 'Invalid username or password' => 'Błędna nazwa użytkownika lub hasło.',
+ 'Invalid username or code' => 'Błędna nazwa użytkownika lub kod.',
+ 'Passwords not match' => 'Hasła nie pasują.',
+ 'Please enter valid email address.' => 'Proszę wpisać prawidłowy adres email.',
+ 'Field "%s" can not be blank.' => 'Pole "%s" nie może pozostać puste.',
+ 'Password is too short.' => 'Hasło jest za krótkie (minimum 6 znaków)',
+ 'Error code:' => 'Kod błędu: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" zakończyło się błędem',
+ 'IP address is in use' => 'Adres IP już jest używany',
+ 'BACKUP_SCHEDULED' => 'Dodano zadanie do kolejki. Otrzymasz powiadomienie na maila, kiedy będzie można pobrać kopię zapasową.',
+ 'BACKUP_EXISTS' => 'Aktualnie jest już uruchomiony proces kopii zapasowej. Proszę czekać na jego zakończenie.',
+ 'RESTORE_SCHEDULED' => 'Dodano zadanie do kolejki. Otrzymasz powiadomienie na maila, kiedy zostanie zakończone przywracanie danych.',
+ 'RESTORE_EXISTS' => 'Aktualnie jest już uruchomiony proces przywracania danych. Proszę czekać na jego zakończenie przed powtórnym uruchomieniem.',
+
+ 'WEB_EXCLUSIONS' => "Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *, a żeby wyłączyć konkretne foldery użyj takiego formatu: domena.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *.",
+ 'MAIL_EXCLUSIONS' => "Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *, a żeby wyłączyć konkretne konta użyj takiego formatu: domena.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Wpisz pełne nazwy baz danych, po jednej w linijce. W celu wyłączenia wszystkich baz użyj *.",
+ 'CRON_EXCLUSIONS' => "W celu wyłączenia wszystkich zadań wpisz *.",
+ 'USER_EXCLUSIONS' => "Wpisz nazwy folderów, po jednej w linijce. W celu wyłączenia wszystkich folderów użyj *.",
+
+ 'Welcome to Vesta Control Panel' => 'Witaj w Panelu Vesta',
+ 'MAIL_FROM' => 'Panel Vesta ',
+ 'GREETINGS_GORDON_FREEMAN' => "Witaj, %s %s,\n",
+ 'GREETINGS' => "Witaj,\n",
+ 'ACCOUNT_READY' => "Twoje konto zostało założone i jest gotowe do użytku.\n\nhttps://%s/login/\nNazwa użytkownika: %s\nHasło: %s\n\n--\nPanel Vesta\n",
+
+ 'FTP login credentials' => 'Dane FTP',
+ 'FTP_ACCOUNT_READY' => "Konto FTP zostało założone i jest gotowe do użytku.\n\nNazwa hosta: %s\nNazwa użytkownika: %s_%s\nHasło: %s\n\n--\nPanel Vesta\n",
+
+ 'Database Credentials' => 'Dane bazy danych',
+ 'DATABASE_READY' => "Założono bazę danych.\n\nNazwa bazy danych: %s\nNazwa użytkownika: %s\nHasło: %s\n%s\n\n--\nPanel Vesta\n",
+
+ 'forgot password' => 'zapomniane hasło',
+ 'Confirm' => 'Potwierdź',
+ 'New Password' => 'Nowe hasło',
+ 'Confirm Password' => 'Potwierdź hasło',
+ 'Reset' => 'Resetuj',
+ 'Reset Code' => 'Kod resetu',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => 'Kod resetu hasła został wysłany na twój adres email ',
+ 'MAIL_RESET_SUBJECT' => 'Zresetowano hasło o %s',
+ 'PASSWORD_RESET_REQUEST' => "W celu zresetowanie hasła do panelu, proszę przejść na stronę:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatywnie możesz przejść na stronę https://%s/reset/?action=code&user=%s i wpisać poniższy kod:\n%s\n\nJeżeli nie prosiłeś o reset hasła proszę zignorować tą wiadomość i przyjąć nasze przeprosiny.\n\n--\nPanel Vesta\n",
+
+ 'Jan' => 'Sty',
+ 'Feb' => 'Lut',
+ 'Mar' => 'Mar',
+ 'Apr' => 'Kwi',
+ 'May' => 'Maj',
+ 'Jun' => 'Cze',
+ 'Jul' => 'Lip',
+ 'Aug' => 'Sie',
+ 'Sep' => 'Wrz',
+ 'Oct' => 'Paź',
+ 'Nov' => 'Lis',
+ 'Dec' => 'Gru',
+
+ 'Configuring Server' => 'Konfiguracja serwera',
+ 'Hostname' => 'Nazwa hosta',
+ 'Time Zone' => 'Strefa czasowa',
+ 'Default Language' => 'Domyślny język',
+ 'FileSystem Disk Quota ' => 'Quota systemu plików',
+ 'Vesta Control Panel Plugins' => 'Pluginy panelu Vesta',
+ 'preview' => 'podląd',
+ 'Reseller Role' => 'Rola Resellera',
+ 'Web Config Editor' => 'Edytor konfiguracji Web',
+ 'Template Manager' => 'Zarządzanie szablonami',
+ 'Backup Migration Manager' => 'Zarządzanie migracją kopii zapasowej',
+ 'FileManager' => 'Menedżer plików',
+ 'show: CPU / MEM / NET / DISK' => 'pokaż: CPU / MEM / NET / DYSK',
+
+ 'sort by' => 'sortuj',
+ 'Date' => 'Data',
+ 'Starred' => 'Gwiazdka',
+ 'Name' => 'Nazwa',
+
+ 'File Manager' => 'Manager Plików',
+ 'type' => 'typ',
+ 'size' => 'rozmiar',
+ 'date' => 'data',
+ 'name' => 'nazwa',
+ 'Initializing' => 'Inicjalizowanie',
+ 'UPLOAD' => 'WYŚLIJ',
+ 'NEW FILE' => 'NOWY PLIK',
+ 'NEW DIR' => 'NOWY FOLDER',
+ 'DELETE' => 'USUŃ',
+ 'RENAME' => 'ZMIEŃ NAZWĘ',
+ 'COPY' => 'KOPIUJ',
+ 'ARCHIVE' => 'ARCHIWIZUJ',
+ 'EXTRACT' => 'ROZPAKUJ',
+ 'DOWNLOAD' => 'POBIERZ',
+ 'Hit' => 'Naciśnij',
+ 'to reload the page' => 'żeby załadować ponownie stronę',
+ 'Directory name cannot be empty' => 'Nazwa folderu nie może być pusta',
+ 'File name cannot be empty' => 'Nazwa pliku nie może być pusta',
+ 'No file selected' => 'Nie wybrano pliku',
+ 'No file or folder selected' => 'Nie wybrano pliku ani folderu',
+ 'File type not supported' => 'Typ pliku niewspierany',
+ 'Directory download not available in current version' => 'Pobieranie folderów nie jest wspierane w aktualnej wersji',
+ 'Directory not available' => 'Folder niedostępny',
+ 'Done' => 'Zrobione',
+ 'Close' => 'Zamknij',
+ 'Copy' => 'Kopiuj',
+ 'Cancel' => 'Anuluj',
+ 'Rename' => 'Zmień nazwę',
+ 'Delete' => 'Usuń',
+ 'Extract' => 'Rozpakuj',
+ 'Create' => 'Stwórz',
+ 'Compress' => 'Skompresuj',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Czy jesteś pewny, że chcesz skopiować?',
+ 'Are you sure you want to delete' => 'Czy jesteś pewny, że chcesz usunąć?',
+ 'into' => 'do',
+ 'existing files will be replaced' => 'istniejące pliki zostaną zastąpione',
+ 'Original name' => 'Pierwotna nazwa',
+ 'File' => 'Plik',
+ 'already exists' => 'już istnieje',
+ 'Create file' => 'Stwórz plik',
+ 'Create directory' => 'Stwórz katalog',
+
+ 'Add New object' => 'Dodaj nowy objekt',
+ 'Save Form' => 'Zapisz formularz',
+ 'Cancel saving form' => 'Anuluj zapisywanie formularza',
+ 'Go to USER list' => 'Idź do listy UŻYTKOWNIKÓW',
+ 'Go to WEB list' => 'Idź do listy WEB',
+ 'Go to DNS list' => 'Idź do listy DNS',
+ 'Go to MAIL list' => 'Idź do listy MAIL',
+ 'Go to DB list' => 'Idź do listy DB',
+ 'Go to CRON list' => 'Idź do listy CRON',
+ 'Go to BACKUP list' => 'Idź do listy BACKUP',
+ 'Focus on search' => 'Skoncentruj na szukaniu',
+ 'Display/Close shortcuts' => 'Pokaż/ukryj sktóry',
+ 'Move backward through top menu' => 'Przejdź do tyłu przez menu górne',
+ 'Move forward through top menu' => 'Przejdź do przodu przez menu górne',
+ 'Enter focused element' => 'Wpisz zaznaczony element',
+
+ 'Upload' => 'Wyślij',
+ 'New File' => 'Nowy plik',
+ 'New Folder' => 'Nowy folder',
+ 'Download' => 'Pobierz',
+ 'Rename' => 'Zmień nazwę',
+ 'Copy' => 'Kopiuj',
+ 'Archive' => 'Archiwizuj',
+ 'Delete' => 'Usuń',
+ 'Save File (in text editor)' => 'Zapisz plik (w edytorze tekstu))',
+ 'Close Popup / Cancel' => 'Zamknij okno / Anuluj',
+ 'Move Cursor Up' => 'Przenieś kursor wyżej',
+ 'Move Cursor Dow' => 'Przenień kursor niżej',
+ 'Switch to Left Tab' => 'Przełącz do zakładki po lewej',
+ 'Switch to Right Tab' => 'Przełącz do zakładki po prawej',
+ 'Switch Tab' => 'Przełącz zakładkę',
+ 'Go to the Top of File List' => 'Przejdź na górę listy plików',
+ 'Go to the Last File' => 'Przejdź do ostatniego pliku',
+ 'Open File/Enter Directory' => 'Otwórz plik/folder',
+ 'Go to Parent Directory' => 'Przejdź do katalogu nadrzędnego',
+ 'Select Current File' => 'Wybierz aktywny plik',
+ 'Select Bunch of Files' => 'Wybierz kilka plików',
+ 'Append File to the Current Selection' => 'Nadpisz plik do aktualnego zaznaczenia',
+ 'Select All Files' => 'Wybierz wszystkie pliki',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'skróty klawiszowe są zainspirowane wspaniałym managerem plików GNU Midnight Commander ',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
+
+);
diff --git a/web/inc/i18n/pt-BR.php b/web/inc/i18n/pt-BR.php
new file mode 100644
index 000000000..0ae395dca
--- /dev/null
+++ b/web/inc/i18n/pt-BR.php
@@ -0,0 +1,603 @@
+ 'Pacotes',
+ 'IP' => 'IP',
+ 'Graphs' => 'Gráficos',
+ 'Statistics' => 'Estatísticas',
+ 'Log' => 'Log',
+ 'Server' => 'Servidor',
+ 'Services' => 'Serviços',
+ 'Firewall' => 'Firewall',
+ 'Updates' => 'Atualizações',
+ 'Log in' => 'Entrar',
+ 'Log out' => 'Sair',
+
+ 'USER' => 'USUÁRIO',
+ 'WEB' => 'WEB',
+ 'DNS' => 'DNS',
+ 'MAIL' => 'EMAIL',
+ 'DB' => 'BD',
+ 'CRON' => 'TAREFA',
+ 'BACKUP' => 'BACKUP',
+
+ 'Add User' => 'Adicionar Usuário',
+ 'Add Domain' => 'Adicionar Domínio',
+ 'Add Web Domain' => 'Adicionar Domínio Web',
+ 'Add DNS Domain' => 'Adicionar Domínio DNS',
+ 'Add DNS Record' => 'Adicionar Entrada DNS',
+ 'Add Mail Domain' => 'Adicionar Domínio Email',
+ 'Add Mail Account' => 'Adicionar Conta de Email',
+ 'Add Database' => 'Adicionar Banco de Dados',
+ 'Add Cron Job' => 'Adicionar Tarefa',
+ 'Create Backup' => 'Criar Backup',
+ 'Configure' => 'Configurar',
+ 'Restore All' => 'Restaurar Tudo',
+ 'Add Package' => 'Adicionar Pacote',
+ 'Add IP' => 'Adicionar IP',
+ 'Add Rule' => 'Adicionar Regra',
+ 'Ban IP Address' => 'Bloquear Endereço IP',
+ 'Search' => 'Pesquisar',
+ 'Add one more FTP Account' => 'Adicionar mais uma conta FTP',
+ 'Overall Statistics' => 'Estatísticas Gerais',
+ 'Daily' => 'Diariamente',
+ 'Weekly' => 'Semanalmente',
+ 'Monthly' => 'Mensalmente',
+ 'Yearly' => 'Anualmente',
+ 'Add' => 'Adicionar',
+ 'Back' => 'Voltar',
+ 'Save' => 'Salvar',
+ 'Submit' => 'Enviar',
+
+ 'toggle all' => 'alternar todos',
+ 'apply to selected' => 'aplicar aos selecionados',
+ 'rebuild' => 'reconstruir',
+ 'rebuild web' => 'reconstruir web',
+ 'rebuild dns' => 'reconstruir dns',
+ 'rebuild mail' => 'reconstruir email',
+ 'rebuild db' => 'reconstruir bd',
+ 'rebuild cron' => 'reconstruir tarefa',
+ 'update counters' => 'atualizar contadores',
+ 'suspend' => 'suspender',
+ 'unsuspend' => 'reativar',
+ 'delete' => 'deletar',
+ 'show per user' => 'mostrar por usuário',
+ 'login as' => 'logar como',
+ 'logout' => 'sair',
+ 'edit' => 'editar',
+ 'open webstats' => 'abrir webstats',
+ 'view logs' => 'ver logs',
+ 'list records' => 'listar %s registros',
+ 'add record' => 'adicionar registro',
+ 'list accounts' => 'listar %s contas',
+ 'add account' => 'adicionar conta',
+ 'open webmail' => 'abrir webmail',
+ 'list fail2ban' => 'listar fail2ban',
+ 'open %s' => 'abrir %s',
+ 'download' => 'baixar',
+ 'restore' => 'restaurar',
+ 'configure restore settings' => 'configurar ajustes de restauração',
+ 'stop' => 'parar',
+ 'start' => 'iniciar',
+ 'restart' => 'reiniciar',
+ 'update' => 'atualizar',
+ 'generate' => 'gerar',
+ 'Generate CSR' => 'Gerar CSR',
+ 'reread IP' => 'reler IP',
+ 'enable autoupdate' => 'ativar atualização automática',
+ 'disable autoupdate' => 'desativar atualização automática',
+ 'turn on notifications' => 'ativar notificações',
+ 'turn off notifications' => 'desativar notificações',
+
+ 'Adding User' => 'Adicionando Usuário',
+ 'Editing User' => 'Editando Usuário',
+ 'Adding Domain' => 'Adicionando Domínio',
+ 'Editing Domain' => 'Editando Domínio',
+ 'Adding DNS Domain' => 'Adicionando Domínio DNS',
+ 'Editing DNS Domain' => 'Editando Dominio DNS',
+ 'Adding DNS Record' => 'Adicionando Registro DNS',
+ 'Editing DNS Record' => 'Editando Registro DNS',
+ 'Adding Mail Domain' => 'Adicionando Domínio de Email',
+ 'Editing Mail Domain' => 'Editando Domínio de Email',
+ 'Adding Mail Account' => 'Adicionando Conta de Email',
+ 'Editing Mail Account' => 'Editando Conta de Email',
+ 'Adding database' => 'Adicionando Banco de Dados',
+ 'Editing Cron Job' => 'Editando Tarefa',
+ 'Adding Cron Job' => 'Adicionando Tarefa',
+ 'Editing Database' => 'Editando Banco de Dados',
+ 'Adding Package' => 'Adicionando Pacote',
+ 'Editing Package' => 'Editando Pacote',
+ 'Adding IP address' => 'Adicionando Endereço IP',
+ 'Editing IP Address' => 'Editando Endereço IP',
+ 'Editing Backup Exclusions' => 'Editando Exclusões de backup',
+ 'Generating CSR' => 'Gerando CSR',
+ 'Listing' => 'Listando',
+ 'Search Results' => 'Resultados da Busca',
+ 'Adding Firewall Rule' => 'Adicionando Regra de Firewall',
+ 'Editing Firewall Rule' => 'Editando Regra de Firewall',
+ 'Adding IP Address to Banlist' => 'Adicionando endereço IP na lista negra',
+
+ 'active' => 'ativo',
+ 'spnd' => 'suspenso',
+ 'suspended' => 'suspenso',
+ 'running' => 'em execução',
+ 'stopped' => 'parado',
+ 'outdated' => 'desatualizado',
+ 'updated' => 'atualizado',
+
+ 'yes' => 'sim',
+ 'no' => 'não',
+ 'none' => 'nenhum',
+ 'pb' => 'pb',
+ 'tb' => 'tb',
+ 'gb' => 'gb',
+ 'mb' => 'mb',
+ 'minute' => 'minuto',
+ 'hour' => 'hora',
+ 'day' => 'dia',
+ 'days' => 'dias',
+ 'hours' => 'horas',
+ 'minutes' => 'minutos',
+ 'month' => 'mês',
+ 'package' => 'pacote',
+ 'Bandwidth' => 'Largura de Banda',
+ 'Disk' => 'Disco',
+ 'Web' => 'Web',
+ 'Mail' => 'Email',
+ 'Databases' => 'Banco de Dados',
+ 'User Directories' => 'Diretórios do Usuário',
+ 'Template' => 'Template',
+ 'Web Template' => 'Template da Web',
+ 'Backend Template' => 'Template do Backend',
+ 'Proxy Template' =>'Template da Proxy',
+ 'DNS Template' => 'Template do DNS',
+ 'Web Domains' => 'Domínios Web',
+ 'SSL Domains' => 'Domínios SSL',
+ 'Web Aliases' => 'Apelidos Web',
+ 'per domain' => 'por domínio',
+ 'DNS Domains' => 'Domínios DNS',
+ 'DNS Domains' => 'Domínios DNS',
+ 'DNS records' => 'Registros DNS',
+ 'Name Servers' => 'Servidores de Nome',
+ 'Mail Domains' => 'Domínios de Email',
+ 'Mail Accounts' => 'Contas de Email',
+ 'Cron Jobs' => 'Tarefas',
+ 'SSH Access' => 'Acesso SSH',
+ 'IP Addresses' => 'Endereços IP',
+ 'Backups' => 'Backups',
+ 'Backup System' => 'Sistema de Backup',
+ 'backup exclusions' => 'exclusões de backup',
+ 'template' => 'template',
+ 'SSL Support' => 'Suporte SSL',
+ 'SSL Home Directory' => 'Diretório Home SSL',
+ 'Proxy Support' => 'Suporte ao Proxy',
+ 'Proxy Extensions' => 'Extenções do Proxy',
+ 'Web Statistics' => 'Estatísticas Web',
+ 'Additional FTP Account' => 'Contas FTP Adicionais',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => 'Expira',
+ 'Records' => 'registros',
+ 'Catchall email' => 'Pegar todos os emails',
+ 'AntiVirus Support' => 'Suporte a Antivírus',
+ 'AntiSpam Support' => 'Suporte a Antispam',
+ 'DKIM Support' => 'Suporte a DKIM',
+ 'Accounts' => 'Contas',
+ 'Quota' => 'Cota',
+ 'Autoreply' => 'Auto resposta',
+ 'Forward to' => 'Encaminhar para',
+ 'Do not store forwarded mail' => 'Não armazenar email encaminhado',
+ 'database' => 'banco de dados',
+ 'User' => 'Usuário',
+ 'Host' => 'Host',
+ 'Charset' => 'Charset',
+ 'Min' => 'Min',
+ 'Hour' => 'Hora',
+ 'Day' => 'Dia',
+ 'Month' => 'Mes',
+ 'Day of week' => 'Dia da semana',
+ 'local' => 'local',
+ 'Run Time' => 'Tempo de execução',
+ 'Backup Size' => 'Tamanho do Backup',
+ 'SYS' => 'SYS',
+ 'Domains' => 'Domínios',
+ 'Status' => 'Status',
+ 'shared' => 'compartilhado',
+ 'dedicated' => 'dedicado',
+ 'Owner' => 'Dono',
+ 'Users' => 'Usuários',
+ 'Load Average' => 'Carga Média',
+ 'Memory Usage' => 'Uso de Memória',
+ 'HTTPD Usage' => 'Uso do HTTPD',
+ 'NGINX Usage' => 'Uso do NGINX',
+ 'MySQL Usage on localhost' => 'Uso do MySQL MySQL em localhost',
+ 'PostgreSQL Usage on localhost' => 'Uso do PostgreSQL em localhost',
+ 'Bandwidth Usage eth0' => 'Uso de Banda em eth0',
+ 'FTP Usage' => 'Uso do FTP',
+ 'SSH Usage' => 'Uso do SSH',
+ 'reverse proxy' => 'proxy reverso',
+ 'web server' => 'servidor web',
+ 'dns server' => 'servidor dns',
+ 'mail server' => 'servidor de email',
+ 'pop/imap server' => 'servidor pop/imap',
+ 'email antivirus' => 'antivirus do email',
+ 'email antispam' => 'antispam do email',
+ 'database server' => 'servidor de banco de dados',
+ 'ftp server' => 'servidor ftp',
+ 'job scheduler' => 'agendador de tarefas',
+ 'CPU' => 'CPU',
+ 'Memory' => 'Memória',
+ 'Uptime' => 'Tempo em Atividade',
+ 'core package' => 'pacote principal',
+ 'php interpreter' => 'interpretador php',
+ 'internal web server' => 'servidor web interno',
+ 'Version' => 'Versão',
+ 'Release' => 'Release',
+ 'Architecture' => 'Arquitetura',
+ 'Object' => 'Objeto',
+ 'Owner' => 'Dono',
+ 'Username' => 'Usuário',
+ 'Password' => 'Senha',
+ 'Email' => 'Email',
+ 'Package' => 'Pacote',
+ 'Language' => 'Linguagem',
+ 'First Name' => 'Primeiro Nome',
+ 'Last Name' => 'Sobrenome',
+ 'Send login credentials to email address' => 'Enviar credenciais para o endereço de email',
+ 'Default Template' => 'Template padrão',
+ 'Default Name Servers' => 'Servidores de Nome Padrão',
+ 'Domain' => 'Domínio',
+ 'DNS Support' => 'Suporte a DNS',
+ 'Mail Support' => 'Suporte a Email',
+ 'Advanced options' => 'Opções Avançadas',
+ 'Aliases' => 'Apelidos',
+ 'SSL Certificate' => 'Certificado SSL',
+ 'SSL Key' => 'Chave SSL',
+ 'SSL Certificate Authority / Intermediate' => 'Autoridade Certificadora SSL / Intermediária',
+ 'SSL CSR' => 'SSL CSR',
+ 'optional' => 'opcional',
+ 'internal' => 'interno',
+ 'Statistics Authorization' => 'Estatística de Autorização',
+ 'Statistics Auth' => 'Estatísticas de Autenticação',
+ 'Account' => 'Conta',
+ 'Prefix will be automaticaly added to username' => 'O prefixo %s será automaticamente adicionado ao nome de usuário',
+ 'Send FTP credentials to email' => 'Enviar credenciais ao FTP por email',
+ 'Expiration Date' => 'data para Expirar',
+ 'YYYY-MM-DD' => 'DD-MM-YYYY',
+ 'Name servers' => 'Servidores de Nome',
+ 'Record' => 'Registro',
+ 'IP or Value' => 'IP ou Valor',
+ 'Priority' => 'Prioridade',
+ 'Record Number' => 'Número do Registro',
+ 'in megabytes' => 'em megabytes',
+ 'Message' => 'Mensagem',
+ 'use local-part' => 'usar local-part',
+ 'one or more email addresses' => 'um ou mais endereços de email',
+ 'Prefix will be automaticaly added to database name and database user' => 'O prefixo %s será adicionado automaticamente ao nome do banco de dados e usuário',
+ 'Database' => 'Banco de Dados',
+ 'Type' => 'Tipo',
+ 'Minute' => 'Minuto',
+ 'Command' => 'Comando',
+ 'Package Name' => 'Nome do Pacote',
+ 'Netmask' => 'Máscara de Rede',
+ 'Interface' => 'Interface',
+ 'Shared' => 'Compartilhado',
+ 'Assigned user' => 'Usuário atribuído',
+ 'Assigned domain' => 'Domínio atribuído',
+ 'NAT IP association' => 'Associação NAT IP',
+ 'shell' => 'shell',
+ 'web domains' => 'domínios web',
+ 'web aliases' => 'apelidos web',
+ 'dns records' => 'registros dns',
+ 'mail domains' => 'domínios de email',
+ 'mail accounts' => 'contas de email',
+ 'accounts' => 'contas',
+ 'databases' => 'bases de dados',
+ 'cron jobs' => 'tarefas',
+ 'backups' => 'backups',
+ 'quota' => 'cota',
+ 'day of week' => 'dia da semana',
+ 'cmd' => 'cmd',
+ 'users' => 'usuários',
+ 'domains' => 'domínios',
+ 'aliases' => 'apelidos',
+ 'records' => 'registros',
+ 'jobs' => 'tarefas',
+ 'username' => 'usuário',
+ 'password' => 'senha',
+ 'type' => 'tipo',
+ 'charset' => 'charset',
+ 'domain' => 'domínio',
+ 'ip' => 'ip',
+ 'ip address' => 'endereço ip',
+ 'IP address' => 'Endereço IP',
+ 'netmask' => 'máscara de rede',
+ 'interface' => 'interface',
+ 'assigned user' => 'usuário atribuído',
+ 'ns1' => 'ns1',
+ 'ns2' => 'ns2',
+ 'user' => 'usuário',
+ 'email' => 'email',
+ 'first name' => 'primeiro nome',
+ 'last name' => 'sobrenome',
+ 'account' => 'conta',
+ 'ssl certificate' => 'certificado ssl',
+ 'ssl key' => 'chave ssl',
+ 'stats user password' => 'estatísticas usuário senha',
+ 'stats username' => 'estatísticas usuário',
+ 'stats password' => 'estatísticas senha',
+ 'ftp user password' => 'ftp usuário senha',
+ 'ftp user' => 'ftp usuário',
+ 'Last 70 lines of %s.%s.log' => 'Últimas 70 linhas de %s.%s.log',
+ 'Download AccessLog' => 'Baixar AccessLog',
+ 'Download ErrorLog' => 'Baixar ErrorLog',
+ 'Country' => 'País',
+ '2 letter code' => 'código de duas letras',
+ 'State / Province' => 'Estado / Província',
+ 'City / Locality' => 'Cidade / Localidade',
+ 'Organization' => 'Organização',
+ 'Action' => 'Ação',
+ 'Protocol' => 'Protocolo',
+ 'Port' => 'Porta',
+ 'Comment' => 'Comentário',
+ 'Banlist' => 'Lista Negra',
+ 'ranges are acceptable' => 'variações são permitidas',
+ 'CIDR format is supported' => 'formato CIDR é suportado',
+ 'Add one more Name Server' => 'Adicionar um ou mais Servidores de Nome',
+
+ 'unlimited' => 'ilimitado',
+ '1 account' => '1 conta',
+ '%s accounts' => '%s contas',
+ '1 domain' => '1 domínio',
+ '%s domains' => '%s domínios',
+ '1 record' => '1 registro',
+ '%s records' => '%s registros',
+ '1 mail account' => '1 conta de email',
+ '%s mail accounts' => '%s contas de email',
+ '1 database' => '1 banco de dados',
+ '%s databases' => '%s bancos de dados',
+ '1 cron job' => '1 tarefa',
+ '%s cron jobs' => '%s tarefas',
+ '1 archive' => '1 arquivo',
+ '%s archives' => '%s aquivos',
+ '1 package' => '1 pacote',
+ '%s packages' => '%s pacotes',
+ '1 IP address' => '1 endereço IP',
+ '%s IP addresses' => '%s endereços IP',
+ '1 month' => '1 mes',
+ '%s months' => '%s meses',
+ '1 log record' => '1 registro de log',
+ '%s log records' => '%s registros de log',
+ '1 object' => '1 objeto',
+ '%s objects' => '%s objetos',
+ 'no exclusions' => 'sem exclusões',
+ '1 rule' => '1 regra',
+ '%s rules' => '%s regras',
+ 'There are no currently banned IP' => 'Não há nenhum IP banido atualmente',
+
+ 'USER_CREATED_OK' => 'Usuário %s criado com sucesso',
+ 'WEB_DOMAIN_CREATED_OK' => 'Domínio %s criado com sucesso.',
+ 'DNS_DOMAIN_CREATED_OK' => 'Domínio DNS %s criado com sucesso.',
+ 'DNS_RECORD_CREATED_OK' => 'Registro %s.%s criado com sucesso.',
+ 'MAIL_DOMAIN_CREATED_OK' => 'Domínio de Email %s criado com sucesso.',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'Conta de Email %s@%s criado com sucesso',
+ 'DATABASE_CREATED_OK' => 'Banco de dados %s criado com sucesso',
+ 'CRON_CREATED_OK' => 'Tarefa adicionada com sucesso.',
+ 'IP_CREATED_OK' => 'Endereço IP %s criado com sucesso.',
+ 'PACKAGE_CREATED_OK' => 'Pacote %s criado com sucesso.',
+ 'SSL_GENERATED_OK' => 'Certificado SSL criado sucesso.',
+ 'RULE_CREATED_OK' => 'Regra criada com sucesso.',
+ 'Autoupdate has been successfully enabled' => 'Atualização automática ativada com sucesso',
+ 'Autoupdate has been successfully disabled' => 'Atualização automática desativado com sucesso',
+ 'Cronjob email reporting has been successfully enabled' => 'Relatórios de tarefas ativado com sucesso',
+ 'Cronjob email reporting has been successfully disabled' => 'Relatórios de tarefas desativado com sucesso',
+ 'Changes has been saved.' => 'As alterações foram salvas.',
+ 'Confirmation' => 'Confirmação',
+ 'DELETE_USER_CONFIRMATION' => 'Tem certeza que deseja deletar o usuário %s?',
+ 'SUSPEND_USER_CONFIRMATION' => 'Tem certeza que deseja suspender o usuário %s?',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'Tem certeza que deseja reativar o usuário %s?',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'Tem certeza que deseja deletar o domínio %s?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'Tem certeza que deseja suspender o domínio %s?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Tem certeza que deseja reativar o domínio %s?',
+ 'DELETE_RECORD_CONFIRMATION' => 'Tem certeza que deseja deletar o registro %s?',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'Tem certeza que deseja suspender o registro %s?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'Tem certeza que deseja reativar o registro %s?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Tem certeza que deseja deletar %s?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Tem certeza que deseja suspender %s?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Tem certeza que deseja reativar %s?',
+ 'DELETE_DATABASE_CONFIRMATION' => 'Tem certeza que deseja deletar o banco de dados %s?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'Tem certeza que deseja suspender o banco de dados %s?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Tem certeza que deseja reativar o bando de dados %s?',
+ 'DELETE_CRON_CONFIRMATION' => 'Tem certeza que deseja deletar a tarefa do cron?',
+ 'SUSPEND_CRON_CONFIRMATION' => 'Tem certeza que deseja suspender a tarefa do cron?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'Tem certeza que deseja reativara a tarefa do cron?',
+ 'DELETE_BACKUP_CONFIRMATION' => 'Tem certeza que deseja deletar o backup %s ?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'Tem certeza que deseja deletar o exclusões %s?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'Tem certeza que deseja deletar o pacote %s?',
+ 'DELETE_IP_CONFIRMATION' => 'Tem certeza que deseja deletar o endereço IP %s?',
+ 'DELETE_RULE_CONFIRMATION' => 'Tem certeza que deseja deletar o regra #%s?',
+ 'SUSPEND_RULE_CONFIRMATION' => 'Tem certeza que deseja suspender o regra #%s?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => 'Tem certeza que deseja reativar o regra #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Deixar a página?',
+ 'RESTART_CONFIRMATION' => 'Tem certeza que deseja reiniciar %s?',
+ 'Welcome' => 'Bem Vindo',
+ 'LOGGED_IN_AS' => 'Entrar como o usuário %s',
+ 'Error' => 'Erro',
+ 'Invalid username or password' => 'Usuário ou senha inválidos',
+ 'Invalid username or code' => 'Usuário ou código inválidos',
+ 'Passwords not match' => 'Senhas não correspondem',
+ 'Please enter valid email address.' => 'Por favor informe um endereço de email válido.',
+ 'Field "%s" can not be blank.' => 'O Campo "%s" não pode estar vazio.',
+ 'Password is too short.' => 'A senha é muito curta (o mínimo são 6 caracteres)',
+ 'Error code:' => 'Código do Erro: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" falhou',
+ 'IP address is in use' => 'O endereço IP está em uso',
+ 'BACKUP_SCHEDULED' => 'A tarefa foi adicionada à fila. Você receberá um email quando o backup estiver pronto para ser baixado.',
+ 'BACKUP_EXISTS' => 'Um backup já está em execução. Por favor aguarde até terminar.',
+ 'RESTORE_SCHEDULED' => 'A tarefa foi adicionada à fila. Você receberá um email de confirmação.',
+ 'RESTORE_EXISTS' => 'Uma tarefa de restauração já está em execução. Por favor aguarde até que a mesma termine.',
+
+ 'WEB_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir diretórios específicos use o seguinte formato: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *",
+ 'MAIL_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir contas específicas use o seguinte formato: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Digite o nome completo do banco de dados, um por linha. Para excluir todos os bancos de dados use *",
+ 'CRON_EXCLUSIONS' => "Para excluir todas as tarefas *",
+ 'USER_EXCLUSIONS' => "Digite o nome do diretório, um por linha. Para excluir todos os diretórios use *",
+
+ 'Welcome to Vesta Control Panel' => 'Bem vindo ao Painel de Controle Vesta',
+ 'MAIL_FROM' => 'Painel de Controle Vesta ',
+ 'GREETINGS_GORDON_FREEMAN' => "Olá, %s %s,\n",
+ 'GREETINGS' => "Olá,\n",
+ 'ACCOUNT_READY' => "Sua conta foi criada e está pronta para uso.\n\nhttps://%s/login/\nUsuário: %s\nSenha: %s\n\n--\nPainel de Controle Vesta\n",
+
+ 'FTP login credentials' => 'Credenciais de acesso ao FTP',
+ 'FTP_ACCOUNT_READY' => "A conta FTP foi criada e está pronta pra uso.\n\nServidor: %s\nUsuário: %s_%s\nSenha: %s\n\n--\nPainel de Controle Vesta\n",
+
+ 'Database Credentials' => 'Credenciais de acesso ao Banco de Dados',
+ 'DATABASE_READY' => "Banco de dados Criado com Sucesso.\n\nBanco de dados: %s\nUsuário: %s\nSenha: %s\n%s\n\n--\nPainel de Controle Vesta\n",
+
+ 'forgot password' => 'esqueci minha senha',
+ 'Confirm' => 'Confirmar',
+ 'New Password' => 'Nova senha',
+ 'Confirm Password' => 'Confirmar senha',
+ 'Reset' => 'Redefinir',
+ 'Reset Code' => 'Código de Redefinição',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => 'O código de redefinição de senha foi enviado para o seu email ',
+ 'MAIL_RESET_SUBJECT' => 'Senha Redefinida em %s',
+ 'PASSWORD_RESET_REQUEST' => "Para redefinir sua senha do Painel de Controle, por favor use o seguinte link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nComo alternativa, você pode visitar https://%s/reset/?action=code&user=%s e digitar o seguinte código de redefinição:\n%s\n\nSe você não solicitou uma redefinição de senha, por favor ignore esse mensagem e aceite nossas desculpas.\n\n--\nPainel de Controle Vesta\n",
+
+ 'Jan' => 'Jan',
+ 'Feb' => 'Fev',
+ 'Mar' => 'Mar',
+ 'Apr' => 'Abr',
+ 'May' => 'Mai',
+ 'Jun' => 'Jun',
+ 'Jul' => 'Jul',
+ 'Aug' => 'Ago',
+ 'Sep' => 'Set',
+ 'Oct' => 'Out',
+ 'Nov' => 'Nov',
+ 'Dec' => 'Dez',
+
+ 'Configuring Server' => 'Configurando Servidor',
+ 'Hostname' => 'Hostname',
+ 'Time Zone' => 'Fuso Horário',
+ 'Default Language' => 'Linguagem Padrão',
+ 'FileSystem Disk Quota' => 'Cota de Disco',
+ 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
+ 'preview' => 'pré-visualizar',
+ 'Reseller Role' => 'Regra de Revendedor',
+ 'Web Config Editor' => 'Editor de Configuração Web',
+ 'Template Manager' => 'Gerenciador de Template',
+ 'Backup Migration Manager' => 'Gerenciador de Migração de Backup',
+ 'FileManager' => 'Gerenciador de Arquivo',
+ 'show: CPU / MEM / NET / DISK' => 'mostrar: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'ordenar por',
+ 'Date' => 'Data',
+ 'Starred' => 'Estreado',
+ 'Name' => 'Nome',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'tipo',
+ 'size' => 'tamanho',
+ 'date' => 'data',
+ 'name' => 'nome',
+ 'Initializing' => 'Inicializando',
+ 'UPLOAD' => 'ENVIAR',
+ 'NEW FILE' => 'NOVO ARQUIVO',
+ 'NEW DIR' => 'NOVO DIR',
+ 'DELETE' => 'DELETAR',
+ 'RENAME' => 'RENOMEAR',
+ 'COPY' => 'COPIAR',
+ 'ARCHIVE' => 'ARQUIVAR',
+ 'EXTRACT' => 'EXTAIR',
+ 'DOWNLOAD' => 'BAIXAR',
+ 'Hit' => 'Acertar',
+ 'to reload the page' => 'recarregar a página',
+ 'Directory name cannot be empty' => 'Nome do diretório não pode estar vazio',
+ 'File name cannot be empty' => 'Nome do arquivo não pode estar vazio',
+ 'No file selected' => 'Nenhum arquivo selecionado',
+ 'No file or folder selected' => 'Nenhum arquivo ou diretório selecionado',
+ 'File type not supported' => 'Tipo de arquivo não suportado',
+ 'Directory download not available in current version' => 'Baixar diretório não está disponível na versão atual',
+ 'Directory not available' => 'Diretório não disponível',
+ 'Done' => 'Pronto',
+ 'Close' => 'Fechar',
+ 'Copy' => 'Copiar',
+ 'Cancel' => 'Cancelar',
+ 'Rename' => 'Renomear',
+ 'Delete' => 'Deletar',
+ 'Extract' => 'Extrair',
+ 'Create' => 'Criar',
+ 'Compress' => 'Comprimir',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Tem certeza que deseja copiar',
+ 'Are you sure you want to delete' => 'Tem certeza que deseja deletar',
+ 'into' => 'dentro',
+ 'existing files will be replaced' => 'arquivos existentes serão substituídos',
+ 'Original name' => 'Nome original',
+ 'File' => 'Arquivo',
+ 'already exists' => 'já existe',
+ 'Create file' => 'Criar arquivo',
+ 'Create directory' => 'Criar diretório',
+
+ 'Add New object' => 'Adicionar novo objeto',
+ 'Save Form' => 'Salvar formulário',
+ 'Cancel saving form' => 'Cancelar salvamento do formulário',
+ 'Go to USER list' => 'Ir para a lista de USER',
+ 'Go to WEB list' => 'Ir para a lista de WEB',
+ 'Go to DNS list' => 'Ir para a lista de DNS',
+ 'Go to MAIL list' => 'Ir para a lista de MAIL',
+ 'Go to DB list' => 'Ir para a lista de DB',
+ 'Go to CRON list' => 'Ir para a lista de CRON',
+ 'Go to BACKUP list' => 'Ir para a lista de BACKUP',
+ 'Focus on search' => 'Foco na pesquisa',
+ 'Display/Close shortcuts' => 'Mostrar/Fechar atalhos',
+ 'Move backward through top menu' => 'Mover para trás através do menu superior',
+ 'Move forward through top menu' => 'Mover para frente através do menu superior',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Enviar',
+ 'New File' => 'Novo Arquivo',
+ 'New Folder' => 'Novo Diretório',
+ 'Download' => 'Baixar',
+ 'Rename' => 'Renomear',
+ 'Copy' => 'Copiar',
+ 'Archive' => 'Arquivar',
+ 'Delete' => 'Deletar',
+ 'Save File (in text editor)' => 'Salvar Arquivo (no editor de texto)',
+ 'Close Popup / Cancel' => 'Fechar Popup / Cancelar',
+ 'Move Cursor Up' => 'Mover o Cursor para Cima',
+ 'Move Cursor Dow' => 'Mover o Cursor para Baixo',
+ 'Switch to Left Tab' => 'Alternar para a Guia à Esquerda',
+ 'Switch to Right Tab' => 'Alternar para a Guia à Direita',
+ 'Switch Tab' => 'Alternar Guia',
+ 'Go to the Top of File List' => 'Ir para o Início da Lista de Arquivo',
+ 'Go to the Last File' => 'Ir para o último Arquivo',
+ 'Open File/Enter Directory' => 'Abrir Arquivo/Digitar Diretório',
+ 'Go to Parent Directory' => 'Ir para o diretório principal',
+ 'Select Current File' => 'Selecionar o Arquivo Atual',
+ 'Select Bunch of Files' => 'Selecionar Vários Arquivos',
+ 'Append File to the Current Selection' => 'Acrescentar Arquivo à Seleção Atual',
+ 'Select All Files' => 'Selecionar Todos os Arquivos',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'atalhos são inspirados pela magnífica GNU Midnight Commander Gerenciador de Arquivos',
+
+ 'Licence Key' => 'Chave de Licença',
+ 'Enter License Key' => 'Digite a Chave de Licença',
+ 'Buy Licence' => 'Comprar Licença',
+ 'Buy Lifetime License' => 'Comprar Licença Vitalícia',
+ 'Disable and Cancel Licence' => 'Desativar e Cancelar a Licença',
+ 'Licence Activated' => 'Lisença Ativada',
+ 'Licence Deactivated' => 'Licença Desativada',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restringir usuários para que eles não possam usar SSH e acessar apenas seu diretório home.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copiar, editar, ver, e recuperar todos os arquivos de seu domínio web usando o completo Gerenciador de Arquivos.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'Éste é um módulo comercial que você poderia comprar uma chave de licença para habilita-lo.'
+
+);
diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php
index a013e1dea..8eea0582f 100644
--- a/web/inc/i18n/pt.php
+++ b/web/inc/i18n/pt.php
@@ -21,46 +21,46 @@ $LANG['pt'] = array(
'WEB' => 'WEB',
'DNS' => 'DNS',
'MAIL' => 'EMAIL',
- 'DB' => 'DB',
- 'CRON' => 'CRON',
+ 'DB' => 'BD',
+ 'CRON' => 'TAREFA',
'BACKUP' => 'BACKUP',
'Add User' => 'Adicionar Usuário',
'Add Domain' => 'Adicionar Domínio',
- 'Add Web Domain' => 'Adicionar Domínio',
- 'Add DNS Domain' => 'Adicionar Domínio',
- 'Add DNS Record' => 'Adicionar Entrada',
- 'Add Mail Domain' => 'Adicionar Domínio',
- 'Add Mail Account' => 'Adicionar Conta',
- 'Add Database' => 'Adicionar BD',
+ 'Add Web Domain' => 'Adicionar Domínio Web',
+ 'Add DNS Domain' => 'Adicionar Domínio DNS',
+ 'Add DNS Record' => 'Adicionar Entrada DNS',
+ 'Add Mail Domain' => 'Adicionar Domínio Email',
+ 'Add Mail Account' => 'Adicionar Conta de Email',
+ 'Add Database' => 'Adicionar Banco de Dados',
'Add Cron Job' => 'Adicionar Tarefa',
'Create Backup' => 'Criar Backup',
'Configure' => 'Configurar',
'Restore All' => 'Restaurar Tudo',
'Add Package' => 'Adicionar Pacote',
'Add IP' => 'Adicionar IP',
- 'Add Rule' => 'Adicionar regra',
- 'Ban IP Address' => 'Bloquear ip',
+ 'Add Rule' => 'Adicionar Regra',
+ 'Ban IP Address' => 'Bloquear Endereço IP',
'Search' => 'Pesquisar',
'Add one more FTP Account' => 'Adicionar mais uma conta FTP',
'Overall Statistics' => 'Estatísticas Gerais',
- 'Daily' => 'Diário',
- 'Weekly' => 'Semanal',
- 'Monthly' => 'Mensal',
- 'Yearly' => 'Anual',
+ 'Daily' => 'Diariamente',
+ 'Weekly' => 'Semanalmente',
+ 'Monthly' => 'Mensalmente',
+ 'Yearly' => 'Anualmente',
'Add' => 'Adicionar',
'Back' => 'Voltar',
'Save' => 'Salvar',
'Submit' => 'Enviar',
- 'toggle all' => 'Alternar todos',
- 'apply to selected' => 'Aplicar aos selecionados',
- 'rebuild' => 'Recriar',
- 'rebuild web' => 'recriar web',
- 'rebuild dns' => 'recriar dns',
- 'rebuild mail' => 'recriar email',
- 'rebuild db' => 'recriar DB',
- 'rebuild cron' => 'recriar cron',
+ 'toggle all' => 'alternar todos',
+ 'apply to selected' => 'aplicar aos selecionados',
+ 'rebuild' => 'reconstruir',
+ 'rebuild web' => 'reconstruir web',
+ 'rebuild dns' => 'reconstruir dns',
+ 'rebuild mail' => 'reconstruir email',
+ 'rebuild db' => 'reconstruir bd',
+ 'rebuild cron' => 'reconstruir tarefa',
'update counters' => 'atualizar contadores',
'suspend' => 'suspender',
'unsuspend' => 'reativar',
@@ -75,21 +75,21 @@ $LANG['pt'] = array(
'add record' => 'adicionar registro',
'list accounts' => 'listar %s contas',
'add account' => 'adicionar conta',
- 'open webmail' => 'abrir o webmail',
+ 'open webmail' => 'abrir webmail',
'list fail2ban' => 'listar fail2ban',
'open %s' => 'abrir %s',
- 'download' => 'download',
+ 'download' => 'baixar',
'restore' => 'restaurar',
- 'configure restore settings' => 'configurar resturar ajustes',
+ 'configure restore settings' => 'configurar ajustes de restauração',
'stop' => 'parar',
'start' => 'iniciar',
'restart' => 'reiniciar',
'update' => 'atualizar',
'generate' => 'gerar',
'Generate CSR' => 'Gerar CSR',
- 'reread IP' => 'ler IP novamente',
- 'enable autoupdate' => 'ativar autoupdate',
- 'disable autoupdate' => 'desativar autoupdate',
+ 'reread IP' => 'reler IP',
+ 'enable autoupdate' => 'ativar atualização automática',
+ 'disable autoupdate' => 'desativar atualização automática',
'turn on notifications' => 'ativar notificações',
'turn off notifications' => 'desativar notificações',
@@ -105,10 +105,10 @@ $LANG['pt'] = array(
'Editing Mail Domain' => 'Editando Domínio de Email',
'Adding Mail Account' => 'Adicionando Conta de Email',
'Editing Mail Account' => 'Editando Conta de Email',
- 'Adding database' => 'Adicionando Base de Dados',
- 'Editing Cron Job' => 'Editando Tarefa do Cron',
- 'Adding Cron Job' => 'Adicionando Tarefa do Cron',
- 'Editing Database' => 'Editando Base de Dados',
+ 'Adding database' => 'Adicionando Banco de Dados',
+ 'Editing Cron Job' => 'Editando Tarefa',
+ 'Adding Cron Job' => 'Adicionando Tarefa',
+ 'Editing Database' => 'Editando Banco de Dados',
'Adding Package' => 'Adicionando Pacote',
'Editing Package' => 'Editando Pacote',
'Adding IP address' => 'Adicionando Endereço IP',
@@ -117,14 +117,14 @@ $LANG['pt'] = array(
'Generating CSR' => 'Gerando CSR',
'Listing' => 'Listando',
'Search Results' => 'Resultados da Busca',
- 'Adding Firewall Rule' => 'Adicionando regra de firewall',
- 'Editing Firewall Rule' => 'Editando regra de firewall',
- 'Adding IP Address to Banlist' => 'Adicionando IP na lista negra',
+ 'Adding Firewall Rule' => 'Adicionando Regra de Firewall',
+ 'Editing Firewall Rule' => 'Editando Regra de Firewall',
+ 'Adding IP Address to Banlist' => 'Adicionando endereço IP na lista negra',
'active' => 'activo',
'spnd' => 'suspenso',
'suspended' => 'suspenso',
- 'running' => 'rodando',
+ 'running' => 'em execução',
'stopped' => 'parado',
'outdated' => 'desatualizado',
'updated' => 'atualizado',
@@ -137,24 +137,24 @@ $LANG['pt'] = array(
'gb' => 'gb',
'mb' => 'mb',
'minute' => 'minuto',
- 'hour' => 'houra',
+ 'hour' => 'hora',
'day' => 'dia',
'days' => 'dias',
'hours' => 'horas',
'minutes' => 'minutos',
- 'month' => 'mes',
+ 'month' => 'mês',
'package' => 'pacote',
'Bandwidth' => 'Largura de Banda',
'Disk' => 'Disco',
'Web' => 'Web',
'Mail' => 'Email',
- 'Databases' => 'Bases de Dados',
+ 'Databases' => 'Banco de Dados',
'User Directories' => 'Diretórios do Usuário',
'Template' => 'Template',
- 'Web Template' => 'Template Web',
- 'Backend Template' => 'Template Backend',
- 'Proxy Template' =>'Template Proxy',
- 'DNS Template' => 'Template DNS',
+ 'Web Template' => 'Template da Web',
+ 'Backend Template' => 'Template do Backend',
+ 'Proxy Template' =>'Template da Proxy',
+ 'DNS Template' => 'Template do DNS',
'Web Domains' => 'Domínios Web',
'SSL Domains' => 'Domínios SSL',
'Web Aliases' => 'Apelidos Web',
@@ -162,18 +162,18 @@ $LANG['pt'] = array(
'DNS Domains' => 'Domínios DNS',
'DNS Domains' => 'Domínios DNS',
'DNS records' => 'Registros DNS',
- 'Name Servers' => 'Servidor de Nomes',
+ 'Name Servers' => 'Servidores de Nome',
'Mail Domains' => 'Domínios de Email',
'Mail Accounts' => 'Contas de Email',
- 'Cron Jobs' => 'Tarefas do Cron',
+ 'Cron Jobs' => 'Tarefas',
'SSH Access' => 'Acesso SSH',
'IP Addresses' => 'Endereços IP',
'Backups' => 'Backups',
'Backup System' => 'Sistema de Backup',
- 'backup exclusions' => 'exclusões',
+ 'backup exclusions' => 'exclusões de backup',
'template' => 'template',
- 'SSL Support' => 'Suporte a SSL',
- 'SSL Home Directory' => 'Home SSL',
+ 'SSL Support' => 'Suporte SSL',
+ 'SSL Home Directory' => 'Diretório Home SSL',
'Proxy Support' => 'Suporte ao Proxy',
'Proxy Extensions' => 'Extenções do Proxy',
'Web Statistics' => 'Estatísticas Web',
@@ -182,16 +182,16 @@ $LANG['pt'] = array(
'TTL' => 'TTL',
'Expire' => 'Expira',
'Records' => 'registros',
- 'Catchall email' => 'Email Pega tudo',
- 'AntiVirus Support' => 'Suporte a AntiVirus',
- 'AntiSpam Support' => 'Suporte a AntiSpam',
+ 'Catchall email' => 'Pegar todos os emails',
+ 'AntiVirus Support' => 'Suporte a Antivírus',
+ 'AntiSpam Support' => 'Suporte a Antispam',
'DKIM Support' => 'Suporte a DKIM',
'Accounts' => 'Contas',
- 'Quota' => 'Quota',
+ 'Quota' => 'Cota',
'Autoreply' => 'Auto resposta',
'Forward to' => 'Encaminhar para',
'Do not store forwarded mail' => 'Não armazenar email encaminhado',
- 'database' => 'base de dados',
+ 'database' => 'banco de dados',
'User' => 'Usuário',
'Host' => 'Host',
'Charset' => 'Charset',
@@ -204,7 +204,7 @@ $LANG['pt'] = array(
'Run Time' => 'Tempo de execução',
'Backup Size' => 'Tamanho do Backup',
'SYS' => 'SYS',
- 'Domains' => 'Dominios',
+ 'Domains' => 'Domínios',
'Status' => 'Status',
'shared' => 'compartilhado',
'dedicated' => 'dedicado',
@@ -217,8 +217,8 @@ $LANG['pt'] = array(
'MySQL Usage on localhost' => 'Uso do MySQL MySQL em localhost',
'PostgreSQL Usage on localhost' => 'Uso do PostgreSQL em localhost',
'Bandwidth Usage eth0' => 'Uso de Banda em eth0',
- 'FTP Usage' => 'Uso FTP',
- 'SSH Usage' => 'Uso SSH',
+ 'FTP Usage' => 'Uso do FTP',
+ 'SSH Usage' => 'Uso do SSH',
'reverse proxy' => 'proxy reverso',
'web server' => 'servidor web',
'dns server' => 'servidor dns',
@@ -231,7 +231,7 @@ $LANG['pt'] = array(
'job scheduler' => 'agendador de tarefas',
'CPU' => 'CPU',
'Memory' => 'Memória',
- 'Uptime' => 'Uptime',
+ 'Uptime' => 'Tempo em Atividade',
'core package' => 'pacote principal',
'php interpreter' => 'interpretador php',
'internal web server' => 'servidor web interno',
@@ -247,27 +247,27 @@ $LANG['pt'] = array(
'Language' => 'Linguagem',
'First Name' => 'Primeiro Nome',
'Last Name' => 'Sobrenome',
- 'Send login credentials to email address' => 'Enviar dados de Login para o endereço de Email',
+ 'Send login credentials to email address' => 'Enviar credenciais para o endereço de email',
'Default Template' => 'Template padrão',
- 'Default Name Servers' => 'Servidores de Nome (DNS) Padrão',
+ 'Default Name Servers' => 'Servidores de Nome Padrão',
'Domain' => 'Domínio',
'DNS Support' => 'Suporte a DNS',
'Mail Support' => 'Suporte a Email',
'Advanced options' => 'Opções Avançadas',
'Aliases' => 'Apelidos',
- 'SSL Certificate' => 'Cerificado SSL',
+ 'SSL Certificate' => 'Certificado SSL',
'SSL Key' => 'Chave SSL',
'SSL Certificate Authority / Intermediate' => 'Autoridade Certificadora SSL / Intermediária',
- 'SSL CSR' => 'SSL CSR (pedido)',
+ 'SSL CSR' => 'SSL CSR',
'optional' => 'opcional',
'internal' => 'interno',
- 'Statistics Authorization' => 'Permissões de Estatística',
- 'Statistics Auth' => 'Permissões de Estatística',
+ 'Statistics Authorization' => 'Estatística de Autorização',
+ 'Statistics Auth' => 'Estatísticas de Autenticação',
'Account' => 'Conta',
'Prefix will be automaticaly added to username' => 'O prefixo %s será automaticamente adicionado ao nome de usuário',
- 'Send FTP credentials to email' => 'Enviar dados de acesso ao FTP por email',
+ 'Send FTP credentials to email' => 'Enviar credenciais ao FTP por email',
'Expiration Date' => 'data para Expirar',
- 'YYYY-MM-DD' => 'YYYY-MM-DD',
+ 'YYYY-MM-DD' => 'DD-MM-YYYY',
'Name servers' => 'Servidores de Nome',
'Record' => 'Registro',
'IP or Value' => 'IP ou Valor',
@@ -276,9 +276,9 @@ $LANG['pt'] = array(
'in megabytes' => 'em megabytes',
'Message' => 'Mensagem',
'use local-part' => 'usar local-part',
- 'one or more email addresses' => 'um ou mais endereços de Email',
- 'Prefix will be automaticaly added to database name and database user' => 'O prefixo %s será adicionado automaticamente ao nome da base de dados e usuário',
- 'Database' => 'Base de dados',
+ 'one or more email addresses' => 'um ou mais endereços de email',
+ 'Prefix will be automaticaly added to database name and database user' => 'O prefixo %s será adicionado automaticamente ao nome do banco de dados e usuário',
+ 'Database' => 'Banco de Dados',
'Type' => 'Tipo',
'Minute' => 'Minuto',
'Command' => 'Comando',
@@ -286,8 +286,8 @@ $LANG['pt'] = array(
'Netmask' => 'Máscara de Rede',
'Interface' => 'Interface',
'Shared' => 'Compartilhado',
- 'Assigned user' => 'Usuário designado',
- 'Assigned domain' => 'Domínio designado',
+ 'Assigned user' => 'Usuário atribuído',
+ 'Assigned domain' => 'Domínio atribuído',
'NAT IP association' => 'Associação NAT IP',
'shell' => 'shell',
'web domains' => 'domínios web',
@@ -297,9 +297,9 @@ $LANG['pt'] = array(
'mail accounts' => 'contas de email',
'accounts' => 'contas',
'databases' => 'bases de dados',
- 'cron jobs' => 'taregas do cron',
+ 'cron jobs' => 'tarefas',
'backups' => 'backups',
- 'quota' => 'quota',
+ 'quota' => 'cota',
'day of week' => 'dia da semana',
'cmd' => 'cmd',
'users' => 'usuários',
@@ -317,7 +317,7 @@ $LANG['pt'] = array(
'IP address' => 'Endereço IP',
'netmask' => 'máscara de rede',
'interface' => 'interface',
- 'assigned user' => 'usuário designado',
+ 'assigned user' => 'usuário atribuído',
'ns1' => 'ns1',
'ns2' => 'ns2',
'user' => 'usuário',
@@ -327,40 +327,41 @@ $LANG['pt'] = array(
'account' => 'conta',
'ssl certificate' => 'certificado ssl',
'ssl key' => 'chave ssl',
- 'stats user password' => 'usuário e senha para estatísticas',
- 'stats username' => 'usuário para estatísticas',
- 'stats password' => 'senha para estatísticas',
- 'ftp user password' => 'usuário e senha FTP',
- 'ftp user' => 'usuário FTP',
+ 'stats user password' => 'estatísticas usuário senha',
+ 'stats username' => 'estatísticas usuário',
+ 'stats password' => 'estatísticas senha',
+ 'ftp user password' => 'ftp usuário senha',
+ 'ftp user' => 'ftp usuário',
'Last 70 lines of %s.%s.log' => 'Últimas 70 linhas de %s.%s.log',
'Download AccessLog' => 'Baixar AccessLog',
'Download ErrorLog' => 'Baixar ErrorLog',
'Country' => 'País',
'2 letter code' => 'código de duas letras',
- 'State / Province' => 'Estado / Região',
- 'City / Locality' => 'Localidade',
+ 'State / Province' => 'Estado / Província',
+ 'City / Locality' => 'Cidade / Localidade',
'Organization' => 'Organização',
'Action' => 'Ação',
'Protocol' => 'Protocolo',
- 'Port' => 'Porto',
- 'Comment' => 'Comentario',
- 'Banlist' => 'Banlista',
- 'ranges are acceptable' => 'gamas são permitidos',
- 'CIDR format is supported' => 'formato CIDR é suportada',
+ 'Port' => 'Porta',
+ 'Comment' => 'Comentário',
+ 'Banlist' => 'Lista Negra',
+ 'ranges are acceptable' => 'variações são permitidas',
+ 'CIDR format is supported' => 'formato CIDR é suportado',
+ 'Add one more Name Server' => 'Adicionar um ou mais Servidores de Nome',
- 'unlimited' => 'unlimited',
+ 'unlimited' => 'ilimitado',
'1 account' => '1 conta',
'%s accounts' => '%s contas',
'1 domain' => '1 domínio',
- '%s domains' => '%s domínio',
+ '%s domains' => '%s domínios',
'1 record' => '1 registro',
'%s records' => '%s registros',
'1 mail account' => '1 conta de email',
'%s mail accounts' => '%s contas de email',
'1 database' => '1 banco de dados',
'%s databases' => '%s bancos de dados',
- '1 cron job' => '1 tarefa do cron',
- '%s cron jobs' => '%s tarefas do cron',
+ '1 cron job' => '1 tarefa',
+ '%s cron jobs' => '%s tarefas',
'1 archive' => '1 arquivo',
'%s archives' => '%s aquivos',
'1 package' => '1 pacote',
@@ -376,7 +377,7 @@ $LANG['pt'] = array(
'no exclusions' => 'sem exclusões',
'1 rule' => '1 regra',
'%s rules' => '%s regras',
- 'There are no currently banned IP' => 'Não existe são proibidos IP',
+ 'There are no currently banned IP' => 'Não há nenhum IP banido atualmente',
'USER_CREATED_OK' => 'Usuário %s criado com sucesso',
'WEB_DOMAIN_CREATED_OK' => 'Domínio %s criado com sucesso.',
@@ -385,15 +386,15 @@ $LANG['pt'] = array(
'MAIL_DOMAIN_CREATED_OK' => 'Domínio de Email %s criado com sucesso.',
'MAIL_ACCOUNT_CREATED_OK' => 'Conta de Email %s@%s criado com sucesso',
'DATABASE_CREATED_OK' => 'Banco de dados %s criado com sucesso',
- 'CRON_CREATED_OK' => 'Tarefa do Cron adicionada com sucesso.',
+ 'CRON_CREATED_OK' => 'Tarefa adicionada com sucesso.',
'IP_CREATED_OK' => 'Endereço IP %s criado com sucesso.',
'PACKAGE_CREATED_OK' => 'Pacote %s criado com sucesso.',
- 'SSL_GENERATED_OK' => 'SSL certificado criado sucesso.',
+ 'SSL_GENERATED_OK' => 'Certificado SSL criado sucesso.',
'RULE_CREATED_OK' => 'Regra criada com sucesso.',
- 'Autoupdate has been successfully enabled' => 'Autoupdate ativado com sucesso',
- 'Autoupdate has been successfully disabled' => 'Autoupdate desativado com sucesso',
- 'Cronjob email reporting has been successfully enabled' => 'Relatórios de cronjob ativado com sucesso',
- 'Cronjob email reporting has been successfully disabled' => 'Relatórios de cronjob desativado com sucesso',
+ 'Autoupdate has been successfully enabled' => 'Atualização automática ativada com sucesso',
+ 'Autoupdate has been successfully disabled' => 'Atualização automática desativado com sucesso',
+ 'Cronjob email reporting has been successfully enabled' => 'Relatórios de tarefas ativado com sucesso',
+ 'Cronjob email reporting has been successfully disabled' => 'Relatórios de tarefas desativado com sucesso',
'Changes has been saved.' => 'As alterações foram salvas.',
'Confirmation' => 'Confirmação',
'DELETE_USER_CONFIRMATION' => 'Tem certeza que deseja deletar o usuário %s?',
@@ -421,6 +422,7 @@ $LANG['pt'] = array(
'DELETE_RULE_CONFIRMATION' => 'Tem certeza que deseja deletar o regra #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Tem certeza que deseja suspender o regra #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Tem certeza que deseja reativar o regra #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Deixar a página?',
'RESTART_CONFIRMATION' => 'Tem certeza que deseja reiniciar %s?',
'Welcome' => 'Bem Vindo',
'LOGGED_IN_AS' => 'Entrar como o usuário %s',
@@ -434,17 +436,17 @@ $LANG['pt'] = array(
'Error code:' => 'Código do Erro: %s',
'SERVICE_ACTION_FAILED' => '"%s" "%s" falhou',
'IP address is in use' => 'O endereço IP está em uso',
- 'BACKUP_SCHEDULED' => 'A tarefa foi adicionada a fila. Você receberá um email quando o backup estiver pronto para ser baixado.',
- 'BACKUP_EXISTS' => 'Um backup já está rodando. Por favor aguarde até terminar.',
- 'RESTORE_SCHEDULED' => 'A tarefa foi adicionada a fila. Você receberá um email de confirmação.',
- 'RESTORE_EXISTS' => 'Uma restauração já está em andamento. Por favor aguarde até que a mesma termine.',
+ 'BACKUP_SCHEDULED' => 'A tarefa foi adicionada à fila. Você receberá um email quando o backup estiver pronto para ser baixado.',
+ 'BACKUP_EXISTS' => 'Um backup já está em execução. Por favor aguarde até terminar.',
+ 'RESTORE_SCHEDULED' => 'A tarefa foi adicionada à fila. Você receberá um email de confirmação.',
+ 'RESTORE_EXISTS' => 'Uma tarefa de restauração já está em execução. Por favor aguarde até que a mesma termine.',
- 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp",
- 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *",
- 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster",
- 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *",
- 'CRON_EXCLUSIONS' => "To exclude all jobs use *",
- 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *",
+ 'WEB_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir diretórios específicos use o seguinte formato: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *",
+ 'MAIL_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir contas específicas use o seguinte formato: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Digite o nome completo do banco de dados, um por linha. Para excluir todos os bancos de dados use *",
+ 'CRON_EXCLUSIONS' => "Para excluir todas as tarefas *",
+ 'USER_EXCLUSIONS' => "Digite o nome do diretório, um por linha. Para excluir todos os diretórios use *",
'Welcome to Vesta Control Panel' => 'Bem vindo ao Painel de Controle Vesta',
'MAIL_FROM' => 'Painel de Controle Vesta ',
@@ -452,47 +454,150 @@ $LANG['pt'] = array(
'GREETINGS' => "Olá,\n",
'ACCOUNT_READY' => "Sua conta foi criada e está pronta para uso.\n\nhttps://%s/login/\nUsuário: %s\nSenha: %s\n\n--\nPainel de Controle Vesta\n",
- 'FTP login credentials' => 'Dados de Acesso FTP',
+ 'FTP login credentials' => 'Credenciais de acesso ao FTP',
'FTP_ACCOUNT_READY' => "A conta FTP foi criada e está pronta pra uso.\n\nServidor: %s\nUsuário: %s_%s\nSenha: %s\n\n--\nPainel de Controle Vesta\n",
- 'Database Credentials' => 'Dados de Acesso ao Banco de Dados',
+ 'Database Credentials' => 'Credenciais de acesso ao Banco de Dados',
'DATABASE_READY' => "Banco de dados Criado com Sucesso.\n\nBanco de dados: %s\nUsuário: %s\nSenha: %s\n%s\n\n--\nPainel de Controle Vesta\n",
'forgot password' => 'esqueci minha senha',
'Confirm' => 'Confirmar',
'New Password' => 'Nova senha',
'Confirm Password' => 'Confirmar senha',
- 'Reset' => 'Restaurar',
- 'Reset Code' => 'Resetar Código',
+ 'Reset' => 'Redefinir',
+ 'Reset Code' => 'Código de Redefinição',
'RESET_NOTICE' => '',
- 'RESET_CODE_SENT' => 'O código de restauração de senha foi enviado por email ',
- 'MAIL_RESET_SUBJECT' => 'Senha Restaurada em %s',
- 'PASSWORD_RESET_REQUEST' => "Para restaurar sua senha do Painel de Controle, Por favor use o seguinte link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nComo alternativa, você pode visitar https://%s/reset/?action=code&user=%s e digitar o seguinte código de restauração:\n%s\n\nSe você não solicitou uma restauração de senha, por favor ignore esse mensagem e aceite nossas desculpas.\n\n--\nPainel de Controle Vesta\n",
+ 'RESET_CODE_SENT' => 'O código de redefinição de senha foi enviado para o seu email ',
+ 'MAIL_RESET_SUBJECT' => 'Senha Redefinida em %s',
+ 'PASSWORD_RESET_REQUEST' => "Para redefinir sua senha do Painel de Controle, por favor use o seguinte link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nComo alternativa, você pode visitar https://%s/reset/?action=code&user=%s e digitar o seguinte código de redefinição:\n%s\n\nSe você não solicitou uma redefinição de senha, por favor ignore esse mensagem e aceite nossas desculpas.\n\n--\nPainel de Controle Vesta\n",
'Jan' => 'Jan',
- 'Feb' => 'Feb',
+ 'Feb' => 'Fev',
'Mar' => 'Mar',
- 'Apr' => 'Apr',
- 'May' => 'May',
+ 'Apr' => 'Abr',
+ 'May' => 'Mai',
'Jun' => 'Jun',
'Jul' => 'Jul',
- 'Aug' => 'Aug',
- 'Sep' => 'Sep',
- 'Oct' => 'Oct',
+ 'Aug' => 'Ago',
+ 'Sep' => 'Set',
+ 'Oct' => 'Out',
'Nov' => 'Nov',
- 'Dec' => 'Dec',
+ 'Dec' => 'Dez',
- 'Configuring Server' => 'Configuring Server',
+ 'Configuring Server' => 'Configurando Servidor',
'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
+ 'Time Zone' => 'Fuso Horário',
+ 'Default Language' => 'Linguagem Padrão',
+ 'FileSystem Disk Quota' => 'Cota de Disco',
'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
- 'Reseller Role' => 'Reseller Role',
- 'Web Config Editor' => 'Web Config Editor',
- 'Template Manager' => 'Template Manager',
- 'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
+ 'preview' => 'pré-visualizar',
+ 'Reseller Role' => 'Regra de Revendedor',
+ 'Web Config Editor' => 'Editor de Configuração Web',
+ 'Template Manager' => 'Gerenciador de Template',
+ 'Backup Migration Manager' => 'Gerenciador de Migração de Backup',
+ 'FileManager' => 'Gerenciador de Arquivo',
+ 'show: CPU / MEM / NET / DISK' => 'mostrar: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'ordenar por',
+ 'Date' => 'Data',
+ 'Starred' => 'Estreado',
+ 'Name' => 'Nome',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'tipo',
+ 'size' => 'tamanho',
+ 'date' => 'data',
+ 'name' => 'nome',
+ 'Initializing' => 'Inicializando',
+ 'UPLOAD' => 'ENVIAR',
+ 'NEW FILE' => 'NOVO ARQUIVO',
+ 'NEW DIR' => 'NOVO DIR',
+ 'DELETE' => 'DELETAR',
+ 'RENAME' => 'RENOMEAR',
+ 'COPY' => 'COPIAR',
+ 'ARCHIVE' => 'ARQUIVAR',
+ 'EXTRACT' => 'EXTAIR',
+ 'DOWNLOAD' => 'BAIXAR',
+ 'Hit' => 'Acertar',
+ 'to reload the page' => 'recarregar a página',
+ 'Directory name cannot be empty' => 'Nome do diretório não pode estar vazio',
+ 'File name cannot be empty' => 'Nome do arquivo não pode estar vazio',
+ 'No file selected' => 'Nenhum arquivo selecionado',
+ 'No file or folder selected' => 'Nenhum arquivo ou diretório selecionado',
+ 'File type not supported' => 'Tipo de arquivo não suportado',
+ 'Directory download not available in current version' => 'Baixar diretório não está disponível na versão atual',
+ 'Directory not available' => 'Diretório não disponível',
+ 'Done' => 'Pronto',
+ 'Close' => 'Fechar',
+ 'Copy' => 'Copiar',
+ 'Cancel' => 'Cancelar',
+ 'Rename' => 'Renomear',
+ 'Delete' => 'Deletar',
+ 'Extract' => 'Extrair',
+ 'Create' => 'Criar',
+ 'Compress' => 'Comprimir',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Tem certeza que deseja copiar',
+ 'Are you sure you want to delete' => 'Tem certeza que deseja deletar',
+ 'into' => 'dentro',
+ 'existing files will be replaced' => 'arquivos existentes serão substituídos',
+ 'Original name' => 'Nome original',
+ 'File' => 'Arquivo',
+ 'already exists' => 'já existe',
+ 'Create file' => 'Criar arquivo',
+ 'Create directory' => 'Criar diretório',
+
+ 'Add New object' => 'Adicionar novo objeto',
+ 'Save Form' => 'Salvar formulário',
+ 'Cancel saving form' => 'Cancelar salvamento do formulário',
+ 'Go to USER list' => 'Ir para a lista de USER',
+ 'Go to WEB list' => 'Ir para a lista de WEB',
+ 'Go to DNS list' => 'Ir para a lista de DNS',
+ 'Go to MAIL list' => 'Ir para a lista de MAIL',
+ 'Go to DB list' => 'Ir para a lista de DB',
+ 'Go to CRON list' => 'Ir para a lista de CRON',
+ 'Go to BACKUP list' => 'Ir para a lista de BACKUP',
+ 'Focus on search' => 'Foco na pesquisa',
+ 'Display/Close shortcuts' => 'Mostrar/Fechar atalhos',
+ 'Move backward through top menu' => 'Mover para trás através do menu superior',
+ 'Move forward through top menu' => 'Mover para frente através do menu superior',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Enviar',
+ 'New File' => 'Novo Arquivo',
+ 'New Folder' => 'Novo Diretório',
+ 'Download' => 'Baixar',
+ 'Rename' => 'Renomear',
+ 'Copy' => 'Copiar',
+ 'Archive' => 'Arquivar',
+ 'Delete' => 'Deletar',
+ 'Save File (in text editor)' => 'Salvar Arquivo (no editor de texto)',
+ 'Close Popup / Cancel' => 'Fechar Popup / Cancelar',
+ 'Move Cursor Up' => 'Mover o Cursor para Cima',
+ 'Move Cursor Dow' => 'Mover o Cursor para Baixo',
+ 'Switch to Left Tab' => 'Alternar para a Guia à Esquerda',
+ 'Switch to Right Tab' => 'Alternar para a Guia à Direita',
+ 'Switch Tab' => 'Alternar Guia',
+ 'Go to the Top of File List' => 'Ir para o Início da Lista de Arquivo',
+ 'Go to the Last File' => 'Ir para o último Arquivo',
+ 'Open File/Enter Directory' => 'Abrir Arquivo/Digitar Diretório',
+ 'Go to Parent Directory' => 'Ir para o diretório principal',
+ 'Select Current File' => 'Selecionar o Arquivo Atual',
+ 'Select Bunch of Files' => 'Selecionar Vários Arquivos',
+ 'Append File to the Current Selection' => 'Acrescentar Arquivo à Seleção Atual',
+ 'Select All Files' => 'Selecionar Todos os Arquivos',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'atalhos são inspirados pela magnífica GNU Midnight Commander Gerenciador de Arquivos',
+
+ 'Licence Key' => 'Chave de Licença',
+ 'Enter License Key' => 'Digite a Chave de Licença',
+ 'Buy Licence' => 'Comprar Licença',
+ 'Buy Lifetime License' => 'Comprar Licença Vitalícia',
+ 'Disable and Cancel Licence' => 'Desativar e Cancelar a Licença',
+ 'Licence Activated' => 'Lisença Ativada',
+ 'Licence Deactivated' => 'Licença Desativada',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restringir usuários para que eles não possam usar SSH e acessar apenas seu diretório home.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copiar, editar, ver, e recuperar todos os arquivos de seu domínio web usando o completo Gerenciador de Arquivos.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'Éste é um módulo comercial que você poderia comprar uma chave de licença para habilita-lo.'
);
diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php
index 6de5fa05b..85c3a3a6d 100644
--- a/web/inc/i18n/ro.php
+++ b/web/inc/i18n/ro.php
@@ -3,49 +3,49 @@
* Vesta language file
* skid (skid@vestacp.com)
* bbl (sergiu.badan@gmail.com)
+ * Ionescu Bogdan | https://github.com/ionescu-bogdan
*/
$LANG['ro'] = array(
-
'Packages' => 'Pachete',
- 'IP' => 'IP',
- 'Graphs' => 'Graficele',
+ 'IP' => 'IP-uri',
+ 'Graphs' => 'Grafice',
'Statistics' => 'Statistică',
- 'Log' => 'Log',
+ 'Log' => 'Jurnal',
'Server' => 'Server',
'Services' => 'Servicii',
'Firewall' => 'Firewall',
'Updates' => 'Actualizări',
- 'Log in' => 'Log in',
- 'Log out' => 'Log out',
+ 'Log in' => 'Login', # Translation is `Autentificare`, but also `Login` is corect
+ 'Log out' => 'Logout', # Translation is `Ieșire`, but also `Logout` is corect
- 'USER' => 'USER',
+ 'USER' => 'CONT', # Translation is `UTILIZATOR`, but it is too long
'WEB' => 'WEB',
'DNS' => 'DNS',
- 'MAIL' => 'MAIL',
- 'DB' => 'DB',
+ 'MAIL' => 'E-MAIL',
+ 'DB' => 'BD',
'CRON' => 'CRON',
'BACKUP' => 'BACKUP',
- 'Add User' => 'Adăugare utilizator',
- 'Add Domain' => 'Adăugare domeniu',
- 'Add Web Domain' => 'Adăugare domeniu',
- 'Add DNS Domain' => 'Adăugare domeniu',
- 'Add DNS Record' => 'Adăugare',
- 'Add Mail Domain' => 'Adăugare domeniu',
- 'Add Mail Account' => 'Adăugare countul',
- 'Add Database' => 'Adăugare BD',
- 'Add Cron Job' => 'Adăugare sarcină',
- 'Create Backup' => 'Creare un backup',
+ 'Add User' => 'Adăugare Utilizator',
+ 'Add Domain' => 'Adăugare Domeniu',
+ 'Add Web Domain' => 'Adăugare Domeniu WEB',
+ 'Add DNS Domain' => 'Adăugare Domeniu DNS',
+ 'Add DNS Record' => 'Adăugare Înregistrare DNS',
+ 'Add Mail Domain' => 'Adăugare Domeniu E-MAIL',
+ 'Add Mail Account' => 'Adăugare Cont de e-mail',
+ 'Add Database' => 'Adăugare Baza de Date',
+ 'Add Cron Job' => 'Adăugare Sarcină',
+ 'Create Backup' => 'Creare Backup',
'Configure' => 'Configurare',
- 'Restore All' => 'Restaurare toate',
- 'Add Package' => 'Adăugare pachet',
+ 'Restore All' => 'Restaurează Tot',
+ 'Add Package' => 'Adăugare Pachet',
'Add IP' => 'Adăugare IP',
- 'Add Rule' => 'Adăugare regulă',
- 'Ban IP Address' => 'Blocare IP',
+ 'Add Rule' => 'Adăugare Regulă',
+ 'Ban IP Address' => 'Blocare Adresă IP',
'Search' => 'Сăutare',
- 'Add one more FTP Account' => 'Inca un FTP count',
- 'Overall Statistics' => 'Statistică rezumativă',
+ 'Add one more FTP Account' => 'Adaugă încă un cont FTP',
+ 'Overall Statistics' => 'Statistică Generală',
'Daily' => 'Zilnic',
'Weekly' => 'Săptămânal',
'Monthly' => 'Lunar',
@@ -56,89 +56,89 @@ $LANG['ro'] = array(
'Submit' => 'OK',
'toggle all' => 'selectează toate',
- 'apply to selected' => 'aplică la selectat',
- 'rebuild' => 'reconstrui',
- 'rebuild web' => 'reconstrui WEB',
- 'rebuild dns' => 'reconstrui DNS',
- 'rebuild mail' => 'reconstrui MAIL',
- 'rebuild db' => 'reconstrui DB',
- 'rebuild cron' => 'reconstrui CRON',
- 'update counters' => 'actualizeze contoare',
+ 'apply to selected' => 'aplică la selecție',
+ 'rebuild' => 'reconstruire',
+ 'rebuild web' => 'reconstruire WEB',
+ 'rebuild dns' => 'reconstruire DNS',
+ 'rebuild mail' => 'reconstruire MAIL',
+ 'rebuild db' => 'reconstruire DB',
+ 'rebuild cron' => 'reconstruire CRON',
+ 'update counters' => 'actualizare contoare',
'suspend' => 'suspendare',
- 'unsuspend' => 'unsuspendeze',
+ 'unsuspend' => 'activare',
'delete' => 'ștergere',
- 'show per user' => 'arata pentru utilizator',
+ 'show per user' => 'arată pentru utilizator',
'login as' => 'intră ca',
'logout' => 'logout',
'edit' => 'editare',
- 'open webstats' => 'deschide raportul de analiză',
- 'view logs' => 'vizualiza loguri',
+ 'open webstats' => 'vizualizare statistica',
+ 'view logs' => 'vizualizare jurnale',
'list records' => 'arată inregistrarile: %s',
'add record' => 'adaugă înregistrare',
'list accounts' => 'arata conturi: %s',
- 'add account' => 'adaugă contul',
+ 'add account' => 'adaugă cont',
'open webmail' => 'deschide webmail',
- 'list fail2ban' => 'arată fail2ban',
+ 'list fail2ban' => 'afișare fail2ban',
'open %s' => 'deschide %s',
- 'download' => 'descărca',
- 'restore' => 'restabili',
+ 'download' => 'descarcă',
+ 'restore' => 'restabilește',
'configure restore settings' => 'configurare parametri de restaurare',
'stop' => 'oprește',
'start' => 'pornește',
'restart' => 'repornește',
- 'update' => 'actualiza',
+ 'update' => 'actualizează',
'generate' => 'generează',
- 'Generate CSR' => 'Genera cere CSR',
+ 'Generate CSR' => 'Generează CSR',
'reread IP' => 'recitește IP',
- 'enable autoupdate' => 'activa autoupdate',
- 'disable autoupdate' => 'deactiva autoupdate',
- 'turn on notifications' => 'activa notificarea',
- 'turn off notifications' => 'deactiva notificarea',
+ 'enable autoupdate' => 'activează actualizarea automată',
+ 'disable autoupdate' => 'dezactivează actualizarea automată',
+ 'turn on notifications' => 'activează notificările',
+ 'turn off notifications' => 'dezactivează notificările',
- 'Adding User' => 'Adăugare utilizator',
- 'Editing User' => 'Editare utilizator',
- 'Adding Domain' => 'Adăugare domeniu',
- 'Editing Domain' => 'Editare domeniu',
- 'Adding DNS Domain' => 'Adăugare domeniu DNS',
- 'Editing DNS Domain' => 'Editare domeniu DNS',
- 'Adding DNS Record' => 'Adăugare de înregistrare DNS',
- 'Editing DNS Record' => 'Editare de înregistrare DNS',
- 'Adding Mail Domain' => 'Adăugare domeniu poștal',
- 'Editing Mail Domain' => 'Editare domeniu poștal',
- 'Adding Mail Account' => 'Adăugare contul de poștă electronică',
- 'Editing Mail Account' => 'Editare contul de poștă electronică',
- 'Adding database' => 'Adăugare baze de date',
- 'Editing Database' => 'Editare baze de date',
- 'Adding Cron Job' => 'Adăugare sarcina cron',
- 'Editing Cron Job' => 'Editare sarcina cron',
- 'Adding Package' => 'Adăugare pachetul',
- 'Editing Package' => 'Editare pachetul',
- 'Adding IP address' => 'Adăugare adresă IP',
- 'Editing IP Address' => 'Editare adresă IP',
- 'Editing Backup Exclusions' => 'Editare excluderi',
+ 'Adding User' => 'Adăugare Utilizator',
+ 'Editing User' => 'Editare Utilizator',
+ 'Adding Domain' => 'Adăugare Domeniu',
+ 'Editing Domain' => 'Editare Domeniu',
+ 'Adding DNS Domain' => 'Adăugare Domeniu DNS',
+ 'Editing DNS Domain' => 'Editare Domeniu DNS',
+ 'Adding DNS Record' => 'Adăugare Înregistrare DNS',
+ 'Editing DNS Record' => 'Editare Înregistrare DNS',
+ 'Adding Mail Domain' => 'Adăugare Domeniu E-MAIL',
+ 'Editing Mail Domain' => 'Editare Domeniu E-MAIL',
+ 'Adding Mail Account' => 'Adăugare Cont de E-mail',
+ 'Editing Mail Account' => 'Editare Cont de E-mail',
+ 'Adding database' => 'Adăugare Baze de Date',
+ 'Editing Database' => 'Editare Baze de Date',
+ 'Adding Cron Job' => 'Adăugare Sarcină',
+ 'Editing Cron Job' => 'Editare Sarcină',
+ 'Adding Package' => 'Adăugare Pachet',
+ 'Editing Package' => 'Editare Pachet',
+ 'Adding IP address' => 'Adăugare Adresă IP',
+ 'Editing IP Address' => 'Editare Adresă IP',
+ 'Editing Backup Exclusions' => 'Editare Excluderi din Backup',
'Generating CSR' => 'Generare CSR',
'Listing' => 'Vizualizare',
- 'Search Results' => 'Rezultatele căutării',
- 'Adding Firewall Rule' => 'Adăugare regulă',
- 'Editing Firewall Rule' => 'Editare regulă',
- 'Adding IP Address to Banlist' => 'Blocarea IP',
+ 'Search Results' => 'Rezultate Căutări',
+ 'Adding Firewall Rule' => 'Adăugare Regulă',
+ 'Editing Firewall Rule' => 'Editare Regulă',
+ 'Adding IP Address to Banlist' => 'Adăugare Adresă IP în Listă',
'active' => 'activ',
'spnd' => 'suspendat',
'suspended' => 'suspendat',
'running' => 'rulează',
'stopped' => 'oprit',
- 'outdated' => 'depășit',
+ 'outdated' => 'învechit',
'updated' => 'actualizat',
'yes' => 'da',
'no' => 'nu',
'none' => 'nu',
- 'pb' => 'pb',
- 'tb' => 'tb',
- 'gb' => 'gb',
- 'mb' => 'mb',
- 'minute' => 'minuta',
+ 'pb' => 'Pb',
+ 'tb' => 'Tb',
+ 'gb' => 'Gb',
+ 'mb' => 'Mb',
+ 'minute' => 'minute',
'hour' => 'oră',
'day' => 'zi',
'days' => 'zile',
@@ -146,57 +146,57 @@ $LANG['ro'] = array(
'minutes' => 'minute',
'month' => 'lună',
'package' => 'pachet',
- 'Bandwidth' => 'Trafic',
- 'Disk' => 'Disk',
+ 'Bandwidth' => 'Trafic Rețea',
+ 'Disk' => 'Spațiu Disc',
'Web' => 'Web',
- 'Mail' => 'Poștă',
+ 'Mail' => 'E-mail',
'Databases' => 'Baze de date',
'User Directories' => 'Fișiere',
'Template' => 'Șablon',
- 'Web Template' => 'Șablonul Web',
- 'Backend Template' => 'Șablonul Backend',
- 'Proxy Template' => 'Șablonul Proxy',
- 'DNS Template' => 'Șablonul DNS',
- 'Web Domains' => 'Domenii web',
+ 'Web Template' => 'Șablon WEB',
+ 'Backend Template' => 'Șablon BACKEND',
+ 'Proxy Template' => 'Șablon PROXY',
+ 'DNS Template' => 'Șablon DNS',
+ 'Web Domains' => 'Domenii WEB',
'SSL Domains' => 'Domenii SSL',
- 'Web Aliases' => 'Aliasuri web',
+ 'Web Aliases' => 'Aliasuri WEB',
'per domain' => 'per domeniu',
- 'DNS Domains' => 'Domenii DNS',
+ 'DNS domains' => 'Domenii DNS',
'DNS Domains' => 'Domenii DNS',
'DNS records' => 'Înregistrări DNS',
'Name Servers' => 'Servere NS',
- 'Mail Domains' => 'Domenii de poștă',
- 'Mail Accounts' => 'Conturi de poștă',
- 'Cron Jobs' => 'Sarcini cron',
+ 'Mail Domains' => 'Domenii E-MAIL',
+ 'Mail Accounts' => 'Conturi de e-mail',
+ 'Cron Jobs' => 'Sarcini CRON',
'SSH Access' => 'Acces SSH',
'IP Addresses' => 'Adrese IP',
- 'Backups' => 'Copii de rezervă',
+ 'Backups' => 'BACKUP-uri',
'Backup System' => 'Sistem de backup',
'backup exclusions' => 'excluderi',
'template' => 'șablon',
- 'SSL Support' => 'Support SSL',
- 'SSL Home Directory' => 'Mapa SSL',
- 'Proxy Support' => 'Support Proxy',
+ 'SSL Support' => 'Suport SSL',
+ 'SSL Home Directory' => 'Director Rădăcină SSL',
+ 'Proxy Support' => 'Suport PROXY',
'Proxy Extensions' => 'Extensii Proxy',
- 'Web Statistics' => 'Statistici web',
+ 'Web Statistics' => 'Statistică WEB',
'Additional FTP Account' => 'Cont suplimentar FTP',
'SOA' => 'SOA',
'TTL' => 'TTL',
- 'Expire' => 'Data expirării',
- 'Records' => 'DNS înregistrări',
- 'Catchall email' => 'E-mail catchall',
- 'AntiVirus Support' => 'Antivirus',
- 'AntiSpam Support' => 'Antispam',
- 'DKIM Support' => 'DKIM',
+ 'Expire' => 'Expiră',
+ 'Records' => 'Înregistrări',
+ 'Catchall email' => 'Adresă implicită (catchall)',
+ 'AntiVirus Support' => 'Suport Antivirus',
+ 'AntiSpam Support' => 'Suport Antispam',
+ 'DKIM Support' => 'Suport DKIM',
'Accounts' => 'Conturi',
- 'Quota' => 'cotă',
+ 'Quota' => 'Spațiu Disc',
'Autoreply' => 'Răspuns automat',
- 'Forward to' => 'Forward',
- 'Do not store forwarded mail' => 'A nu se salva mesajele redirecționate',
- 'database' => 'baza de date',
+ 'Forward to' => 'Redirectare către',
+ 'Do not store forwarded mail' => 'Redirectare fără stocare email',
+ 'database' => 'bază de date',
'User' => 'Utilizator',
'Host' => 'Host',
- 'Charset' => 'Setul de caractere',
+ 'Charset' => 'Set de caractere',
'Min' => 'Min',
'Hour' => 'Oră',
'Day' => 'Zi',
@@ -204,41 +204,45 @@ $LANG['ro'] = array(
'Day of week' => 'Ziua săptămânii',
'local' => 'local',
'Run Time' => 'Executat în',
- 'Backup Size' => 'Mărime de backup',
+ 'Backup Size' => 'Mărime Backup',
'SYS' => 'Sistem',
'Domains' => 'Domenii',
- 'Status' => 'Starea',
- 'shared' => 'comună',
+ 'Status' => 'Stare',
+ 'shared' => 'comun',
'dedicated' => 'dedicat',
'Owner' => 'Proprietar',
'Users' => 'Utilizatori',
- 'Load Average' => 'Load Average',
- 'Memory Usage' => 'Utilizare de memorie',
- 'HTTPD Usage' => 'HTTPD',
- 'NGINX Usage' => 'Proxy',
- 'MySQL Usage on localhost' => 'MySQL',
- 'PostgreSQL Usage on localhost' => 'PostgreSQL',
- 'Bandwidth Usage eth0' => 'Utilizare rețelei eth0',
- 'FTP Usage' => 'FTP ',
- 'SSH Usage' => 'SSH',
+ 'Load Average' => 'Medie Încărcare',
+ 'Memory Usage' => 'Utilizare RAM',
+ 'HTTPD Usage' => 'Utilizare HTTPD',
+ 'NGINX Usage' => 'Utilizare NGINX',
+ 'MySQL Usage on localhost' => 'Utilizare MySQL (localhost)',
+ 'PostgreSQL Usage on localhost' => 'Utilizare PostgreSQL (localhost)',
+ 'Bandwidth Usage eth0' => 'Utilizare Rețea eth0',
+ 'Bandwidth Usage eth1' => 'Utilizare Rețea eth1',
+ 'Bandwidth Usage eth2' => 'Utilizare Rețea eth2',
+ 'Bandwidth Usage eth3' => 'Utilizare Rețea eth3',
+ 'FTP Usage' => 'Utilizare FTP ',
+ 'SSH Usage' => 'Utilizare SSH',
+ 'Exim Usage' => 'Utilizare Exim',
'reverse proxy' => 'proxy inversă',
'web server' => 'server web',
'dns server' => 'server dns',
- 'mail server' => 'serverul de poștă',
+ 'mail server' => 'server e-mail',
'pop/imap server' => 'server pop/imap',
- 'email antivirus' => 'e-mail antivirus',
- 'email antispam' => 'e-mail antispam',
- 'database server' => 'server de baze de date',
+ 'email antivirus' => 'antivirus e-mail',
+ 'email antispam' => 'antispam e-mail',
+ 'database server' => 'server baze de date',
'ftp server' => 'server ftp',
- 'job scheduler' => 'job scheduler',
+ 'job scheduler' => 'sarcină programată',
'CPU' => 'CPU',
- 'Memory' => 'Memorie',
- 'Uptime' => 'Uptime',
- 'core package' => 'pachetul de bază',
- 'php interpreter' => 'php interpret',
- 'internal web server' => 'serverul web intern',
+ 'Memory' => 'RAM',
+ 'Uptime' => 'UPTIME',
+ 'core package' => 'pachet bază',
+ 'php interpreter' => 'interpretor php',
+ 'internal web server' => 'server web intern',
'Version' => 'Versiune',
- 'Release' => 'Release',
+ 'Release' => 'Lansare',
'Architecture' => 'Arhitectură',
'Object' => 'Obiect',
'Owner' => 'Proprietar',
@@ -247,254 +251,358 @@ $LANG['ro'] = array(
'Email' => 'E-mail',
'Package' => 'Pachet',
'Language' => 'Limbă',
- 'First Name' => 'Nume',
- 'Last Name' => 'Prenume',
- 'Send login credentials to email address' => 'Trimite datele de autentificare la adresa',
+ 'First Name' => 'Prenume',
+ 'Last Name' => 'Nume',
+ 'Send login credentials to email address' => 'Trimite datele de autentificare la adresa de e-mail',
'Default Template' => 'Șablon implicit',
- 'Default Name Servers' => 'Serverele NS',
+ 'Default Name Servers' => 'Serverele NS implicite',
'Domain' => 'Domeniu',
- 'DNS Support' => 'Support DNS',
- 'Mail Support' => 'Support E-mail',
+ 'DNS Support' => 'Suport DNS',
+ 'Mail Support' => 'Suport E-MAIL',
'Advanced options' => 'Opțiuni avansate',
'Aliases' => 'Aliasuri',
'SSL Certificate' => 'Certificat SSL',
'SSL Key' => 'Cheia SSL',
- 'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',
+ 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediar',
'SSL CSR' => 'Cerere CSR',
'optional' => 'opțional',
'internal' => 'intern',
- 'Statistics Authorization' => 'Autorizarea statistici',
- 'Statistics Auth' => 'Autorizarea statistici',
+ 'Statistics Authorization' => 'Autorizare pt. Statistică',
+ 'Statistics Auth' => 'Autorizare pt. Statistică',
'Account' => 'Cont',
- 'Prefix will be automaticaly added to username' => 'Prefix %s va fi adăugat automat la numele de utilizator',
- 'Send FTP credentials to email' => 'Trimite datele FTP la e-mail',
- 'Expiration Date' => 'Data de expirare',
- 'YYYY-MM-DD' => 'AAAA-LL-ZZ',
+ 'Prefix will be automaticaly added to username' => 'Prefixul %s va fi adăugat automat la numele de utilizator',
+ 'Send FTP credentials to email' => 'Trimite datele FTP la adresa de e-mail',
+ 'Expiration Date' => 'Data de Expirare',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
'Name servers' => 'Server NS',
- 'Record' => 'Înregistrare / Subdomeniu',
- 'IP or Value' => 'IP adresa sau valoare',
+ 'Record' => 'Înregistrare',
+ 'IP or Value' => 'IP sau Valoare',
'Priority' => 'Prioritate',
- 'Record Number' => 'Numărul de înregistrare',
- 'in megabytes' => 'în mb.',
+ 'Record Number' => 'Număr Înregistrare',
+ 'in megabytes' => 'în Mb',
'Message' => 'Mesaj',
'use local-part' => 'doar nume de cont înainte de @',
'one or more email addresses' => 'una sau mai multe adrese de e-mail',
- 'Prefix will be automaticaly added to database name and database user' => 'Prefix %s va fi adăugat automat la numele bazei de date si utilizatorul',
- 'Database' => 'Baza de date',
+ 'Prefix will be automaticaly added to database name and database user' => 'Prefixul %s va fi adăugat automat la numele bazei de date și la utilizator',
+ 'Database' => 'Bază de date',
'Type' => 'Tip',
'Minute' => 'Minut',
'Command' => 'Comandă',
- 'Package Name' => 'Denumire pachetului',
- 'Netmask' => 'Masca de rețea',
+ 'Package Name' => 'Nume Pachet',
+ 'Netmask' => 'Mască rețea',
'Interface' => 'Interfață',
- 'Shared' => 'Comună',
+ 'Shared' => 'Comun',
'Assigned user' => 'Utilizator asignat',
'Assigned domain' => 'Domeniu asignat',
'NAT IP association' => 'Asociere IP NAT',
- 'shell' => 'access ssh',
+ 'shell' => 'shell',
'web domains' => 'domenii web',
'web aliases' => 'aliasuri web',
'dns records' => 'înregistrări dns',
- 'mail domains' => 'domenii de poștă',
- 'mail accounts' => 'conturi de poștă',
+ 'mail domains' => 'domenii e-mail',
+ 'mail accounts' => 'conturi e-mail',
'accounts' => 'conturi',
'databases' => 'baze de date',
'cron jobs' => 'sarcini cron',
- 'backups' => 'copii de rezervă',
+ 'backups' => 'backup-uri',
'quota' => 'cotă',
'day of week' => 'ziua săptămânii',
'cmd' => 'comandă',
- 'users' => 'utilizatorii',
+ 'users' => 'utilizatori',
'domains' => 'domenii',
'aliases' => 'aliasuri',
'records' => 'înregistrări',
- 'jobs' => 'sarcinile',
+ 'jobs' => 'sarcini',
'username' => 'utilizator',
'password' => 'parolă',
'type' => 'tip',
- 'charset' => 'setul de caractere',
+ 'charset' => 'set de caractere',
'domain' => 'domeniu',
'ip' => 'IP',
- 'ip address' => 'IP adresa',
- 'IP address' => 'IP adresa',
- 'netmask' => 'masca de rețea',
- 'interface' => 'interfața',
+ 'ip address' => 'adresa ip',
+ 'IP address' => 'Adresa IP',
+ 'netmask' => 'mască rețea',
+ 'interface' => 'interfață',
'assigned user' => 'utilizator asignat',
'ns1' => 'ns1',
'ns2' => 'ns2',
'user' => 'utilizator',
'email' => 'e-mail',
- 'first name' => 'nume',
- 'last name' => 'prenume',
+ 'first name' => 'prenume', # In Romanian language `first name` is `last name`
+ 'last name' => 'nume', # In Romanian language `last name` is `first name`
'account' => 'cont',
'ssl certificate' => 'certificat SSL',
'ssl key' => 'cheia SSL',
- 'stats user password' => 'parola de utilizator statistici',
- 'stats username' => 'nume de utilizator statistici',
- 'stats password' => 'parola de utilizator statistici',
- 'ftp user password' => 'parola de FTP',
- 'ftp user' => 'cont FTP',
- 'Last 70 lines of %s.%s.log' => 'Ultimele 70 linii de %s.%s.log',
+ 'stats user password' => 'parola de utilizator pt. statistici',
+ 'stats username' => 'nume de utilizator pt. statistici',
+ 'stats password' => 'parola de utilizator pt. statistici',
+ 'ftp user password' => 'parola de utilizator pt. FTP',
+ 'ftp user' => 'utilizator FTP',
+ 'Last 70 lines of %s.%s.log' => 'Ultimele 70 de linii ale %s.%s.log',
'Download AccessLog' => 'Descarcă AccessLog',
'Download ErrorLog' => 'Descarcă ErrorLog',
'Country' => 'Țară',
'2 letter code' => 'cod de 2 litere',
- 'State / Province' => 'Județ',
+ 'State / Province' => 'Stat / Provincie / Județ',
'City / Locality' => 'Oraș / Localitate',
'Organization' => 'Organizație',
'Action' => 'Acțiune',
'Protocol' => 'Protocol',
'Port' => 'Port',
'Comment' => 'Comentariu',
- 'Banlist' => 'Banlist',
- 'ranges are acceptable' => 'intervale sunt acceptabile',
- 'CIDR format is supported' => 'format CIDR este suportat',
+ 'Banlist' => 'Blocare',
+ 'ranges are acceptable' => 'intervalele sunt acceptate',
+ 'CIDR format is supported' => 'formatul CIDR este suportat',
+ 'Add one more Name Server' => 'Adaugă unul sau mai multe servere NS',
- 'unlimited' => 'unlimited',
+ 'unlimited' => 'nelimitat',
'1 account' => '1 utilizator',
'%s accounts' => '%s utilizatori',
'1 domain' => '1 domeniu',
'%s domains' => '%s domenii',
- '1 record' => '1 înregistra',
+ '1 record' => '1 înregistrare',
'%s records' => '%s înregistrări',
- '1 mail account' => '1 cont de poștă',
- '%s mail accounts' => '%s conturi de poștă',
- '1 database' => '1 baza de date',
+ '1 mail account' => '1 cont de e-mail',
+ '%s mail accounts' => '%s conturi de e-mail',
+ '1 database' => '1 bază de date',
'%s databases' => '%s baze de date',
'1 cron job' => '1 sarcină',
'%s cron jobs' => '%s sarcini',
- '1 archive' => '1 arhiva',
+ '1 archive' => '1 arhivă',
'%s archives' => '%s arhive',
'1 package' => '1 pachet',
'%s packages' => '%s pachete',
- '1 IP address' => '1 IP adresa',
- '%s IP addresses' => '%s IP adrese',
- '1 month' => '1 luna',
+ '1 IP address' => '1 adresă IP',
+ '%s IP addresses' => '%s adrese IP',
+ '1 month' => '1 lună',
'%s months' => '%s luni',
- '1 log record' => '1 înregistra',
+ '1 log record' => '1 înregistrare',
'%s log records' => '%s înregistrări',
'1 object' => '1 obiect',
'%s objects' => '%s obiecte',
- 'no exclusions' => 'nu există excluderi',
+ 'no exclusions' => 'nu sunt excluderi',
'1 rule' => '1 regulă',
'%s rules' => '%s reguli',
- 'There are no currently banned IP' => 'La moment nu există IP interzise',
+ 'There are no currently banned IP' => 'Nu sunt IP-uri blocate în prezent',
- 'USER_CREATED_OK' => 'Utilizator %s a fost creat cu succes',
- 'WEB_DOMAIN_CREATED_OK' => 'Domeniu %s a fost creat cu succes.',
- 'DNS_DOMAIN_CREATED_OK' => 'Domeniu %s a fost creat cu succes.',
- 'DNS_RECORD_CREATED_OK' => 'Înregistrare %s.%s a fost creată cu succes.',
- 'MAIL_DOMAIN_CREATED_OK' => 'Domeniu %s a fost creat cu succes.',
- 'MAIL_ACCOUNT_CREATED_OK' => 'Contul de poștă %s@%s a fost creat cu succes',
- 'DATABASE_CREATED_OK' => 'Baza de date %s a fost creată cu succes',
+ 'USER_CREATED_OK' => 'Utilizatorul %s a fost creat cu succes.',
+ 'WEB_DOMAIN_CREATED_OK' => 'Domeniul %s a fost creat cu succes.',
+ 'DNS_DOMAIN_CREATED_OK' => 'Domeniul %s a fost creat cu succes.',
+ 'DNS_RECORD_CREATED_OK' => 'Înregistrarea %s.%s a fost creată cu succes.',
+ 'MAIL_DOMAIN_CREATED_OK' => 'Domeniul %s a fost creat cu succes.',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'Contul de e-mail %s@%s a fost creat cu succes.',
+ 'DATABASE_CREATED_OK' => 'Baza de date %s a fost creată cu succes.',
'CRON_CREATED_OK' => 'Sarcina a fost creată cu succes.',
- 'IP_CREATED_OK' => '"IP adresa %s a fost creată cu succes.',
- 'PACKAGE_CREATED_OK' => 'Pachet %s a fost creat cu succes.',
- 'SSL_GENERATED_OK' => 'SSL certificat a fost generat cu succes.',
- 'RULE_CREATED_OK' => 'Regula a fost creata cu succes.',
- 'Autoupdate has been successfully enabled' => 'Autoupdate a fost activat cu succes',
- 'Autoupdate has been successfully disabled' => 'Autoupdate a fost deactivat cu success',
- 'Cronjob email reporting has been successfully enabled' => 'Raportare cron a fost activată cu succes',
- 'Cronjob email reporting has been successfully disabled' => 'Raportare cron a fost deactivată cu succes',
+ 'IP_CREATED_OK' => 'Adresa IP %s a fost creată cu succes.',
+ 'PACKAGE_CREATED_OK' => 'Pachetul %s a fost creat cu succes.',
+ 'SSL_GENERATED_OK' => 'Certificatul SSL a fost generat cu succes.',
+ 'RULE_CREATED_OK' => 'Regula a fost creată cu succes.',
+ 'Autoupdate has been successfully enabled' => 'Actualizarea automată a fost activată cu succes.',
+ 'Autoupdate has been successfully disabled' => 'Actualizarea automată a fost deactivată cu success.',
+ 'Cronjob email reporting has been successfully enabled' => 'Notificarea prin e-mail a fost activată cu succes.',
+ 'Cronjob email reporting has been successfully disabled' => 'Notificarea prin e-mail a fost deactivată cu succes.',
'Changes has been saved.' => 'Modificările au fost salvate.',
'Confirmation' => 'Confirmare',
- 'DELETE_USER_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',
- 'SUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?',
- 'UNSUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?',
- 'DELETE_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',
- 'SUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?',
- 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?',
+ 'DELETE_USER_CONFIRMATION' => 'Ești sigur că dorești să ștergi utilizatorul %s?',
+ 'SUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să suspenzi utilizatorul %s?',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să activezi utilizatorul %s?',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să ștergi domeniul %s?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să suspenzi domeniul %s?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să activezi domeniul %s?',
'DELETE_RECORD_CONFIRMATION' => 'Ești sigur că dorești să ștergi înregistrea %s?',
- 'SUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să suspendezi înregistrea %s?',
- 'UNSUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi înregistrea %s?',
- 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',
- 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?',
- 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?',
- 'DELETE_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',
- 'SUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?',
- 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?',
- 'DELETE_CRON_CONFIRMATION' => 'Ești sigur că dorești să ștergi sarcina?',
- 'SUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să suspendezi sarcina?',
- 'UNSUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi sarcina?',
- 'DELETE_BACKUP_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',
- 'DELETE_EXCLUSION_CONFIRMATION' => 'Ești sigur că dorești să ștergi excludere %s?',
- 'DELETE_PACKAGE_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s',
- 'DELETE_IP_CONFIRMATION' => 'Ești sigur că dorești să șterge IP %s?',
- 'DELETE_RULE_CONFIRMATION' => 'Ești sigur că dorești să ștergi regulă #%s?',
- 'SUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să suspendezi regulă #%s?',
- 'UNSUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi regulă #%s?',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să suspenzi înregistrea %s?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să activezi înregistrea %s?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să ștergi contul de e-mail %s?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să suspenzi contul de e-mail %s?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să activezi contul de e-mail %s?',
+ 'DELETE_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să ștergi baza de date %s?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să suspenzi baza de date %s?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să activezi baza de date %s?',
+ 'DELETE_CRON_CONFIRMATION' => 'Ești sigur că dorești să ștergi această sarcina?',
+ 'SUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să suspenzi această sarcina?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să activezi această sarcina?',
+ 'DELETE_BACKUP_CONFIRMATION' => 'Ești sigur că dorești să ștergi backup-ul %s?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'Ești sigur că dorești să ștergi excluderea %s?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'Ești sigur că dorești să ștergi pachetul %s',
+ 'DELETE_IP_CONFIRMATION' => 'Ești sigur că dorești să ștergi IP-ul %s?',
+ 'DELETE_RULE_CONFIRMATION' => 'Ești sigur că dorești să ștergi regula #%s?',
+ 'SUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să suspenzi regula #%s?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să activezi regula #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Părăsești pagina?',
'RESTART_CONFIRMATION' => 'Ești sigur că dorești să restartezi %s?',
- 'Welcome' => 'Bun venit',
- 'LOGGED_IN_AS' => 'Ai intrat ca utilizator %s',
+ 'Welcome' => 'Bine ai venit',
+ 'LOGGED_IN_AS' => 'Te-ai autentificat ca utilizatorul %s',
'Error' => 'Eroare',
- 'Invalid username or password' => 'Numele de utilizator sau parola greșita',
- 'Invalid username or code' => 'Numele de utilizator sau cod greșit',
- 'Passwords not match' => 'Parolele nu corespunde',
- 'Please enter valid email address.' => 'Introduceti adresa de e-mail validă.',
- 'Field "%s" can not be blank.' => 'Cîmp "%s" nu poate fi gol.',
- 'Password is too short.' => 'Parola este prea scurt. Utilizați minim 6 de simboluri.',
+ 'Invalid username or password' => 'Numele de utilizator sau parola este greșită',
+ 'Invalid username or code' => 'Numele de utilizator sau codul este greșit',
+ 'Passwords not match' => 'Parolele nu corespund',
+ 'Please enter valid email address.' => 'Introduceți o adresă de e-mail validă.',
+ 'Field "%s" can not be blank.' => 'Câmpul "%s" nu poate fi gol.',
+ 'Password is too short.' => 'Parola este prea scurtă. Utilizați minimum 6 caractere.',
'Error code:' => 'Cod de eroare: %s',
'SERVICE_ACTION_FAILED' => '"%s" "%s" failed',
- 'IP address is in use' => 'IP adresa este utilizat',
- 'BACKUP_SCHEDULED' => 'Sarcina a fost adăugata la coadă. Veți primi o notificare la e-mail atunci cand backupul va fi complet.',
- 'BACKUP_EXISTS' => 'Backup este în progres, vă rugăm să așteptați.',
- 'RESTORE_SCHEDULED' => 'Sarcina a fost adăugata la coadă. Veți primi o notificare la e-mail atunci cand backupul va fi restaurat.',
- 'RESTORE_EXISTS' => 'Restabilirea este în progres, vă rugăm să așteptați.',
+ 'IP address is in use' => 'Adresa IP este utilizată',
+ 'BACKUP_SCHEDULED' => 'Sarcina a fost adăugată la coadă. Vei primi o notificare prin e-mail atunci când backup-ul va fi gata pentru descărcare.',
+ 'BACKUP_EXISTS' => 'Un backup este în progres. Te rog să aștepți finalizarea acestuia.',
+ 'RESTORE_SCHEDULED' => 'Sarcina a fost adăugată la coadă. Vei primi o notificare prin e-mail atunci cand restaurarea va fi gata.',
+ 'RESTORE_EXISTS' => 'O restaurare este în progres. Te rog să aștepți finalizarea acesteia.',
- 'WEB_EXCLUSIONS' => "Adauga domeniu câte unul pe linie. Pentru a exclude toate domeniile bagă *. Format pentru a exclude directoare specifice: domain.com:public_html/cache:public_html/tmp",
- 'DNS_EXCLUSIONS' => "Adauga domeniu câte unul pe linie. Pentru a exclude toate domeniile bagă *",
- 'MAIL_EXCLUSIONS' => "Adauga domeniu câte unul pe linie. Pentru a exclude toate domeniile bagă *. Format pentru a exclude conturile specifice: domain.com:info:support:postmaster",
- 'DB_EXCLUSIONS' => "Adauga câte o baza pe linie. Pentru a exclude toate baze bagă *",
- 'CRON_EXCLUSIONS' => "Pentru a exclude toate sarcinile bagă *",
- 'USER_EXCLUSIONS' => "Adauga câte o directoria pe linie. Pentru a exclude toate bagă *",
+ 'WEB_EXCLUSIONS' => "Adaugă un domeniu pe linie. Pentru a exclude toate domeniile folosește *. Pentru a exclude dosare specifice completează în formatul: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Adaugă un domeniu pe linie. Pentru a exclude toate domeniile folosește *.",
+ 'MAIL_EXCLUSIONS' => "Adaugă un domeniu pe linie. Pentru a exclude toate domeniile folosește *. Pentru a exclude conturile specifice completează în formatul: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Adaugă o bază de date pe linie. Pentru a exclude toate bazele de date folosește *.",
+ 'CRON_EXCLUSIONS' => "Pentru a exclude toate sarcinile folosește *.",
+ 'USER_EXCLUSIONS' => "Adaugă un dosar pe linie. Pentru a exclude toate dosarele folosește *.",
- 'Welcome to Vesta Control Panel' => 'Bine ați venit la panoul de control Vesta',
+ 'Welcome to Vesta Control Panel' => 'Bine ai venit la panoul de control Vesta',
'MAIL_FROM' => 'Vesta Control Panel ',
'GREETINGS_GORDON_FREEMAN' => "Salut, %s %s,\n",
'GREETINGS' => "Salut,\n",
- 'ACCOUNT_READY' => "Contul dvs.este gata.\n\nhttps://%s/login/\nUtilizator: %s\nParolă: %s\n\n--\nPanoul de control Vesta\n",
+ 'ACCOUNT_READY' => "Contul tău a fost creat și este gata pentru utilizare.\n\nhttps://%s/login/\nUtilizator: %s\nParolă: %s\n\n--\nPanoul de control Vesta\n",
'FTP login credentials' => 'Datele de autentificare FTP',
- 'FTP_ACCOUNT_READY' => "Contul FTP dvs. este gata.\n\nHost: %s\nUtilizator: %s_%s\nParolă: %s\n\n--\nPanoul de control Vesta\n",
+ 'FTP_ACCOUNT_READY' => "Contul FTP a fost creat și este gata pentru utilizare.\n\nHost: %s\nUtilizator: %s_%s\nParolă: %s\n\n--\nPanoul de control Vesta\n",
- 'Database Credentials' => 'Datele de autentificare bazei de date',
- 'DATABASE_READY' => "Baza de date dvs. este gata.\n\nBD: %s\nUtilizator: %s\nParolă: %s\n%s\n\n--\nPanoul de control Vesta\n",
+ 'Database Credentials' => 'Datele de autentificare BD',
+ 'DATABASE_READY' => "Baza de date a fost creată și este gata pentru utilizare.\n\nBD: %s\nUtilizator: %s\nParolă: %s\n%s\n\n--\nPanoul de control Vesta\n",
- 'forgot password' => 'uitat parola',
- 'Confirm' => 'Confirma',
+ 'forgot password' => 'am uitat parola',
+ 'Confirm' => 'Confirmare',
'New Password' => 'Noua parolă',
- 'Confirm Password' => 'Repetarea parolei',
- 'Reset' => 'Reseta',
+ 'Confirm Password' => 'Repetare parolă',
+ 'Reset' => 'Resetare',
'Reset Code' => 'Cod de resetare',
'RESET_NOTICE' => '',
- 'RESET_CODE_SENT' => 'Cod de resetare a fost trimis la email dvs.. ',
- 'MAIL_RESET_SUBJECT' => 'Schimbarea parolei %s',
- 'PASSWORD_RESET_REQUEST'=>"Pentru a shimba parolei, vă rugăm faceți clic aici:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n\n\nDacă nu ați solicitat o procedură de resetarea parolei, vă rugăm să ignorați această scrisoare.\n\n--\nPanoul de control Vesta\n",
+ 'RESET_CODE_SENT' => 'Codul de resetare a fost trimis la adresa ta de e-mail. ',
+ 'MAIL_RESET_SUBJECT' => 'Schimbare parola %s',
+ 'PASSWORD_RESET_REQUEST'=>"Pentru schimbarea parolei, te rog să urmezi link-ul:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n\n\nDacă nu ai solicitat resetarea parolei, ignoră acest mesaj.\n\n--\nPanoul de control Vesta\n",
- 'Jan' => 'Jan',
+ 'Jan' => 'Ian',
'Feb' => 'Feb',
'Mar' => 'Mar',
'Apr' => 'Apr',
- 'May' => 'May',
- 'Jun' => 'Jun',
- 'Jul' => 'Jul',
+ 'May' => 'Mai',
+ 'Jun' => 'Iun',
+ 'Jul' => 'Iul',
'Aug' => 'Aug',
'Sep' => 'Sep',
'Oct' => 'Oct',
- 'Nov' => 'Nov',
+ 'Nov' => 'Noi',
'Dec' => 'Dec',
- 'Configuring Server' => 'Configuring Server',
- 'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
- 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
- 'Reseller Role' => 'Reseller Role',
- 'Web Config Editor' => 'Web Config Editor',
- 'Template Manager' => 'Template Manager',
- 'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
+ 'Configuring Server' => 'Configurare Server',
+ 'Hostname' => 'Nume Host',
+ 'Time Zone' => 'Fus Orar',
+ 'Default Language' => 'Limba Implicită',
+ 'FileSystem Disk Quota' => 'Cota Spațiu (Disk Quota)',
+ 'Vesta Control Panel Plugins' => 'VESTA',
+ 'preview' => 'previzualizare',
+ 'Reseller Role' => 'Rol de Revânzător',
+ 'Web Config Editor' => 'Editor Configurare Web',
+ 'Template Manager' => 'Manager Șabloane',
+ 'Backup Migration Manager' => 'Manager Migrare Backup',
+ 'FileManager' => 'Manager Fișiere',
+ 'show: CPU / MEM / NET / DISK' => 'afișare: CPU / MEM / NET / DISK',
+ 'sort by' => 'sortare după',
+ 'Date' => 'Data',
+ 'Starred' => 'Stea',
+ 'Name' => 'Nume',
+
+ 'File Manager' => 'Manager Fișiere',
+ 'type' => 'tip',
+ 'size' => 'marime',
+ 'date' => 'dată',
+ 'name' => 'nume',
+ 'Initializing' => 'Inițializare',
+ 'UPLOAD' => 'ÎNCARCĂ',
+ 'NEW FILE' => 'FIȘIER NOU',
+ 'NEW DIR' => 'DOSAR NOU',
+ 'DELETE' => 'ȘTERGE',
+ 'RENAME' => 'REDENUMEȘTE',
+ 'COPY' => 'COPIAZĂ',
+ 'ARCHIVE' => 'ARHIVEAZĂ',
+ 'EXTRACT' => 'EXTRAGE',
+ 'DOWNLOAD' => 'DESCARCĂ',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php
index 82c4341ef..4e26d8e46 100644
--- a/web/inc/i18n/ru.php
+++ b/web/inc/i18n/ru.php
@@ -182,7 +182,7 @@ $LANG['ru'] = array(
'Additional FTP Account' => 'Дополнительный ftp',
'SOA' => 'SOA',
'TTL' => 'TTL',
- 'Expire' => 'Регистрация до',
+ 'Expire' => 'Истекает',
'Records' => 'DNS записи',
'Catchall email' => 'Ловушка почты',
'AntiVirus Support' => 'Антивирус',
@@ -349,6 +349,7 @@ $LANG['ru'] = array(
'Banlist' => 'Черный список',
'ranges are acceptable' => 'можно использовать диапазоны',
'CIDR format is supported' => 'поддерживается формат CIDR',
+ 'Add one more Name Server' => 'Добавить ещё один Сервер Имён',
'unlimited' => 'неограничено',
'1 account' => ' пользователей на странице: 1',
@@ -423,6 +424,7 @@ $LANG['ru'] = array(
'DELETE_RULE_CONFIRMATION' => 'Вы уверены, что хотите удалить правило №%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Вы уверены, что хотите заблокирован правило №%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Вы уверены, что хотите разблокировать правило №%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Вы уверены, что хотите перезагрузить %s?',
'Welcome' => 'Добро пожаловать',
'LOGGED_IN_AS' => 'Вы вошли как пользователь %s',
@@ -496,5 +498,108 @@ $LANG['ru'] = array(
'Template Manager' => 'Менеджер Шаблонов',
'Backup Migration Manager' => 'Менеджер Миграции Бэкапов',
'FileManager' => 'Файл Менеджер',
+ 'show: CPU / MEM / NET / DISK' => 'показатели: ПРОЦЕССОР / ПАМЯТЬ / СЕТЬ / ДИСК',
+
+ 'sort by' => 'сортировка',
+ 'Date' => 'Дата',
+ 'Starred' => 'Избранные',
+ 'Name' => 'Имя',
+
+ 'File Manager' => 'Файлы',
+ 'type' => 'тип',
+ 'size' => 'размер',
+ 'date' => 'дата',
+ 'name' => 'имя',
+ 'Initializing' => 'В процессе',
+ 'UPLOAD' => 'ЗАГРУЗИТЬ',
+ 'NEW FILE' => 'ФАЙЛ',
+ 'NEW DIR' => 'ПАПКА',
+ 'DELETE' => 'УДАЛИТЬ',
+ 'RENAME' => 'ПЕРЕИМЕНОВАТЬ',
+ 'COPY' => 'КОПИЯ',
+ 'ARCHIVE' => 'АРХИВ',
+ 'EXTRACT' => 'РАСПАКОВАТЬ',
+ 'DOWNLOAD' => 'СКАЧАТЬ',
+ 'Hit' => 'Нажмите',
+ 'to reload the page' => 'чтобы перегрузить страницу',
+ 'Directory name cannot be empty' => 'Название директории не может быть пустым',
+ 'File name cannot be empty' => 'Название файла не может быть пустым',
+ 'No file selected' => 'Ничего не выбрано',
+ 'No file or folder selected' => 'Не выбрано ни одного файла или папки',
+ 'File type not supported' => 'Данный тип файла не поддерживается',
+ 'Directory download not available in current version' => 'В этой версии панели загрузка папок ещё не поддерживается',
+ 'Directory not available' => 'Папка недоступна',
+ 'Done' => 'Готово',
+ 'Close' => 'Закрыть',
+ 'Copy' => 'Скопировать',
+ 'Cancel' => 'Отмена',
+ 'Rename' => 'Переименовать',
+ 'Delete' => 'Удалить',
+ 'Extract' => 'Распаковать',
+ 'Create' => 'Создать',
+ 'Compress' => 'Запаковать',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Вы уверены, что хотите скопировать',
+ 'Are you sure you want to delete' => 'Вы уверены, что хотите удалить',
+ 'into' => 'в',
+ 'existing files will be replaced' => 'существующие файлы будут перезаписаны',
+ 'Original name' => 'Оригинальное имя',
+ 'File' => 'Файл',
+ 'already exists' => 'уже существует',
+ 'Create file' => 'Создать файл',
+ 'Create directory' => 'Создать папку',
+
+ 'Add New object' => 'Перейти к Форме Добавления',
+ 'Save Form' => 'Сохрнанить Форму',
+ 'Cancel saving form' => 'Отменить Сохранение',
+ 'Go to USER list' => 'Перейти в USER',
+ 'Go to WEB list' => 'Перейти в WEB',
+ 'Go to DNS list' => 'Перейти в DNS',
+ 'Go to MAIL list' => 'Перейти в MAIL',
+ 'Go to DB list' => 'Перейти в DB',
+ 'Go to CRON list' => 'Перейти в CRON',
+ 'Go to BACKUP list' => 'Перейти в BACKUP',
+ 'Focus on search' => 'Фокус на форме поиска',
+ 'Display/Close shortcuts' => 'Показать/Скрыть список горячих клавиш',
+ 'Move backward through top menu' => 'Фокус на предыдущий пункт меню',
+ 'Move forward through top menu' => 'Фокус на следующий пункт меню',
+ 'Enter focused element' => 'Перейти в активный пункт меню',
+
+ 'Upload' => 'Загрузить файл',
+ 'New File' => 'Создать Файл',
+ 'New Folder' => 'Создать Папку',
+ 'Download' => 'Скачать',
+ 'Rename' => 'Переименовать',
+ 'Copy' => 'Скопировать',
+ 'Archive' => 'Заархивировать',
+ 'Delete' => 'Удалить',
+ 'Save File (in text editor)' => 'Сохранить Файл (в рамках текстового редактора)',
+ 'Close Popup / Cancel' => 'Закрыть Попап / Отмена',
+ 'Move Cursor Up' => 'Переемстить курсор вверх',
+ 'Move Cursor Dow' => 'Переместить курсор вниз',
+ 'Switch to Left Tab' => 'Переключиться на таб слева',
+ 'Switch to Right Tab' => 'Переключиться на таб справа',
+ 'Switch Tab' => 'Переключить активный таб',
+ 'Go to the Top of File List' => 'Перейти к первому файлу',
+ 'Go to the Last File' => 'Перейти к последнему файлу',
+ 'Open File/Enter Directory' => 'Открыть Файл/Папку',
+ 'Go to Parent Directory' => 'Перейти в родительскую директорию',
+ 'Select Current File' => 'Выбрать активный файл',
+ 'Select Bunch of Files' => 'Выбрать блок файлов',
+ 'Append File to the Current Selection' => 'Добавить файл к выбранным',
+ 'Select All Files' => 'Выбрать все файлы',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'горячие клавиши заимствованы из великолепного файл менеджера GNU Midnight Commander ',
+
+ 'Licence Key' => 'Лицензионный Ключ',
+ 'Enter License Key' => 'Внесите Лицензионный Ключ',
+ 'Buy Licence' => 'Купить Лицензионный Ключ',
+ 'Buy Lifetime License' => 'Купить Бесконечный Лицензионный Ключ ',
+ 'Disable and Cancel Licence' => 'Отключить и Закрыть Лицензию',
+ 'Licence Activated' => 'Лицензия Активирована',
+ 'Licence Deactivated' => 'Лицензия Отключена',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'Это коммерческий модуль, чтобы включить его, вам необходимо приобрести лицензию.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/se.php b/web/inc/i18n/se.php
index 12314fab9..70b85165b 100644
--- a/web/inc/i18n/se.php
+++ b/web/inc/i18n/se.php
@@ -345,6 +345,7 @@ $LANG['se'] = array(
'Banlist' => 'Blockeringslista',
'ranges are acceptable' => 'spannet är acceptabelt',
'CIDR format is supported' => 'Stöd finns för CIDR-format',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'unlimited',
'1 account' => '1 konto',
@@ -419,6 +420,7 @@ $LANG['se'] = array(
'DELETE_RULE_CONFIRMATION' => 'Är du säker på att du vill radera regeln #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Är du säker på att du vill avaktivera regeln #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Är du säker på att du vill återaktivera regeln #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => 'Är du säker på att du vill starta om %s?',
'Welcome' => 'Välkommen',
'LOGGED_IN_AS' => 'Inloggad som %s',
@@ -492,5 +494,108 @@ $LANG['se'] = array(
'Template Manager' => 'Template Manager',
'Backup Migration Manager' => 'Backup Migration Manager',
'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'sort by',
+ 'Date' => 'Datum',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
\ No newline at end of file
diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php
index c78bdac2b..51529c21b 100644
--- a/web/inc/i18n/tr.php
+++ b/web/inc/i18n/tr.php
@@ -347,6 +347,7 @@ $LANG['tr'] = array(
'Banlist' => 'Yasaklı Listesi',
'ranges are acceptable' => 'kabul edilebilir aralıklar',
'CIDR format is supported' => 'CIDR formatı destekleniyor',
+ 'Add one more Name Server' => 'Add one more Name Server',
'unlimited' => 'sınırsız',
'1 account' => '1 hesap',
@@ -421,6 +422,7 @@ $LANG['tr'] = array(
'DELETE_RULE_CONFIRMATION' => '#%s kuralını silmek istediğinize emin misiniz?',
'SUSPEND_RULE_CONFIRMATION' => '#%s kuralını askıya almak istediğinize emin misiniz?',
'UNSUSPEND_RULE_CONFIRMATION' => '#%s kuralını devam ettirmek istediğinize emin misiniz?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
'RESTART_CONFIRMATION' => '%s yeniden başlatılacak. Onaylıyor musunuz?',
'Welcome' => 'Hoşgeldiniz',
'LOGGED_IN_AS' => '%s kullanıcısı olarak oturum aç',
@@ -494,5 +496,108 @@ $LANG['tr'] = array(
'Template Manager' => 'Şablon Yöneticisi',
'Backup Migration Manager' => 'Yedek Aktarma Yöneticisi',
'FileManager' => 'DosyaYöneticisi',
+ 'show: CPU / MEM / NET / DISK' => 'göster: CPU / BEL / AĞ / DISK',
+
+ 'sort by' => 'sıralama ölçütü',
+ 'Date' => 'Tarih',
+ 'Starred' => 'Yıldızlı',
+ 'Name' => 'İsim',
+
+ 'File Manager' => 'Dosya Yöneticisi',
+ 'type' => 'tip',
+ 'size' => 'boyut',
+ 'date' => 'tarih',
+ 'name' => 'isim',
+ 'Initializing' => 'Başlatılıyor',
+ 'UPLOAD' => 'YÜKLE',
+ 'NEW FILE' => 'YENİ DOSYA',
+ 'NEW DIR' => 'YENİ KLASÖR',
+ 'DELETE' => 'SİL',
+ 'RENAME' => 'YENİDEN ADLANDIR',
+ 'COPY' => 'KOPYALA',
+ 'ARCHIVE' => 'ARŞİVLE',
+ 'EXTRACT' => 'ÇIKART',
+ 'DOWNLOAD' => 'İNDİR',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'sayfayı yenilemek için',
+ 'Directory name cannot be empty' => 'Dizin adı boş olamaz',
+ 'File name cannot be empty' => 'Dosya adı boş olamaz',
+ 'No file selected' => 'Dosya seçilmedi',
+ 'No file or folder selected' => 'Dosya veya klasör seçilmedi',
+ 'File type not supported' => 'Dosya tipi desteklenmiyor',
+ 'Directory download not available in current version' => 'Dizin indirme şuanki sürümde mevcut değil',
+ 'Directory not available' => 'Dizin geçerli değil',
+ 'Done' => 'Bitti',
+ 'Close' => 'Kapat',
+ 'Copy' => 'Kopyala',
+ 'Cancel' => 'Vazgeç',
+ 'Rename' => 'Yeniden Adlandır',
+ 'Delete' => 'Sil',
+ 'Extract' => 'Çıkart',
+ 'Create' => 'Oluştur',
+ 'Compress' => 'Sıkıştır',
+ 'OK' => 'TAMAM',
+ 'Are you sure you want to copy' => 'Kopyalamak istediğinizden emin misiniz',
+ 'Are you sure you want to delete' => 'Silmek istediğinizden emin misiniz',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'varolan dosyalar değiştirilir',
+ 'Original name' => 'Orijinal adı',
+ 'File' => 'Dosya',
+ 'already exists' => 'zaten var',
+ 'Create file' => 'Dosya oluştur',
+ 'Create directory' => 'Dizin oluştur',
+
+ 'Add New object' => 'Yeni Nesne Ekle',
+ 'Save Form' => 'Formu Kaydet',
+ 'Cancel saving form' => 'Formu kaydetmekten vazgeç',
+ 'Go to USER list' => 'KULLANICI listesine git',
+ 'Go to WEB list' => 'WEB listesine git',
+ 'Go to DNS list' => 'DNS listesine git',
+ 'Go to MAIL list' => 'MAIL listesine git',
+ 'Go to DB list' => 'DB listesine git',
+ 'Go to CRON list' => 'CRON listesine git',
+ 'Go to BACKUP list' => 'YEDEK listesine git',
+ 'Focus on search' => 'Aramaya odaklan',
+ 'Display/Close shortcuts' => 'Kısayolları görüntüle/kapat',
+ 'Move backward through top menu' => 'Üst menüden arasında geriye doğru git',
+ 'Move forward through top menu' => 'Üst menüden arasında ileriye doğru git',
+ 'Enter focused element' => 'Odaklanmış elemanı gir',
+
+ 'Upload' => 'Yükle',
+ 'New File' => 'Yeni Dosya',
+ 'New Folder' => 'Yeni Klasör',
+ 'Download' => 'İndir',
+ 'Rename' => 'Yeniden Adlandır',
+ 'Copy' => 'Kopyala',
+ 'Archive' => 'Arşivle',
+ 'Delete' => 'Sil',
+ 'Save File (in text editor)' => 'Dosyayı Kaydet (metin editöründe)',
+ 'Close Popup / Cancel' => 'Popup Kapat / Vazgeç',
+ 'Move Cursor Up' => 'İmleci Yukarı Hareket Ettir',
+ 'Move Cursor Dow' => 'İmleci Aşağı Hareket Ettir',
+ 'Switch to Left Tab' => 'Sol Sekmeye geçin',
+ 'Switch to Right Tab' => 'Sağ Sekmeye geçin',
+ 'Switch Tab' => 'Sekmeye geç',
+ 'Go to the Top of File List' => 'Dosya Listesinin Tepesine git',
+ 'Go to the Last File' => 'Son Dosyaya git',
+ 'Open File/Enter Directory' => 'Dosya Aç/Dizin Gir',
+ 'Go to Parent Directory' => 'Üst Dizine Git',
+ 'Select Current File' => 'Şuanki Dosyayı Seç',
+ 'Select Bunch of Files' => 'Dosya Demetini Seç',
+ 'Append File to the Current Selection' => 'Şuanki Seçime Dosya Ekle',
+ 'Select All Files' => 'Tüm Dosyaları Seç',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'kısayollar muhteşem dosya yöneticisi Midnight Commander arayüzünden esinlenilmiştir',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
);
diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php
index a0b6a1a8a..879f42368 100644
--- a/web/inc/i18n/tw.php
+++ b/web/inc/i18n/tw.php
@@ -1,11 +1,476 @@
'方案設定',
+ 'IP' => 'IP管理',
+ 'Graphs' => '資源使用圖表',
+ 'Statistics' => '統計資料',
+ 'Log' => '系統紀錄',
+ 'Services' => '服務',
+ 'Firewall' => '防火牆',
+ 'Updates' => '系統更新',
+ 'Log in' => '登入',
+ 'Log out' => '登出',
+ 'USER' => '使用者管理',
+ 'WEB' => '網站管理',
+ 'DNS' => 'DNS管理',
+ 'MAIL' => '信箱管理',
+ 'DB' => '資料庫',
+ 'CRON' => 'CRON',
+ 'BACKUP' => '備份',
+ 'Add User' => '新增使用者',
+ 'Add Domain' => '新增網域',
+ 'Add Web Domain' => '新增網站網域',
+ 'Add DNS Domain' => '新增DNS網域',
+ 'Add DNS Record' => '新增DNS紀錄',
+ 'Add Mail Domain' => '新增信箱網域',
+ 'Add Mail Account' => '新增信箱帳號',
+ 'Add Database' => '新增資料庫',
+ 'Add Cron Job' => '新增Cron Job',
+ 'Create Backup' => '建立備份',
+ 'Configure' => '調整設定',
+ 'Restore All' => '全部回復',
+ 'Add Package' => '新增方案',
+ 'Add IP' => '新增IP',
+ 'Add Rule' => '新增規則',
+ 'Ban IP Address' => '封鎖IP',
+ 'Search' => '搜尋',
+ 'Add one more FTP Account' => '增加一個FTP帳號',
+ 'Overall Statistics' => '整理統計資料',
+ 'Daily' => '每天',
+ 'Weekly' => '每週',
+ 'Monthly' => '每月',
+ 'Yearly' => '每年',
+ 'Add' => '新增',
+ 'Back' => '返回',
+ 'Save' => '儲存',
+ 'Submit' => '送出',
+ 'toggle all' => '批次執行',
+ 'apply to selected' => '套用到所有已選擇的',
+ 'rebuild' => '重建',
+ 'rebuild web' => '重建網站',
+ 'rebuild dns' => '重建DNS',
+ 'rebuild mail' => '重建信箱',
+ 'rebuild db' => '重建資料庫',
+ 'rebuild cron' => '重建 Cron',
+ 'update counters' => '更新計數器',
+ 'suspend' => '封鎖',
+ 'unsuspend' => '解除封鎖',
+ 'delete' => '刪除',
+ 'show per user' => 'show per user',
+ 'login as' => '登入帳號',
+ 'logout' => '登出',
+ 'edit' => '編輯',
+ 'open webstats' => '開啟網站統計資料',
+ 'view logs' => '查看系統紀錄',
+ 'list records' => '列出 %s 紀錄',
+ 'add record' => '新增紀錄',
+ 'list accounts' => '列出 %s 帳號',
+ 'add account' => '新增帳號',
+ 'open webmail' => '開啟網路信箱',
+ 'list fail2ban' => '列出登入失敗遭封鎖名單',
+ 'open %s' => '開啟 %s',
+ 'download' => '下載',
+ 'restore' => '回復',
+ 'configure restore settings' => '調整回復設定',
+ 'stop' => '停止',
+ 'start' => '啟動',
+ 'restart' => '重新啟動',
+ 'update' => '更新',
+ 'generate' => '產生',
+ 'Generate CSR' => '產生 CSR',
+ 'reread IP' => '重新取得IP',
+ 'enable autoupdate' => '啟用自動更新',
+ 'disable autoupdate' => '停用自動更新',
+ 'turn on notifications' => '啟用通知',
+ 'turn off notifications' => '停用通知',
+ 'Adding User' => '新增使用者',
+ 'Editing User' => '編輯使用者',
+ 'Adding Domain' => '新增網域',
+ 'Editing Domain' => '編輯網域',
+ 'Adding DNS Domain' => '新增DNS網域',
+ 'Editing DNS Domain' => '編輯DNS網域',
+ 'Adding DNS Record' => '新增DNS紀錄',
+ 'Editing DNS Record' => '編輯DNS紀錄',
+ 'Adding Mail Domain' => '新增信箱網域',
+ 'Editing Mail Domain' => '編輯信箱網域',
+ 'Adding Mail Account' => '新增信箱帳號',
+ 'Editing Mail Account' => '編輯信箱帳號',
+ 'Adding database' => '新增資料庫',
+ 'Editing Cron Job' => '編輯Cron Job',
+ 'Adding Cron Job' => '新增Cron Job',
+ 'Editing Database' => '編輯資料庫',
+ 'Adding Package' => '新增方案',
+ 'Editing Package' => '編輯方案',
+ 'Adding IP address' => '新增IP',
+ 'Editing IP Address' => '編輯IP',
+ 'Editing Backup Exclusions' => '編輯備份排除項目',
+ 'Generating CSR' => '產生CSR檔',
+ 'Listing' => '列出',
+ 'Search Results' => '搜尋結果',
+ 'Adding Firewall Rule' => '新增防火牆規則',
+ 'Editing Firewall Rule' => '編輯防火牆規則',
+ 'Adding IP Address to Banlist' => '新增IP至黑名單',
+ 'active' => '正常',
+ 'spnd' => '封鎖',
+ 'suspended' => '已封鎖',
+ 'running' => '執行中',
+ 'stopped' => '已停止',
+ 'outdated' => '有新版本可升級',
+ 'updated' => '已是最新版本',
+ 'yes' => '是',
+ 'no' => '否',
+ 'none' => '無',
+ 'pb' => 'PB',
+ 'tb' => 'TB',
+ 'gb' => 'GB',
+ 'mb' => 'MB',
+ 'minute' => '分鐘',
+ 'hour' => '小時',
+ 'day' => '天',
+ 'days' => '天',
+ 'hours' => '小時',
+ 'minutes' => '分鐘',
+ 'month' => '月',
+ 'package' => '方案',
+ 'Bandwidth' => '流量',
+ 'Disk' => '磁碟空間',
+ 'Web' => '網站',
+ 'Mail' => '信箱',
+ 'Databases' => '資料庫',
+ 'User Directories' => '使用者目錄',
+ 'Template' => '模板',
+ 'Web Template' => 'Apache模板',
+ 'Proxy Template' => 'Nginx模板',
+ 'DNS Template' => 'DNS模板',
+ 'Web Domains' => '網站網域',
+ 'SSL Domains' => 'SSL網域',
+ 'Web Aliases' => '網站次網域',
+ 'per domain' => '(每網域)',
+ 'DNS Domains' => 'DNS網域',
+ 'DNS Domains' => 'DNS網域',
+ 'DNS records' => 'DNS紀錄' ,
+ 'Name Servers' => 'NS主機',
+ 'Mail Domains' => '信箱網域',
+ 'Mail Accounts' => '信箱使用者',
+ 'Cron Jobs' => 'Cron Jobs',
+ 'SSH Access' => 'SSH權限',
+ 'IP Addresses' => 'IP位置',
+ 'Backups' => '備份',
+ 'Backup System' => '備份系統',
+ 'backup exclusions' => '備份例外',
+ 'template' => '模板',
+ 'SSL Support' => 'SSL支援',
+ 'SSL Home Directory' => 'SSL主目錄',
+ 'Proxy Support' => 'Nginx支援',
+ 'Proxy Extensions' => 'Nginx擴充',
+ 'Web Statistics' => '網站統計',
+ 'Additional FTP Account' => '其他FTP帳號',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => '過期',
+ 'Records' => '紀錄',
+ 'Catchall email' => '收到所有郵件',
+ 'AntiVirus Support' => '防毒支援',
+ 'AntiSpam Support' => '防垃圾郵件支援',
+ 'DKIM Support' => 'DKIM支援',
+ 'Accounts' => '帳號',
+ 'Quota' => '配額',
+ 'Autoreply' => '自動回覆',
+ 'Forward to' => '轉寄到',
+ 'Do not store forwarded mail' => '不保留已轉發的郵件',
+ 'database' => '資料庫',
+ 'User' => '使用者',
+ 'Host' => '主機',
+ 'Charset' => '編碼',
+ 'Min' => '分鐘',
+ 'Hour' => '小時',
+ 'Day' => '天',
+ 'Month' => '月',
+ 'Day of week' => '星期幾',
+ 'local' => '本地',
+ 'Run Time' => '運作時間',
+ 'Backup Size' => '備份大小',
+ 'SYS' => 'SYS',
+ 'Domains' => '網域',
+ 'Status' => '狀態',
+ 'shared' => '共享',
+ 'dedicated' => '獨立',
+ 'Owner' => '擁有者',
+ 'Users' => '使用者',
+ 'Load Average' => '平均負載量',
+ 'Memory Usage' => '記憶體使用量',
+ 'HTTPD Usage' => 'Apache使用量',
+ 'NGINX Usage' => 'NGINX使用量',
+ 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)',
+ 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)',
+ 'Bandwidth Usage eth0' => '網路流量 (eth0)',
+ 'FTP Usage' => 'FTP使用量',
+ 'SSH Usage' => 'SSH使用量',
+ 'reverse proxy' => '反向Proxy',
+ 'web server' => '網站主機',
+ 'dns server' => 'DNS主機',
+ 'mail server' => '信箱主機',
+ 'pop/imap server' => 'POP/IMAP主機',
+ 'email antivirus' => '信箱防毒',
+ 'email antispam' => '信箱防垃圾信',
+ 'database server' => '資料庫主機',
+ 'ftp server' => 'FTP主機',
+ 'job scheduler' => '定時執行指令',
+ 'CPU' => 'CPU',
+ 'Memory' => '記憶體',
+ 'Uptime' => '已啟動時間',
+ 'core package' => '核心系統',
+ 'php interpreter' => 'PHP讀取',
+ 'internal web server' => '網路網站主機',
+ 'Version' => '版本',
+ 'Release' => '發佈號碼',
+ 'Architecture' => 'Architecture',
+ 'Object' => 'Object',
+ 'Owner' => '擁有者',
+ 'Username' => '使用者名稱',
+ 'Password' => '密碼',
+ 'Email' => '電子信箱',
+ 'Package' => '方案',
+ 'Language' => '語言',
+ 'First Name' => '名字',
+ 'Last Name' => '姓氏',
+ 'Send login credentials to email address' => '傳送登入資訊至使用者的信箱',
+ 'Default Template' => '預設模板',
+ 'Default Name Servers' => '預設NS主機',
+ 'Domain' => '網域',
+ 'DNS Support' => 'DNS支援',
+ 'Mail Support' => '信箱支援',
+ 'Advanced options' => '進階選項',
+ 'Aliases' => '次網域',
+ 'SSL Certificate' => 'SSL證書',
+ 'SSL Key' => 'SSL密鑰',
+ 'SSL Certificate Authority / Intermediate' => 'SSL認證機構/中級',
+ 'SSL CSR' => 'SSL CSR',
+ 'optional' => '選用',
+ 'internal' => '內部',
+ 'Statistics Authorization' => '統計授權',
+ 'Statistics Auth' => '統計驗證',
+ 'Account' => '帳號',
+ 'Prefix will be automaticaly added to username' => '前綴 %s 將會自動加到使用者名稱',
+ 'Send FTP credentials to email' => '將FTP登入資料傳送到使用者信箱',
+ 'Expiration Date' => '到期日期',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
+ 'Name servers' => 'NS伺服器',
+ 'Record' => '紀錄',
+ 'IP or Value' => 'IP或值',
+ 'Priority' => '優先順序',
+ 'Record Number' => '記錄編號',
+ 'in megabytes' => '以MB為單位',
+ 'Message' => '訊息',
+ 'use local-part' => '使用本地部分',
+ 'one or more email addresses' => '一個或更多郵件地址',
+ 'Prefix will be automaticaly added to database name and database user' => '前綴 %s 將會自動加入資料庫名稱及使用者名稱',
+ 'Database' => '資料庫',
+ 'Type' => '類型',
+ 'Minute' => '分鐘',
+ 'Command' => '指令',
+ 'Package Name' => '方案名稱',
+ 'Netmask' => '子網路遮罩',
+ 'Interface' => '端口',
+ 'Shared' => '共享',
+ 'Assigned user' => '指定使用者',
+ 'Assigned domain' => '指定網址',
+ 'NAT IP association' => 'NAT IP連結',
+ 'shell' => 'shell',
+ 'web domains' => '網站網域',
+ 'web aliases' => '網站次網域',
+ 'dns records' => 'DNS記錄',
+ 'mail domains' => '信箱網域',
+ 'mail accounts' => '信箱帳號',
+ 'accounts' => '帳號',
+ 'databases' => '資料庫',
+ 'cron jobs' => 'Cron Jobs',
+ 'backups' => '備份',
+ 'quota' => '配額',
+ 'day of week' => '星期幾',
+ 'cmd' => '指令',
+ 'users' => '使用者',
+ 'domains' => '網域',
+ 'aliases' => '次網域',
+ 'records' => '記錄',
+ 'jobs' => 'Jobs',
+ 'username' => '使用者名稱',
+ 'password' => '密碼',
+ 'type' => '類型',
+ 'charset' => '編碼',
+ 'domain' => '網域',
+ 'ip' => 'IP',
+ 'ip address' => 'IP位置',
+ 'IP address' => 'IP位置',
+ 'netmask' => '子網路遮罩',
+ 'interface' => '端口',
+ 'assigned user' => '指定使用者',
+ 'ns1' => 'ns1',
+ 'ns2' => 'ns2',
+ 'user' => '使用者',
+ 'email' => '信箱',
+ 'first name' => '名字',
+ 'last name' => '姓氏',
+ 'account' => '帳號',
+ 'ssl certificate' => 'SSL 證書',
+ 'ssl key' => 'SSL密鑰',
+ 'stats user password' => '統計使用者帳號密碼',
+ 'stats username' => '統計使用者名稱',
+ 'stats password' => '統計密碼',
+ 'ftp user password' => 'FTP使用者帳號密碼',
+ 'ftp user' => 'FTP使用者',
+ 'Last 70 lines of %s.%s.log' => '最後70行的 %s.%s.記錄',
+ 'Download AccessLog' => '下載存取記錄',
+ 'Download ErrorLog' => '下載錯誤記錄',
+ 'Country' => '國家',
+ '2 letter code' => '國家簡碼(台灣是TW/香港是HK)',
+ 'State / Province' => '州 / 省',
+ 'City / Locality' => '市 / 地區',
+ 'Organization' => '組織名稱',
+ 'Action' => '動作',
+ 'Protocol' => 'Protocol',
+ 'Port' => 'Port',
+ 'Comment' => '備註',
+ 'Banlist' => '黑名單',
+ 'ranges are acceptable' => '可使用範圍(例如:21-22)',
+ 'CIDR format is supported' => '支援CIDR格式',
+ 'Add one more Name Server' => 'Add one more Name Server',
+
+ '1 account' => '1 帳號',
+ '%s accounts' => '%s 帳號',
+ '1 domain' => '1 網域',
+ '%s domains' => '%s 網域',
+ '1 record' => '1 記錄',
+ '%s records' => '%s 記錄',
+ '1 mail account' => '1 信箱帳號',
+ '%s mail accounts' => '%s 信箱帳號',
+ '1 database' => '1 資料庫',
+ '%s databases' => '%s 資料庫',
+ '1 cron job' => '1 Cron Job',
+ '%s cron jobs' => '%s Cron Jobs',
+ '1 archive' => '1 archive',
+ '%s archives' => '%s archives',
+ '1 package' => '1 方案',
+ '%s packages' => '%s 方案',
+ '1 IP address' => '1 IP位置',
+ '%s IP addresses' => '%s IP位置',
+ '1 month' => '1 月',
+ '%s months' => '%s 月',
+ '1 log record' => '1 系統記錄',
+ '%s log records' => '%s 系統記錄',
+ '1 object' => '1 object',
+ '%s objects' => '%s objects',
+ 'no exclusions' => '取消排除',
+ '1 rule' => '1 規則',
+ '%s rules' => '%s 規則',
+ 'There are no currently banned IP' => '目前沒有任何已封鎖的IP',
+ 'USER_CREATED_OK' => '使用者 %s has been 已加入成功!',
+ 'WEB_DOMAIN_CREATED_OK' => '網域 %s 已加入成功!',
+ 'DNS_DOMAIN_CREATED_OK' => 'DNS網域 %s 已加入成功!',
+ 'DNS_RECORD_CREATED_OK' => '記錄 %s.%s 已加入成功!',
+ 'MAIL_DOMAIN_CREATED_OK' => '信箱網域 %s 已加入成功!',
+ 'MAIL_ACCOUNT_CREATED_OK' => '信箱帳號 %s@%s 已加入成功!',
+ 'DATABASE_CREATED_OK' => '資料庫 %s 已加入成功!',
+ 'CRON_CREATED_OK' => 'Cron Job 已加入成功!',
+ 'IP_CREATED_OK' => 'IP位置 %s 已加入成功!',
+ 'PACKAGE_CREATED_OK' => '方案 %s 已加入成功!',
+ 'SSL_GENERATED_OK' => 'SSL證書 已加入成功!',
+ 'RULE_CREATED_OK' => 'Rule 已加入成功!',
+ 'Autoupdate has been successfully enabled' => '自動更新已成功啟動',
+ 'Autoupdate has been successfully disabled' => '自動更新已成功關閉',
+ 'Cronjob email reporting has been successfully enabled' => 'Cron Job 電子郵件回報已成功啟動',
+ 'Cronjob email reporting has been successfully disabled' => 'Cron Job 電子郵件回報已成功關閉',
+ 'Changes has been saved.' => '已儲存更改',
+ 'Confirmation' => 'Confirmation',
+ 'DELETE_USER_CONFIRMATION' => '確定要刪除使用者 %s 嗎?',
+ 'SUSPEND_USER_CONFIRMATION' => '確定要封鎖使用者 %s 嗎?',
+ 'UNSUSPEND_USER_CONFIRMATION' => '確定要解除封鎖使用者 %s 嗎?',
+ 'DELETE_DOMAIN_CONFIRMATION' => '確定要刪除網域 %s 嗎?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => '確定要封鎖網域 %s 嗎?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => '確定要解除封鎖網域 %s 嗎?',
+ 'DELETE_RECORD_CONFIRMATION' => '確定要刪除記錄 %s 嗎?',
+ 'SUSPEND_RECORD_CONFIRMATION' => '確定要封鎖記錄 %s 嗎?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => '確定要解除封鎖紀錄 %s 嗎?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '確定要刪除 %s 嗎?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '確定要封鎖 %s 嗎?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '確定要解除封鎖 %s 嗎?',
+ 'DELETE_DATABASE_CONFIRMATION' => '確定要刪除資料庫 %s 嗎?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => '確定要封鎖資料庫 %s 嗎?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => '確定要解除封鎖資料庫 %s 嗎?',
+ 'DELETE_CRON_CONFIRMATION' => '確定要刪除 Cron Job嗎?',
+ 'SUSPEND_CRON_CONFIRMATION' => '確定要封鎖 Cron Job嗎?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => '確定要解除封鎖 Cron Job嗎?',
+ 'DELETE_BACKUP_CONFIRMATION' => '確定要刪除 %s 備份嗎?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => '確定要刪除 %s 例外嗎?',
+ 'DELETE_PACKAGE_CONFIRMATION' => '確定要方案 %s 嗎?',
+ 'DELETE_IP_CONFIRMATION' => '確定要刪除IP地址 %s 嗎?',
+ 'DELETE_RULE_CONFIRMATION' => '確定要刪除規則 #%s 嗎?',
+ 'SUSPEND_RULE_CONFIRMATION' => '確定要封鎖規則 #%s 嗎?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => '確定要解除封鎖規則 #%s 嗎?',
+ 'RESTART_CONFIRMATION' => '確定要重新啟動 %s 嗎?',
+ 'Welcome' => '歡迎',
+ 'LOGGED_IN_AS' => '以使用者身份 %s 登入',
+ 'Error' => '錯誤',
+ 'Invalid username or password' => '無效的使用者名稱或密碼',
+ 'Invalid username or code' => '無效的使用者名稱或驗證碼.',
+ 'Passwords not match' => '密碼錯誤',
+ 'Please enter valid email address.' => '請輸入正確的信箱',
+ 'Field "%s" can not be blank.' => '"%s" 不能為空白',
+ 'Password is too short.' => '密碼太短 (是少要6個數字+字母)',
+ 'Error code:' => '錯誤代碼: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" 失敗',
+ 'IP address is in use' => 'IP位置為使用中',
+ 'BACKUP_SCHEDULED' => '您的要求已加入隊列中,備份完成後會再以電子郵件通知您',
+ 'BACKUP_EXISTS' => '已經有一個備份正在執行中,請等待備份完成後在操作',
+ 'RESTORE_SCHEDULED' => '您的要求已加入隊列中,回復完成後會再以電子郵件通知您',
+ 'RESTORE_EXISTS' => '已經有一個回復正在執行中,請等待備份完成後在操作',
+ 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *",
+ 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *",
+ 'CRON_EXCLUSIONS' => "To exclude all jobs use *",
+ 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *",
+ 'Welcome to Vesta Control Panel' => '歡迎來到 Vesta 管理系統',
+ 'MAIL_FROM' => 'Vesta 管理系統 ',
+ 'GREETINGS_GORDON_FREEMAN' => "您好, %s %s,\n",
+ 'GREETINGS' => "您好,\n",
+ 'ACCOUNT_READY' => "您的帳號已成功建立,並可以開始使用了!\n\nhttps://%s/login/\n使用者名稱: %s\n密碼: %s\n\n--\nVesta Control Panel\n",
+ 'FTP login credentials' => 'FTP 登入資料',
+ 'FTP_ACCOUNT_READY' => "FTP帳號已成功建立,並可以開始使用了!\n\n主機名稱: %s\n使用者名稱: %s_%s\n密碼: %s\n\n--\nVesta Control Panel\n",
+ 'Database Credentials' => "Database 登入資料",
+ 'DATABASE_READY' => "資料庫已加入成功!\n\n資料庫名稱: %s\n使用者名稱: %s\n密碼: %s\n%s\n\n--\nVesta Control Panel\n",
+ 'forgot password' => '忘記密碼',
+ 'Confirm' => '確認',
+ 'New Password' => '新密碼',
+ 'Confirm Password' => '確認密碼',
+ 'Reset' => '重設',
+ 'Reset Code' => '重設代碼',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => '密買重設代碼已發送到您的信箱 ',
+ 'MAIL_RESET_SUBJECT' => '密碼重置在 %s',
+ 'PASSWORD_RESET_REQUEST' => '重置密碼請點擊連結:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 輸入密碼重設代碼:\n%s\n\n如果您沒有要求重設密碼,請忽略此郵件\n\n—\nVesta Control Panel\n',
+);
+
+/**
+ * Vesta language file
+ * 吳汝剛 (ak6783@gmail.com)
+>>>>>>> serghey-rodin/master
*/
$LANG['tw'] = array(
'Packages' => '方案設定',
@@ -355,6 +820,7 @@ $LANG['tw'] = array(
'City / Locality' => '市 / 地區',
'Organization' => '組織名稱',
'Action' => '動作',
+<<<<<<< HEAD
'Protocol' => '協議',
'Port' => '端口',
'Comment' => '備註',
@@ -362,6 +828,15 @@ $LANG['tw'] = array(
'ranges are acceptable' => '可使用範圍(例如:21-22)',
'CIDR format is supported' => '支援CIDR格式',
'Add one more Name Server' => '新增域名服務器',
+=======
+ 'Protocol' => '通訊協定',
+ 'Port' => '連接埠',
+ 'Comment' => '註解',
+ 'Banlist' => '封鎖清單',
+ 'ranges are acceptable' => '可使用範圍',
+ 'CIDR format is supported' => 'CIDR 格式是支援的',
+ 'Add one more Name Server' => 'Add one more Name Server',
+>>>>>>> serghey-rodin/master
'1 account' => '1 帳號',
'%s accounts' => '%s 帳號',
@@ -390,6 +865,7 @@ $LANG['tw'] = array(
'no exclusions' => '取消排除',
'1 rule' => '1 規則',
'%s rules' => '%s 規則',
+<<<<<<< HEAD
'There are no currently banned IP' => '目前沒有任何已封鎖的IP',
'USER_CREATED_OK' => '使用者 %s has been 已加入成功!',
'WEB_DOMAIN_CREATED_OK' => '網域 %s 已加入成功!',
@@ -435,6 +911,55 @@ $LANG['tw'] = array(
'SUSPEND_RULE_CONFIRMATION' => '確定要封鎖規則 #%s 嗎?',
'UNSUSPEND_RULE_CONFIRMATION' => '確定要解除封鎖規則 #%s 嗎?',
'RESTART_CONFIRMATION' => '確定要重新啟動 %s 嗎?',
+=======
+ 'There are no currently banned IP' => '現在沒有被封鎖的 IP',
+
+ 'USER_CREATED_OK' => '使用者 %s 已經建立成功。',
+ 'WEB_DOMAIN_CREATED_OK' => '網域 %s 已經建立成功。',
+ 'DNS_DOMAIN_CREATED_OK' => 'DNS 網域 %s 已經建立成功。',
+ 'DNS_RECORD_CREATED_OK' => '紀錄 %s.%s 已經建立成功。',
+ 'MAIL_DOMAIN_CREATED_OK' => '電子郵件網域 %s 已經建立成功。',
+ 'MAIL_ACCOUNT_CREATED_OK' => '電子郵件帳號 %s@%s 已經建立成功。',
+ 'DATABASE_CREATED_OK' => '資料庫 %s 已經建立成功。',
+ 'CRON_CREATED_OK' => '排程工作已經建立成功。',
+ 'IP_CREATED_OK' => 'IP 位址 %s 已經建立成功。',
+ 'PACKAGE_CREATED_OK' => '套件 %s 已經建立成功。',
+ 'SSL_GENERATED_OK' => '憑證已經產生成功。',
+ 'RULE_CREATED_OK' => '規則已經建立成功。',
+ 'Autoupdate has been successfully enabled' => '自動更新已經成功啟用了。',
+ 'Autoupdate has been successfully disabled' => '自動更新已經成功停用了。',
+ 'Cronjob email reporting has been successfully enabled' => '排程工作的電子郵件回報已經成功啟用了',
+ 'Cronjob email reporting has been successfully disabled' => '排程工作的電子郵件回報已經成功停用了',
+ 'Changes has been saved.' => '變更已經儲存。',
+ 'Confirmation' => '確認',
+ 'DELETE_USER_CONFIRMATION' => '您確定要刪除使用者 %s 嗎?',
+ 'SUSPEND_USER_CONFIRMATION' => '您確定要暫停使用者 %s 嗎?',
+ 'UNSUSPEND_USER_CONFIRMATION' => '您確定要取消暫停使用者 %s 嗎?',
+ 'DELETE_DOMAIN_CONFIRMATION' => '您確定要刪除網域 %s 嗎?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => '您確定要暫停網域 %s 嗎?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => '您確定要取消暫停網域 %s 嗎?',
+ 'DELETE_RECORD_CONFIRMATION' => '您確定要刪除紀錄 %s 嗎?',
+ 'SUSPEND_RECORD_CONFIRMATION' => '您確定要暫停紀錄 %s 嗎?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => '您確定要取消暫停紀錄 %s 嗎?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '您確定要刪除 %s 嗎?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '您確定要暫停 %s 嗎?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '您確定要取消暫停 %s 嗎?',
+ 'DELETE_DATABASE_CONFIRMATION' => '您確定要刪除資料庫 %s 嗎?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => '您確定要暫停資料庫 %s 嗎?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => '您確定要取消暫停資料庫 %s 嗎?',
+ 'DELETE_CRON_CONFIRMATION' => '您確定要刪除排程工作嗎?',
+ 'SUSPEND_CRON_CONFIRMATION' => '您確定要暫停排程工作嗎?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => '您確定要取消暫停排程工作嗎?',
+ 'DELETE_BACKUP_CONFIRMATION' => '您確定要刪除 %s 備份嗎?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => '您確定要刪除 %s 例外清單嗎?',
+ 'DELETE_PACKAGE_CONFIRMATION' => '您確定要刪除套件 %s 嗎?',
+ 'DELETE_IP_CONFIRMATION' => '您確定要刪除 IP 位址 %s 嗎?',
+ 'DELETE_RULE_CONFIRMATION' => '您確定要刪除規則 #%s 嗎?',
+ 'SUSPEND_RULE_CONFIRMATION' => '您確定要暫停規則 #%s 嗎?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => '您確定要取消暫停規則 #%s 嗎?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?',
+ 'RESTART_CONFIRMATION' => '您確定您要重新啟動 %s 嗎?',
+>>>>>>> serghey-rodin/master
'Welcome' => '歡迎',
'LOGGED_IN_AS' => '以使用者身份 %s 登入',
'Error' => '錯誤',
@@ -597,6 +1122,7 @@ $LANG['tw'] = array(
'快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的',
'Save' => '儲存',
+<<<<<<< HEAD
'Licence Key' => '授權金鑰',
'Enter License Key' => '輸入授權金鑰',
'Buy Licence' => '購買授權',
@@ -607,5 +1133,122 @@ $LANG['tw'] = array(
'Restrict users so that they cannot use SSH and access only their home directory.' => '限制使用者只能在SSH中使用他們自己的資料夾',
'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => '瀏覽、複製、編輯、取得你所有的網站資料使用全能的檔案管理器',
'This is a commercial module, you would need to purchace license key to enable it.' => '這是一個付費模組,您需要購買授權金鑰才能啟動它。'
+=======
+ 'Configuring Server' => 'Configuring Server',
+ 'Hostname' => 'Hostname',
+ 'Time Zone' => 'Time Zone',
+ 'Default Language' => 'Default Language',
+ 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
+ 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
+ 'preview' => 'preview',
+ 'Reseller Role' => 'Reseller Role',
+ 'Web Config Editor' => 'Web Config Editor',
+ 'Template Manager' => 'Template Manager',
+ 'Backup Migration Manager' => 'Backup Migration Manager',
+ 'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+>>>>>>> serghey-rodin/master
-);
+ 'sort by' => 'sort by',
+ 'Date' => 'Date',
+ 'Starred' => 'Starred',
+ 'Name' => 'Name',
+
+ 'File Manager' => 'File Manager',
+ 'type' => 'type',
+ 'size' => 'size',
+ 'date' => 'date',
+ 'name' => 'name',
+ 'Initializing' => 'Initializing',
+ 'UPLOAD' => 'UPLOAD',
+ 'NEW FILE' => 'NEW FILE',
+ 'NEW DIR' => 'NEW DIR',
+ 'DELETE' => 'DELETE',
+ 'RENAME' => 'RENAME',
+ 'COPY' => 'COPY',
+ 'ARCHIVE' => 'ARCHIVE',
+ 'EXTRACT' => 'EXTRACT',
+ 'DOWNLOAD' => 'DOWNLOAD',
+ 'Hit' => 'Hit',
+ 'to reload the page' => 'to reload the page',
+ 'Directory name cannot be empty' => 'Directory name cannot be empty',
+ 'File name cannot be empty' => 'File name cannot be empty',
+ 'No file selected' => 'No file selected',
+ 'No file or folder selected' => 'No file or folder selected',
+ 'File type not supported' => 'File type not supported',
+ 'Directory download not available in current version' => 'Directory download not available in current version',
+ 'Directory not available' => 'Directory not available',
+ 'Done' => 'Done',
+ 'Close' => 'Close',
+ 'Copy' => 'Copy',
+ 'Cancel' => 'Cancel',
+ 'Rename' => 'Rename',
+ 'Delete' => 'Delete',
+ 'Extract' => 'Extract',
+ 'Create' => 'Create',
+ 'Compress' => 'Compress',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Are you sure you want to copy',
+ 'Are you sure you want to delete' => 'Are you sure you want to delete',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'existing files will be replaced',
+ 'Original name' => 'Original name',
+ 'File' => 'File',
+ 'already exists' => 'already exists',
+ 'Create file' => 'Create file',
+ 'Create directory' => 'Create directory',
+
+ 'Add New object' => 'Add New object',
+ 'Save Form' => 'Save Form',
+ 'Cancel saving form' => 'Cancel saving form',
+ 'Go to USER list' => 'Go to USER list',
+ 'Go to WEB list' => 'Go to WEB list',
+ 'Go to DNS list' => 'Go to DNS list',
+ 'Go to MAIL list' => 'Go to MAIL list',
+ 'Go to DB list' => 'Go to DB list',
+ 'Go to CRON list' => 'Go to CRON list',
+ 'Go to BACKUP list' => 'Go to BACKUP list',
+ 'Focus on search' => 'Focus on search',
+ 'Display/Close shortcuts' => 'Display/Close shortcuts',
+ 'Move backward through top menu' => 'Move backward through top menu',
+ 'Move forward through top menu' => 'Move forward through top menu',
+ 'Enter focused element' => 'Enter focused element',
+
+ 'Upload' => 'Upload',
+ 'New File' => 'New File',
+ 'New Folder' => 'New Folder',
+ 'Download' => 'Download',
+ 'Rename' => 'Rename',
+ 'Copy' => 'Copy',
+ 'Archive' => 'Archive',
+ 'Delete' => 'Delete',
+ 'Save File (in text editor)' => 'Save File (in text editor)',
+ 'Close Popup / Cancel' => 'Close Popup / Cancel',
+ 'Move Cursor Up' => 'Move Cursor Up',
+ 'Move Cursor Dow' => 'Move Cursor Dow',
+ 'Switch to Left Tab' => 'Switch to Left Tab',
+ 'Switch to Right Tab' => 'Switch to Right Tab',
+ 'Switch Tab' => 'Switch Tab',
+ 'Go to the Top of File List' => 'Go to the Top of File List',
+ 'Go to the Last File' => 'Go to the Last File',
+ 'Open File/Enter Directory' => 'Open File/Enter Directory',
+ 'Go to Parent Directory' => 'Go to Parent Directory',
+ 'Select Current File' => 'Select Current File',
+ 'Select Bunch of Files' => 'Select Bunch of Files',
+ 'Append File to the Current Selection' => 'Append File to the Current Selection',
+ 'Select All Files' => 'Select All Files',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Licence Key',
+ 'Enter License Key' => 'Enter License Key',
+ 'Buy Licence' => 'Buy Licence',
+ 'Buy Lifetime License' => 'Buy Lifetime License',
+ 'Disable and Cancel Licence' => 'Disable and Cancel Licence',
+ 'Licence Activated' => 'Licence Activated',
+ 'Licence Deactivated' => 'Licence Deactivated',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.'
+
+);
\ No newline at end of file
diff --git a/web/inc/i18n/ua.php b/web/inc/i18n/ua.php
index 7b1ee9794..876e9647f 100644
--- a/web/inc/i18n/ua.php
+++ b/web/inc/i18n/ua.php
@@ -320,8 +320,8 @@ $LANG['ua'] = array(
'netmask' => 'маска підмережі',
'interface' => 'інтерфейс',
'assigned user' => 'призначений користувач',
- 'ns1' => 'сервер імен #1',
- 'ns2' => 'сервер імен #2',
+ 'ns1' => 'сервер імен №1',
+ 'ns2' => 'сервер імен №2',
'user' => 'користувач',
'email' => 'пошта',
'first name' => 'Ім\'я',
@@ -349,8 +349,9 @@ $LANG['ua'] = array(
'Banlist' => 'Чорний список',
'ranges are acceptable' => 'дозволені діапазони',
'CIDR format is supported' => 'формат CIDR підтримується',
+ 'Add one more Name Server' => 'Додати ще один сервер імен',
- 'unlimited' => 'unlimited',
+ 'unlimited' => 'безлімітний',
'1 account' => ' 1 акаунт',
'%s accounts' => '%s акаунтів',
'1 domain' => '1 домен',
@@ -423,6 +424,7 @@ $LANG['ua'] = array(
'DELETE_RULE_CONFIRMATION' => 'Ви впевнені, що хочете видалити правило #%s?',
'SUSPEND_RULE_CONFIRMATION' => 'Ви впевнені, що хочете заблокувати правило #%s?',
'UNSUSPEND_RULE_CONFIRMATION' => 'Ви впевнені, що хочете розблокувати правило #%s?',
+ 'LEAVE_PAGE_CONFIRMATION' => 'Покинути сторінку?',
'RESTART_CONFIRMATION' => 'Ви впевнені, що хочете перезапустити %s?',
'Welcome' => 'Ласкаво просимо',
'LOGGED_IN_AS' => 'Ви увійшли як користувач %s',
@@ -484,16 +486,120 @@ $LANG['ua'] = array(
'Nov' => 'Лист',
'Dec' => 'Груд',
- 'Configuring Server' => 'Configuring Server',
- 'Hostname' => 'Hostname',
- 'Time Zone' => 'Time Zone',
- 'Default Language' => 'Default Language',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
- 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
- 'preview' => 'preview',
- 'Reseller Role' => 'Reseller Role',
- 'Web Config Editor' => 'Web Config Editor',
- 'Template Manager' => 'Template Manager',
- 'Backup Migration Manager' => 'Backup Migration Manager',
- 'FileManager' => 'FileManager',
+ 'Configuring Server' => 'Налаштування серверу',
+ 'Hostname' => 'Ім\'я хоста',
+ 'Time Zone' => 'Часовий Пояс',
+ 'Default Language' => 'Мова за замовчуванням',
+ 'FileSystem Disk Quota' => 'Дискова квота файлової системи',
+ 'Vesta Control Panel Plugins' => 'Плагіни Vesta Control Panel',
+ 'preview' => 'прев\'ю',
+ 'Reseller Role' => 'Реселер',
+ 'Web Config Editor' => 'Редактор веб конфігів',
+ 'Template Manager' => 'Менеджер шаблонів',
+ 'Backup Migration Manager' => 'Менеджер міграції бекапів',
+ 'FileManager' => 'Файловий менеджер',
+ 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'сортуваня',
+ 'Date' => 'Дата',
+ 'Starred' => 'Обране',
+ 'Name' => 'Ім\'я',
+
+ 'File Manager' => 'Файловий менеджер',
+ 'type' => 'тип',
+ 'size' => 'розмір',
+ 'date' => 'дата',
+ 'name' => 'ім\'я',
+ 'Initializing' => 'Ініціалізація',
+ 'UPLOAD' => 'ВИВАНТАЖИТИ',
+ 'NEW FILE' => 'НОВИЙ ФАЙЛ',
+ 'NEW DIR' => 'НОВА ТЕКА',
+ 'DELETE' => 'ВИДАЛИТИ',
+ 'RENAME' => 'ПЕРЕЙМЕНУВАТИ',
+ 'COPY' => 'КОПІЮВАТИ',
+ 'ARCHIVE' => 'АРХІВУВАТИ',
+ 'EXTRACT' => 'РОЗПАКУВАТИ',
+ 'DOWNLOAD' => 'ЗАВАНТАЖИТИ',
+ 'Hit' => 'Натиснути',
+ 'to reload the page' => 'щоб перезавантажити сторінку',
+ 'Directory name cannot be empty' => 'Ім\'я теки не може бути порожнім ',
+ 'File name cannot be empty' => 'Ім\'я файлу не може бути порожнім',
+ 'No file selected' => 'Файл не обрано',
+ 'No file or folder selected' => 'Файл чи теку не обрано',
+ 'File type not supported' => 'Тип файлу не підтримується',
+ 'Directory download not available in current version' => 'Завантаження тек не доступне в поточній версії',
+ 'Directory not available' => 'Тека не доступна',
+ 'Done' => 'Виконано',
+ 'Close' => 'Закрити',
+ 'Copy' => 'Копіювати',
+ 'Cancel' => 'Відмінити',
+ 'Rename' => 'Перейменувати',
+ 'Delete' => 'Видалити',
+ 'Extract' => 'Розпакувати',
+ 'Create' => 'Створити',
+ 'Compress' => 'Стиснути',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Ви впевнені, що хочете скопіювати',
+ 'Are you sure you want to delete' => 'Ви впевнені, що хочете видалити',
+ 'into' => 'до',
+ 'existing files will be replaced' => 'існуючі файли будуть перезаписані',
+ 'Original name' => 'Справжнє ім\'я',
+ 'File' => 'Файл',
+ 'already exists' => 'вже існує',
+ 'Create file' => 'Створити файл',
+ 'Create directory' => 'Створити теку',
+
+ 'Add New object' => 'Додати Новий Об\'єкт',
+ 'Save Form' => 'Зберегти форму',
+ 'Cancel saving form' => 'Відмінити збереження форми',
+ 'Go to USER list' => 'Перейти до USER',
+ 'Go to WEB list' => 'Перейти до WEB',
+ 'Go to DNS list' => 'Перейти до DNS',
+ 'Go to MAIL list' => 'Перейти до MAIL',
+ 'Go to DB list' => 'Перейти до DB',
+ 'Go to CRON list' => 'Перейти до CRON',
+ 'Go to BACKUP list' => 'Перейти до BACKUP',
+ 'Focus on search' => 'Фокус на пошуку',
+ 'Display/Close shortcuts' => 'Показати/Приховати скорочення',
+ 'Move backward through top menu' => 'Фокус на попередній пункт меню',
+ 'Move forward through top menu' => 'Фокус на наступний пункт меню',
+ 'Enter focused element' => 'Перейти до активного пункту меню',
+
+ 'Upload' => 'Відвантажити',
+ 'New File' => 'Новий файл',
+ 'New Folder' => 'Нова тека',
+ 'Download' => 'Завантажити',
+ 'Rename' => 'Перейменувати',
+ 'Copy' => 'Копіювати',
+ 'Archive' => 'Архівувати',
+ 'Delete' => 'Видалити',
+ 'Save File (in text editor)' => 'Зберегти файл (у текстовому редакторі)',
+ 'Close Popup / Cancel' => 'Приховати підказки / Відмінити',
+ 'Move Cursor Up' => 'Перемістити курсор догори',
+ 'Move Cursor Dow' => 'Перемістити курсор донизу',
+ 'Switch to Left Tab' => 'Перейти до лівої панелі',
+ 'Switch to Right Tab' => 'Перейти до правої панелі',
+ 'Switch Tab' => 'Перехід до панелі',
+ 'Go to the Top of File List' => 'Перейти до початку списку файлів',
+ 'Go to the Last File' => 'Перейти до останнього файлу',
+ 'Open File/Enter Directory' => 'Відкрити файл/Перейти до теки',
+ 'Go to Parent Directory' => 'Перейти до батьківської теки',
+ 'Select Current File' => 'Обрати поточний файл',
+ 'Select Bunch of Files' => 'Обрати групу файлів',
+ 'Append File to the Current Selection' => 'Додати файл до поточного вибору',
+ 'Select All Files' => 'Обрати всі файл',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
+ 'скорочення запозичені у чудового GNU файлового менеджера Midnight Commander ',
+
+ 'Licence Key' => 'Ліцензійний ключ',
+ 'Enter License Key' => 'Ввести ліцензійний ключ',
+ 'Buy Licence' => 'Прибдати ліцензію',
+ 'Buy Lifetime License' => 'Придбати вічну ліцензію',
+ 'Disable and Cancel Licence' => 'Відключити і відмінити ліцензію',
+ 'Licence Activated' => 'Ліцензію активовано',
+ 'Licence Deactivated' => 'Ліцензію декативовано',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Обмежити користувачів так, що вони не можуть використовувати SSH і матимуть доступ тільки до домашньої директорії.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Переглядайте, копіюйте, редагуйте, переглядайте і відновлюйте всі файли веб-доменів за допомогою повнофункціонального файлового менеджеру.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'Це комерційний модуль, вам потрібно буде придбати ліцензійний ключ, щоб включити його.'
+
);
diff --git a/web/inc/i18n/vi.php b/web/inc/i18n/vi.php
new file mode 100644
index 000000000..5b04a74bf
--- /dev/null
+++ b/web/inc/i18n/vi.php
@@ -0,0 +1,598 @@
+ 'Gói hosting',
+ 'IP' => 'IP',
+ 'Graphs' => 'Theo dõi',
+ 'Statistics' => 'Thống kê',
+ 'Log' => 'Lịch sử',
+ 'Services' => 'Dịch vụ',
+ 'Firewall' => 'Tường lửa',
+ 'Updates' => 'Cập nhật',
+ 'Log in' => 'Đăng nhập',
+ 'Log out' => 'Thoát',
+
+ 'USER' => 'Thành viên',
+ 'WEB' => 'WEB',
+ 'DNS' => 'DNS',
+ 'MAIL' => 'MAIL',
+ 'DB' => 'DB',
+ 'CRON' => 'CRON',
+ 'BACKUP' => 'Sao lưu',
+
+ 'Add User' => 'Thêm tài khoản',
+ 'Add Domain' => 'Thêm tên miền',
+ 'Add Web Domain' => 'Thêm website',
+ 'Add DNS Domain' => 'Thêm DNS',
+ 'Add DNS Record' => 'Thêm bản ghi DNS',
+ 'Add Mail Domain' => 'Thêm miền mail',
+ 'Add Mail Account' => 'Thêm tài khoản mail',
+ 'Add Database' => 'Thêm CSDL',
+ 'Add Cron Job' => 'Thêm Tiến trình tự động',
+ 'Create Backup' => 'Tạo sao lưu',
+ 'Configure' => 'Cài đặt',
+ 'Restore All' => 'Khôi phục tất cả',
+ 'Add Package' => 'Thêm gói Hosting',
+ 'Add IP' => 'Thêm địa chỉ IP',
+ 'Add Rule' => 'Thêm luạt',
+ 'Ban IP Address' => 'Chặn địa chỉ IP',
+ 'Search' => 'Tìm kiếm',
+ 'Add one more FTP Account' => 'Thêm tài khoản FTP',
+ 'Overall Statistics' => 'Thống kê tổng quát',
+ 'Daily' => 'Hàng ngày',
+ 'Weekly' => 'Hàng tuần',
+ 'Monthly' => 'Hàng tháng',
+ 'Yearly' => 'Hàng năm',
+ 'Add' => 'Thêm',
+ 'Back' => 'Quay lại',
+ 'Save' => 'Lưu lại',
+ 'Submit' => 'Gửi',
+
+ 'toggle all' => 'chọn cả',
+ 'apply to selected' => 'Hành động',
+ 'rebuild' => 'Build lại',
+ 'rebuild web' => 'Build lại web',
+ 'rebuild dns' => 'Build lại dns',
+ 'rebuild mail' => 'Build lại mail',
+ 'rebuild db' => 'Build lại cơ sở dữ liệu',
+ 'rebuild cron' => 'Build lại cron',
+ 'update counters' => 'Cập nhật bộ đếm',
+ 'suspend' => 'Đình chỉ',
+ 'unsuspend' => 'Hủy đình chỉ',
+ 'delete' => 'Xóa',
+ 'show per user' => 'Hiển thị theo người dùng',
+ 'login as' => 'Đăng nhập như',
+ 'logout' => 'thoát',
+ 'edit' => 'sửa',
+ 'open webstats' => 'mở webstats',
+ 'view logs' => 'Xem lịch sử',
+ 'list records' => 'danh sách bản ghi %s',
+ 'add record' => 'thêm bản ghi',
+ 'list accounts' => 'danh sách tài khoản %s',
+ 'add account' => 'thêm tài khoản',
+ 'open webmail' => 'mở webmail',
+ 'list fail2ban' => 'danh sách fail2ban',
+ 'open %s' => 'mở %s',
+ 'download' => 'tải về',
+ 'restore' => 'khôi phục',
+ 'configure restore settings' => 'cài đặt cấu hình khôi phục',
+ 'stop' => 'dừng',
+ 'start' => 'bật',
+ 'restart' => 'khởi động lại',
+ 'update' => 'cập nhật',
+ 'generate' => 'tạo mới',
+ 'Generate CSR' => 'Tạo CSR',
+ 'reread IP' => 'đọc lại IP',
+ 'enable autoupdate' => 'bật tự động cập nhật',
+ 'disable autoupdate' => 'tắt tự động cập nhật',
+ 'turn on notifications' => 'bật thông báo',
+ 'turn off notifications' => 'tắt thông báo',
+
+ 'Adding User' => 'Thêm tài khoản',
+ 'Editing User' => 'Sửa tài khoản',
+ 'Adding Domain' => 'Thêm tên miền',
+ 'Editing Domain' => 'Sửa tên miền',
+ 'Adding DNS Domain' => 'Thêm miền DNS',
+ 'Editing DNS Domain' => 'Sửa miền DNS',
+ 'Adding DNS Record' => 'Thêm bản ghi DNS',
+ 'Editing DNS Record' => 'Sửa bản ghi DNS',
+ 'Adding Mail Domain' => 'Thêm miền email',
+ 'Editing Mail Domain' => 'Sửa miền email',
+ 'Adding Mail Account' => 'Thêm tài khoản email',
+ 'Editing Mail Account' => 'Sửa tài khoản email',
+ 'Adding database' => 'Thêm CSDL',
+ 'Editing Cron Job' => 'Sửa Tiến trình tự động',
+ 'Adding Cron Job' => 'Thêm Tiến trình tự động',
+ 'Editing Database' => 'Sửa CSDL',
+ 'Adding Package' => 'Thêm gói hosting',
+ 'Editing Package' => 'Sửa gói hosting',
+ 'Adding IP address' => 'Thêm địa chỉ IP',
+ 'Editing IP Address' => 'Sửa địa chỉ IP',
+ 'Editing Backup Exclusions' => 'Sửa nội dung không sao lưu',
+ 'Generating CSR' => 'Tạo CSR',
+ 'Listing' => 'Danh sách',
+ 'Search Results' => 'Kết quả tìm kiếm',
+ 'Adding Firewall Rule' => 'Thêm luật tường lửa',
+ 'Editing Firewall Rule' => 'Sửa luật tường lửa',
+ 'Adding IP Address to Banlist' => 'Thêm địa chỉ IP vào danh sách hạn chế',
+
+ 'active' => 'kích hoạt',
+ 'spnd' => 'đình chỉ',
+ 'suspended' => 'đình chỉ',
+ 'running' => 'đang chạy',
+ 'stopped' => 'đã dừng',
+ 'outdated' => 'đã hết hạn',
+ 'updated' => 'đã cập nhật',
+
+ 'yes' => 'có',
+ 'no' => 'không',
+ 'none' => 'không có',
+ 'pb' => 'pb',
+ 'tb' => 'tb',
+ 'gb' => 'gb',
+ 'mb' => 'mb',
+ 'minute' => 'phút',
+ 'hour' => 'giờ',
+ 'day' => 'ngày',
+ 'days' => 'ngày',
+ 'hours' => 'giờ',
+ 'minutes' => 'phút',
+ 'month' => 'tháng',
+ 'package' => 'gói hosting',
+ 'Bandwidth' => 'Băng thông',
+ 'Disk' => 'Đĩa cứng',
+ 'Web' => 'Web',
+ 'Mail' => 'Mail',
+ 'Databases' => 'CSDL',
+ 'User Directories' => 'Thư mục người dùng',
+ 'Template' => 'Mẫu',
+ 'Web Template' => 'Mẫu Apache',
+ 'Proxy Template' => 'Mẫu Nginx',
+ 'DNS Template' => 'Mẫu DNS',
+ 'Web Domains' => 'Tên miền web',
+ 'SSL Domains' => 'Tên miền SSL',
+ 'Web Aliases' => 'Ánh xạ web',
+ 'per domain' => 'mỗi tên miền',
+ 'DNS Domains' => 'Miền DNS',
+ 'DNS Domains' => 'Miên DNS',
+ 'DNS records' => 'Bản ghi DNS' ,
+ 'Name Servers' => 'Name Servers',
+ 'Mail Domains' => 'Miên Email',
+ 'Mail Accounts' => 'Tài khoản email',
+ 'Cron Jobs' => 'Tiến trình tự động',
+ 'SSH Access' => 'Truy cập SSH',
+ 'IP Addresses' => 'Địa chỉ IP',
+ 'Backups' => 'Sao lưu',
+ 'Backup System' => 'Sao lưu Hệ thống',
+ 'backup exclusions' => 'không sao lưu',
+ 'template' => 'mẫu',
+ 'SSL Support' => 'Hỗ trợ SSL',
+ 'SSL Home Directory' => 'Trang chủ SSL',
+ 'Proxy Support' => 'Hỗ trợ Nginx',
+ 'Proxy Extensions' => 'Phần mở rộng Nginx',
+ 'Web Statistics' => 'Thống kê Web',
+ 'Additional FTP Account' => 'Tài khoản FTP',
+ 'SOA' => 'SOA',
+ 'TTL' => 'TTL',
+ 'Expire' => 'Hết hạn',
+ 'Records' => 'Bản ghi',
+ 'Catchall email' => 'Lấy tất cả email',
+ 'AntiVirus Support' => 'Hỗ trợ chống virus',
+ 'AntiSpam Support' => 'Hỗ trợ chống spam',
+ 'DKIM Support' => 'Hỗ trợ DKIM',
+ 'Accounts' => 'Tài khoản',
+ 'Quota' => 'Chỉ tiêu',
+ 'Autoreply' => 'Tự động trả lời',
+ 'Forward to' => 'Chuyển tiếp đến',
+ 'Do not store forwarded mail' => 'Không lưu thư chuyển tiếp',
+ 'database' => 'csdl',
+ 'User' => 'Người dùng',
+ 'Host' => 'Host',
+ 'Charset' => 'Bảng mã',
+ 'Min' => 'Phút',
+ 'Hour' => 'Giờ',
+ 'Day' => 'Ngày',
+ 'Month' => 'Tháng',
+ 'Day of week' => 'Ngày trong tuần',
+ 'local' => 'địa phương',
+ 'Run Time' => 'Thời gian chạy',
+ 'Backup Size' => 'Kích thước bản sao lưu',
+ 'SYS' => 'Hệ thống',
+ 'Domains' => 'Tên miền',
+ 'Status' => 'Trạng thái',
+ 'shared' => 'chia sẻ',
+ 'dedicated' => 'dành riêng',
+ 'Owner' => 'Chủ sở hữu',
+ 'Users' => 'Người dùng',
+ 'Load Average' => 'Tải trung bình',
+ 'Memory Usage' => 'Sử dụng ram',
+ 'HTTPD Usage' => 'HTTPD sử dụng',
+ 'NGINX Usage' => 'NGINX sử dụng',
+ 'MySQL Usage on localhost' => 'MySQL sử dụng tại localhost',
+ 'PostgreSQL Usage on localhost' => 'PostgreSQL sử dụng tại localhost',
+ 'Bandwidth Usage eth0' => 'Băng thông eth0 sử dụng',
+ 'FTP Usage' => 'FTP sử dụng',
+ 'SSH Usage' => 'SSH sử dụng',
+ 'reverse proxy' => 'reverse proxy',
+ 'web server' => 'máy chủ web',
+ 'dns server' => 'máy chủ dns',
+ 'mail server' => 'máy chủ mail',
+ 'pop/imap server' => 'máy chủ pop/imap',
+ 'email antivirus' => 'chống virus mail',
+ 'email antispam' => 'chống spam mail',
+ 'database server' => 'máy chủ CSDL',
+ 'ftp server' => 'máy chủ FTP',
+ 'job scheduler' => 'việc lập lịch',
+ 'CPU' => 'CPU',
+ 'Memory' => 'Ram',
+ 'Uptime' => 'Thời gian sống',
+ 'core package' => 'gõi lõi',
+ 'php interpreter' => 'trình thông dịch php',
+ 'internal web server' => 'máy chủ web nội bộ',
+ 'Version' => 'Phiên bản',
+ 'Release' => 'Bản phát hành',
+ 'Architecture' => 'Kiến trúc',
+ 'Object' => 'Đối tượng',
+ 'Owner' => 'Chủ sở hữu',
+ 'Username' => 'Tên đăng nhập',
+ 'Password' => 'Mật khẩu',
+ 'Email' => 'Email',
+ 'Package' => 'Gói hosting',
+ 'Language' => 'Ngôn ngữ',
+ 'First Name' => 'Họ',
+ 'Last Name' => 'Tên',
+ 'Send login credentials to email address' => 'Gửi thông tin đăng nhập đến địa chỉ email',
+ 'Default Template' => 'Mẫu mặc định',
+ 'Default Name Servers' => 'Name Servers mặc định',
+ 'Domain' => 'Tên miền',
+ 'DNS Support' => 'Hỗ trỡ DNS',
+ 'Mail Support' => 'Hỗ trợ email',
+ 'Advanced options' => 'Cấu hình nâng cao',
+ 'Aliases' => 'Ánh xạ',
+ 'SSL Certificate' => 'Chứng chỉ SSL',
+ 'SSL Key' => 'SSL Key',
+ 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate',
+ 'SSL CSR' => 'SSL CSR',
+ 'optional' => 'tùy chọn',
+ 'internal' => 'nội bộ',
+ 'Statistics Authorization' => 'Cấp phép thống kê',
+ 'Statistics Auth' => 'Xác thực thống kê',
+ 'Account' => 'Tài khoản',
+ 'Prefix will be automaticaly added to username' => 'Tiền tố %s sẽ được tự động thêm vào username',
+ 'Send FTP credentials to email' => 'Gửi thông tin FTP đến email',
+ 'Expiration Date' => 'Ngày hết hạn',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
+ 'Name servers' => 'Name servers',
+ 'Record' => 'Bản ghi',
+ 'IP or Value' => 'IP hoặc giá trị',
+ 'Priority' => 'Độ ưu tiên',
+ 'Record Number' => 'Số bản ghi',
+ 'in megabytes' => 'tính bằng megabyte',
+ 'Message' => 'Tin nhắn',
+ 'use local-part' => 'sử dụng local-part',
+ 'one or more email addresses' => 'một hoặc nhiều địa chỉ email',
+ 'Prefix will be automaticaly added to database name and database user' => 'Tiền tố %s sẽ được tự động thêm vào tên csdl và người dùng csdl.',
+ 'Database' => 'CSDL',
+ 'Type' => 'Loại',
+ 'Minute' => 'Phút',
+ 'Command' => 'Lệnh',
+ 'Package Name' => 'Tên gói',
+ 'Netmask' => 'Netmask',
+ 'Interface' => 'Interface',
+ 'Shared' => 'Chia sẻ',
+ 'Assigned user' => 'Người dùng được chỉ định',
+ 'Assigned domain' => 'Tên miền được chỉ định',
+ 'NAT IP association' => 'Kết hợp NAT IP',
+ 'shell' => 'shell',
+ 'web domains' => 'tên miền web',
+ 'web aliases' => 'ánh xạ web',
+ 'dns records' => 'bản ghi dns',
+ 'mail domains' => 'miền email',
+ 'mail accounts' => 'tài khoản email',
+ 'accounts' => 'tài khoản',
+ 'databases' => 'csdl',
+ 'cron jobs' => 'Tiến trình tự động',
+ 'backups' => 'sao lưu',
+ 'quota' => 'hạn mức',
+ 'day of week' => 'ngày trong tuần',
+ 'cmd' => 'cmd',
+ 'users' => 'người dùng',
+ 'domains' => 'tên miền',
+ 'aliases' => 'ánh xạ',
+ 'records' => 'bản ghi',
+ 'jobs' => 'công việc',
+ 'username' => 'tên tài khoản',
+ 'password' => 'mật khẩu',
+ 'type' => 'loại',
+ 'charset' => 'bộ ký tự',
+ 'domain' => 'tên miền',
+ 'ip' => 'ip',
+ 'ip address' => 'địa chỉ ip',
+ 'IP address' => 'Địa chỉ IP',
+ 'netmask' => 'netmask',
+ 'interface' => 'Giao tiếp',
+ 'assigned user' => 'người dùng đơ]cj chỉ định',
+ 'ns1' => 'ns1',
+ 'ns2' => 'ns2',
+ 'user' => 'tài khoản',
+ 'email' => 'email',
+ 'first name' => 'họ',
+ 'last name' => 'tên',
+ 'account' => 'tài khoản',
+ 'ssl certificate' => 'chứng chỉ ssl',
+ 'ssl key' => 'ssl key',
+ 'stats user password' => 'số liệu mật khẩu người dùng',
+ 'stats username' => 'số liệu người dùng',
+ 'stats password' => 'số liệu mật khẩu',
+ 'ftp user password' => 'mật khẩu người dùng ftp',
+ 'ftp user' => 'người dùng ftp',
+ 'Last 70 lines of %s.%s.log' => '70 dòng cuối của %s.%s.log',
+ 'Download AccessLog' => 'Tải lịch sử truy cập',
+ 'Download ErrorLog' => 'Tải lịch sử lỗi',
+ 'Country' => 'quốc gia',
+ '2 letter code' => 'mã 2 kí tự',
+ 'State / Province' => 'Bang / Tỉnh',
+ 'City / Locality' => 'Thành phố / Địa bàn',
+ 'Organization' => 'Tổ chức',
+ 'Action' => 'Hành động',
+ 'Protocol' => 'Giao thức',
+ 'Port' => 'Cổng',
+ 'Comment' => 'Bình luật',
+ 'Banlist' => 'Danh sách chặn',
+ 'ranges are acceptable' => 'chấp nhận phạm vi',
+ 'CIDR format is supported' => 'định dạng CIDR được hỗ trợ',
+ 'Add one more Name Server' => 'Add one more Name Server',
+
+ '1 account' => '1 tài khoản',
+ '%s accounts' => '%s tài khoản',
+ '1 domain' => '1 tên miền',
+ '%s domains' => '%s tên miền',
+ '1 record' => '1 bản ghi',
+ '%s records' => '%s bản ghi',
+ '1 mail account' => '1 tài khoản email',
+ '%s mail accounts' => '%s tài khoản email',
+ '1 database' => '1 CSDL',
+ '%s databases' => '%s CSDL',
+ '1 cron job' => '1 Tiến trình tự động',
+ '%s cron jobs' => '%s Tiến trình tự động',
+ '1 archive' => '1 lưu trữ',
+ '%s archives' => '%s lưu trữ',
+ '1 package' => '1 gói hosting',
+ '%s packages' => '%s gói hosting',
+ '1 IP address' => '1 địa chỉ IP',
+ '%s IP addresses' => '%s địa chỉ IP',
+ '1 month' => '1 tháng',
+ '%s months' => '%s tháng',
+ '1 log record' => '1 bản ghi lịch sử',
+ '%s log records' => '%s bản ghi lịch sử',
+ '1 object' => '1 đối tượng',
+ '%s objects' => '%s đối tượng',
+ 'no exclusions' => 'không loại trừ',
+ '1 rule' => '1 luật',
+ '%s rules' => '%s luật',
+ 'There are no currently banned IP' => 'Hiện tại không có IP nào bị chặn',
+
+ 'USER_CREATED_OK' => 'Tài khoản %s đã được tạo thành công.',
+ 'WEB_DOMAIN_CREATED_OK' => 'Tên miền %s đã được tạo thành công.',
+ 'DNS_DOMAIN_CREATED_OK' => 'Miền DNS %s đã được tạo thành công.',
+ 'DNS_RECORD_CREATED_OK' => 'Bản ghi %s.%s đã được tạo thành công.',
+ 'MAIL_DOMAIN_CREATED_OK' => 'Miền email %s đã được tạo thành công.',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'Tài khoản email %s@%s đã được tạo thành công.',
+ 'DATABASE_CREATED_OK' => 'CSDL %s đã được tạo thành công.',
+ 'CRON_CREATED_OK' => 'Tiến trình tự động đã được tạo thành công.',
+ 'IP_CREATED_OK' => 'Địa chỉ IP %s đã được tạo thành công.',
+ 'PACKAGE_CREATED_OK' => 'Gói hosting %s đã được tạo thành công.',
+ 'SSL_GENERATED_OK' => 'Tạo thành công chứng chỉ.',
+ 'RULE_CREATED_OK' => 'Tạo thành công luật tường lửa.',
+ 'Autoupdate has been successfully enabled' => 'Bật thành công chế độ tự động cập nhật.',
+ 'Autoupdate has been successfully disabled' => 'Tắt thành công chế độ tự động cập nhật.',
+ 'Cronjob email reporting has been successfully enabled' => 'Bật thành công tiến trình tự động báo cáo email',
+ 'Cronjob email reporting has been successfully disabled' => 'Tắt thành công tiến trình tự động báo cáo email',
+ 'Changes has been saved.' => 'Thay đổi đã được lưu.',
+ 'Confirmation' => 'Xác nhận',
+ 'DELETE_USER_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa tài khoản %s?',
+ 'SUSPEND_USER_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ tài khoản %s?',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt tài khoản %s?',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa tên miền %s?',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ tên miền %s?',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt tên miền %s?',
+ 'DELETE_RECORD_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa bản ghi %s?',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ bản ghi %s?',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt bản ghi %s?',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa %s?',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ %s?',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt %s?',
+ 'DELETE_DATABASE_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa CSDL %s?',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ CSDL %s?',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt CSDL %s?',
+ 'DELETE_CRON_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa tiến trình tự động?',
+ 'SUSPEND_CRON_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ tiến trình tự động?',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt tiến trình tự động?',
+ 'DELETE_BACKUP_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa bản sao lưu %s?',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa loại trừ %s?',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa gói %s?',
+ 'DELETE_IP_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa địa chỉ IP %s?',
+ 'DELETE_RULE_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa luật #%s?',
+ 'SUSPEND_RULE_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ luật #%s?',
+ 'UNSUSPEND_RULE_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt luật #%s?',
+ 'RESTART_CONFIRMATION' => 'Bạn có chắc chắn muốn khởi động lại %s?',
+ 'Welcome' => 'Xin chào',
+ 'LOGGED_IN_AS' => 'Đăng nhập với tài khoản %s',
+ 'Error' => 'Lôi',
+ 'Invalid username or password' => 'Sai tên đăng nhập hoặc mật khẩu.',
+ 'Invalid username or code' => 'Sai tên đăng nhập hoặc mã.',
+ 'Passwords not match' => 'Mật khẩu không khớp.',
+ 'Please enter valid email address.' => 'Vui lòng điền đúng địa chỉ email.',
+ 'Field "%s" can not be blank.' => 'Trường "%s" không thể để trống.',
+ 'Password is too short.' => 'Mật khẩu quá ngắn (tối thiểu 6 ký tự)',
+ 'Error code:' => 'Mã lỗi: %s',
+ 'SERVICE_ACTION_FAILED' => '"%s" "%s" thất bại',
+ 'IP address is in use' => 'Địa chỉ IP đang được sử dụng',
+ 'BACKUP_SCHEDULED' => 'Tiến trình đã được thêm vào hàng đợi. Bạn sẽ nhận được email thông báo khi bản sao lưu đã sẵn sàng để tải về.',
+ 'BACKUP_EXISTS' => 'Một bản sao lưu khác đang được tạo. Vui lòng chờ đến khi bản sao lưu đó được tạo xong.',
+ 'RESTORE_SCHEDULED' => 'Tiến trình đã được thêm vào hàng đợi. Bạn sẽ nhận được email thông báo khi tiến trình khôi phục hoàn thành.',
+ 'RESTORE_EXISTS' => 'Một tiến trình khôi phục đang được chạy. Vui lòng chờ kết thúc trước khi thực hiện lại.',
+
+ 'WEB_EXCLUSIONS' => "Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *. Để loại bỏ một thư mục đặc biệt vui lòng sử dụng định sạng sau: domain.com:public_html/cache:public_html/tmp",
+ 'DNS_EXCLUSIONS' => "Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *",
+ 'MAIL_EXCLUSIONS' => "Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *. Để loại bỏ một thư mục đặc biệt vui lòng sử dụng định sạng sau: domain.com:info:support:postmaster",
+ 'DB_EXCLUSIONS' => "Điền đầy đủ tên CSDL, mỗi CSDL một dòng. Để loại bỏ tất cả CSDL, sử dụng ký tự *",
+ 'CRON_EXCLUSIONS' => "Để loại bỏ tất cả tiến trình, sử dụng ký tự *",
+ 'USER_EXCLUSIONS' => "Điền tên thư mục, mỗi thư mục một dòng. Để loại bỏ tất cả thư mục, sử dụng ký tự *",
+
+ 'Welcome to Vesta Control Panel' => 'Chào mứng đến Vesta Control Panel',
+ 'MAIL_FROM' => 'Vesta Control Panel ',
+ 'GREETINGS_GORDON_FREEMAN' => "Xin chào, %s %s,\n",
+ 'GREETINGS' => "Hello,\n",
+ 'ACCOUNT_READY' => "Tài khoản của bạn đã được tạo thành công và sẵn sàng để sử dụng.\n\nhttps://%s/login/\nTên đăng nhập: %s\nMật khẩu: %s\n\n--\nVesta Control Panel\n",
+
+ 'FTP login credentials' => 'Thông tin đăng nhập FTP',
+ 'FTP_ACCOUNT_READY' => "Tài khoản FTP của bạn đã được tạo thành công và sẵn sàng để sử dụng.\n\nHostname: %s\nTên đăng nhập: %s_%s\nMật khẩu: %s\n\n--\nVesta Control Panel\n",
+
+ 'Database Credentials' => 'Thông tin CSDL',
+ 'DATABASE_READY' => "Tạo thành công CSDL.\n\nDatabase: %s\nNgười dùng: %s\nMật khẩu: %s\n%s\n\n--\nVesta Control Panel\n",
+
+ 'forgot password' => 'Quên mật khẩu',
+ 'Confirm' => 'Xác nhận',
+ 'New Password' => 'Mật khẩu mới',
+ 'Confirm Password' => 'Xác nhận mật khẩu',
+ 'Reset' => 'Thiết lập lại',
+ 'Reset Code' => 'Thiết lập lại mã',
+ 'RESET_NOTICE' => '',
+ 'RESET_CODE_SENT' => 'Mã thiết lập lại mật khẩu đã được gửi đến địa chỉ email ',
+ 'MAIL_RESET_SUBJECT' => 'Khôi phục mật khẩu tại %s',
+ 'PASSWORD_RESET_REQUEST' => "Để thiết lập lại mật khẩu quản trị, vui lòng truy cập vào địa chỉ:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, you may go to https://%s/reset/?action=code&user=%s và nhập mã sau:\n%s\n\nNếu bạn không thực hiện khôi phục mật khẩu, vui lòng bỏ qua email này.\n\n--\nVesta Control Panel\n",
+
+ 'Jan' => 'Tháng một',
+ 'Feb' => 'Tháng hai',
+ 'Mar' => 'Tháng ba',
+ 'Apr' => 'Tháng tư',
+ 'May' => 'Tháng 5',
+ 'Jun' => 'Tháng 6',
+ 'Jul' => 'Tháng 7',
+ 'Aug' => 'Tháng 8',
+ 'Sep' => 'Tháng 9',
+ 'Oct' => 'Tháng 10',
+ 'Nov' => 'Tháng 11',
+ 'Dec' => 'Tháng 12',
+
+ 'Configuring Server' => 'Cài đặt máy chủ',
+ 'Hostname' => 'Tên miền',
+ 'Time Zone' => 'Múi giờ',
+ 'Default Language' => 'Ngôn ngữ mặc đinhk',
+ 'FileSystem Disk Quota' => 'Hạn mức dung lượng đĩa hệ thống',
+ 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
+ 'preview' => 'xem trước',
+ 'Reseller Role' => 'Vai trò đại lý',
+ 'Web Config Editor' => 'Chỉnh sửa cấu hình web',
+ 'Template Manager' => 'Quản lý mẫu',
+ 'Backup Migration Manager' => 'Quản lý tích hợp sao lưu',
+ 'FileManager' => 'FileManager',
+ 'show: CPU / MEM / NET / DISK' => 'hiển thị: CPU / MEM / NET / DISK',
+
+ 'sort by' => 'xếp theo',
+ 'Date' => 'Ngày',
+ 'Starred' => 'Đánh dấu',
+ 'Name' => 'Tên',
+
+ 'File Manager' => 'Quản lý tệp',
+ 'type' => 'loại',
+ 'size' => 'size',
+ 'date' => 'ngày',
+ 'name' => 'tên',
+ 'Initializing' => 'Khởi tạo',
+ 'UPLOAD' => 'Tải lên',
+ 'NEW FILE' => 'Thêm tệp mới',
+ 'NEW DIR' => 'Thêm thư mục mới',
+ 'DELETE' => 'Xóa',
+ 'RENAME' => 'Đổi tên',
+ 'COPY' => 'Sao chép',
+ 'ARCHIVE' => 'Nén',
+ 'EXTRACT' => 'Giải nén',
+ 'DOWNLOAD' => 'Tải về',
+ 'Hit' => 'Lượt',
+ 'to reload the page' => 'để tải lại trang',
+ 'Directory name cannot be empty' => 'Tên thư mục không thể để trống',
+ 'File name cannot be empty' => 'Tên tệp không thể để trống',
+ 'No file selected' => 'Không có tệp nào được chọn',
+ 'No file or folder selected' => 'Không có tệp hoặc thư mục nào được chọn',
+ 'File type not supported' => 'Loại tệp không được hỗ trợ',
+ 'Directory download not available in current version' => 'Phiên bản hiện tại không hỗ trợ tải thư mục',
+ 'Directory not available' => 'Thư mục không sẵn sàng',
+ 'Done' => 'Xong',
+ 'Close' => 'Đóng',
+ 'Copy' => 'Sao chép',
+ 'Cancel' => 'Hủy',
+ 'Rename' => 'Đổi tên',
+ 'Delete' => 'Xóa',
+ 'Extract' => 'Giải nén',
+ 'Create' => 'Tạo mới',
+ 'Compress' => 'Nén',
+ 'OK' => 'OK',
+ 'Are you sure you want to copy' => 'Bạn có chắc chắn muốn sao chép',
+ 'Are you sure you want to delete' => 'Bạn có chắc chắn muốn xóa',
+ 'into' => 'into',
+ 'existing files will be replaced' => 'tệp tồn tại sẽ được ghi đè',
+ 'Original name' => 'Tên gốc',
+ 'File' => 'Tệp',
+ 'already exists' => 'đã tồn tại',
+ 'Create file' => 'Tạo tệp',
+ 'Create directory' => 'Tạo thư mục',
+
+ 'Add New object' => 'Thêm đối tượng mới',
+ 'Save Form' => 'Lưu form',
+ 'Cancel saving form' => 'Hủy lưu form',
+ 'Go to USER list' => 'Đi đến danh sách thành viên',
+ 'Go to WEB list' => 'Đi đến danh sách web',
+ 'Go to DNS list' => 'Đi đến danh sách dns',
+ 'Go to MAIL list' => 'Đi đến danh sách mail',
+ 'Go to DB list' => 'Đi đến danh sách csdl',
+ 'Go to CRON list' => 'Đi đến danh sách tiến trình tự động',
+ 'Go to BACKUP list' => 'Đi đến danh sách backup',
+ 'Focus on search' => 'Focus vào tìm kiếm',
+ 'Display/Close shortcuts' => 'Hiển thị/Đóng phím tắt',
+ 'Move backward through top menu' => 'Di chuyển ngược trên Top Menu',
+ 'Move forward through top menu' => 'Di chuyển xuôi trên Top Menu',
+ 'Enter focused element' => 'Nhập vào phần tử focus',
+
+ 'Upload' => 'Tải lên',
+ 'New File' => 'Tạo tệp',
+ 'New Folder' => 'Tạo thư mục',
+ 'Download' => 'Tải về',
+ 'Rename' => 'Đổi tên',
+ 'Copy' => 'Sao chép',
+ 'Archive' => 'Lưu trữ',
+ 'Delete' => 'Xóa',
+ 'Save File (in text editor)' => 'Lưu tệp (Trong trình chỉnh sửa văn bản)',
+ 'Close Popup / Cancel' => 'Đóng Popup / Hủy',
+ 'Move Cursor Up' => 'Di chuyển chuột lên',
+ 'Move Cursor Dow' => 'Di chuyển chuột xuống',
+ 'Switch to Left Tab' => 'Chuyển sang tab trái',
+ 'Switch to Right Tab' => 'Chuyển sang tab phải',
+ 'Switch Tab' => 'Chuyển đổi Tab',
+ 'Go to the Top of File List' => 'Lên đầu danh sách tệp',
+ 'Go to the Last File' => 'Di chuyển đến tệp cuối cùng',
+ 'Open File/Enter Directory' => 'Mở tệp/Truy cập thư mục',
+ 'Go to Parent Directory' => 'Về thư mục cha',
+ 'Select Current File' => 'Chọn tệp hiện tại',
+ 'Select Bunch of Files' => 'Chọn nhiều tệp',
+ 'Append File to the Current Selection' => 'Thêm tệp vào lựa chọn hiện tại',
+ 'Select All Files' => 'Chọn tất cả các tệp',
+ 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+
+ 'Licence Key' => 'Khóa bản quyền',
+ 'Enter License Key' => 'Nhập Khóa bản quyền',
+ 'Buy Licence' => 'Mua bản quyền',
+ 'Buy Lifetime License' => 'Mua bản quyền trọn đời',
+ 'Disable and Cancel Licence' => 'Vô hiệu hoá và Hủy bỏ Giấy phép Bản Quyền',
+ 'Licence Activated' => 'Bản quyền đã được kích hoạt',
+ 'Licence Deactivated' => 'Bản quyền đã bị hủy kích hoạt',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Hạn chế người dùng không thể dùng SSH và chỉ có thể truy cập thư mục home của họ.',
+ 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Duyệt tệp, sao chép, chỉnh sửa, xem, và lấy tất cả các tệp tin từ tất cả các tên miền của bạn bằng cách sử dụng trình quản lý tệp tin đầy đủ tính năng.',
+ 'This is a commercial module, you would need to purchace license key to enable it.' => 'Đây là một module thương mại, bạn sẽ cần phải mua key bản quyền để kích hoạt nó.'
+
+);
diff --git a/web/inc/mail-wrapper.php b/web/inc/mail-wrapper.php
index bf1c3d9e3..a8c48a09e 100755
--- a/web/inc/mail-wrapper.php
+++ b/web/inc/mail-wrapper.php
@@ -32,5 +32,3 @@ $mailtext = file_get_contents("php://stdin");
if ((!empty($to)) && (!empty($subject))) {
send_email($to,$subject,$mailtext,$from);
}
-
-?>
diff --git a/web/inc/main.php b/web/inc/main.php
index c7305a6f5..b3453dce3 100644
--- a/web/inc/main.php
+++ b/web/inc/main.php
@@ -1,6 +1,9 @@
1) {
- $args[0] = $text;
- return call_user_func_array("sprintf",$args);
- } else {
- return $text;
- }
-}
-
define('VESTA_CMD', '/usr/bin/sudo /usr/local/vesta/bin/');
$i = 0;
@@ -88,6 +43,9 @@ if (isset($_SESSION['language'])) {
case 'es':
setlocale(LC_ALL, 'es_ES.utf8');
break;
+ case 'ja':
+ setlocale(LC_ALL, 'ja_JP.utf8');
+ break;
default:
setlocale(LC_ALL, 'en_US.utf8');
}
@@ -101,6 +59,27 @@ if (isset($_SESSION['look']) && ( $_SESSION['look'] != 'admin' )) {
$user = $_SESSION['look'];
}
+function get_favourites(){
+ exec (VESTA_CMD."v-list-user-favourites ".$_SESSION['user']." json", $output, $return_var);
+// $data = json_decode(implode('', $output).'}', true);
+ $data = json_decode(implode('', $output), true);
+ $data = array_reverse($data,true);
+ $favourites = array();
+
+ foreach($data['Favourites'] as $key => $favourite){
+ $favourites[$key] = array();
+
+ $items = explode(',', $favourite);
+ foreach($items as $item){
+ if($item)
+ $favourites[$key][trim($item)] = 1;
+ }
+ }
+
+ $_SESSION['favourites'] = $favourites;
+}
+
+
function check_error($return_var) {
if ( $return_var > 0 ) {
@@ -144,6 +123,7 @@ function humanize_time($usage) {
$usage = $usage / 60;
if ( $usage > 24 ) {
$usage = $usage / 24;
+
$usage = number_format($usage);
if ( $usage == 1 ) {
$usage = $usage." ".__('day');
@@ -168,29 +148,6 @@ function humanize_time($usage) {
return $usage;
}
-function humanize_usage($usage) {
- if ( $usage > 1024 ) {
- $usage = $usage / 1024;
- if ( $usage > 1024 ) {
- $usage = $usage / 1024 ;
- if ( $usage > 1024 ) {
- $usage = $usage / 1024 ;
- $usage = number_format($usage, 2);
- $usage = $usage." ".__('pb');
- } else {
- $usage = number_format($usage, 2);
- $usage = $usage." ".__('tb');
- }
- } else {
- $usage = number_format($usage, 2);
- $usage = $usage." ".__('gb');
- }
- } else {
- $usage = $usage." ".__('mb');
- }
- return $usage;
-}
-
function humanize_usage_size($usage) {
if ( $usage > 1024 ) {
$usage = $usage / 1024;
@@ -212,23 +169,24 @@ function humanize_usage_size($usage) {
function humanize_usage_measure($usage) {
$measure = 'kb';
+
if ( $usage > 1024 ) {
$usage = $usage / 1024;
if ( $usage > 1024 ) {
$usage = $usage / 1024 ;
if ( $usage > 1024 ) {
- $measure = __('pb');
+ $measure = 'pb';
} else {
- $measure = __('tb');
+ $measure = 'tb';
}
} else {
- $measure = __('gb');
+ $measure = 'gb';
}
} else {
- $measure = __('mb');
+ $measure = 'mb';
}
- return $measure;
+ return __($measure);
}
@@ -282,6 +240,11 @@ function display_error_block() {
Ok: function() {
$( this ).dialog( "close" );
}
+ },
+ create:function () {
+ $(this).closest(".ui-dialog")
+ .find(".ui-button:first")
+ .addClass("submit");
}
});
});
@@ -340,4 +303,3 @@ function list_timezones() {
}
return $timezone_list;
}
-?>
diff --git a/web/index.php b/web/index.php
index 35c889c9f..2f0707473 100644
--- a/web/index.php
+++ b/web/index.php
@@ -1,8 +1,7 @@
diff --git a/web/js/app.js b/web/js/app.js
index f75ee7806..ae8883c34 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -800,6 +800,38 @@ App.Ajax.request = function(method, data, callback, onError){
}*/
//App.Helpers.setAjaxBusy(method, data);
data = data || {};
+
+ var prgs = $('.progress-container');
+
+ switch (method) {
+ case 'cd':
+ prgs.find('title').text('Opening dir');
+ prgs.show();
+ break;
+ case 'delete_files':
+ prgs.find('title').text('Deleting');
+ prgs.show();
+ break;
+ case 'unpack_item':
+ prgs.find('title').text('Unpacking');
+ prgs.show();
+ break;
+ case 'create_file':
+ prgs.find('title').text('Creating file');
+ prgs.show();
+ break;
+ case 'create_dir':
+ prgs.find('title').text('Creating directory');
+ prgs.show();
+ break;
+ case 'rename_file':
+ prgs.find('title').text('Renaming file');
+ prgs.show();
+ break;
+ default:
+
+ break;
+ }
jQuery.ajax({
url: GLOBAL.ajax_url,
@@ -816,6 +848,7 @@ App.Ajax.request = function(method, data, callback, onError){
cache: false,
error: function(jqXHR, textStatus, errorThrown)
{
+ prgs.hide();
onError && onError();
if ('undefined' != typeof onError) {
fb.error(textStatus);
@@ -824,15 +857,17 @@ App.Ajax.request = function(method, data, callback, onError){
complete: function()
{
//App.Helpers.setAjaxFree(method, data);
+ prgs.hide();
},
success: function(reply)
{
+ prgs.hide();
//App.Helpers.setAjaxFree(method, data);
try {
callback && callback(reply);
}
catch(e) {
- alert('GENERAL ERROR: '+e);
+ fb.error('GENERAL ERROR with ajax method: ' + data.request_method + ' ' + e);
//App.Helpers.generalError();
}
}
diff --git a/web/js/events.js b/web/js/events.js
index 7bb8e6113..405933128 100644
--- a/web/js/events.js
+++ b/web/js/events.js
@@ -1,6 +1,14 @@
// Init kinda namespace object
var VE = { // Vesta Events object
core: {}, // core functions
+ navigation: {
+ state: {
+ active_menu: 1,
+ menu_selector: '.l-stat__col',
+ menu_active_selector: '.l-stat__col--active'
+ }
+ }, // menu and element navigation functions
+ notifications: {},
callbacks: { // events callback functions
click: {},
mouseover: {},
@@ -8,7 +16,15 @@ var VE = { // Vesta Events object
keypress: {}
},
helpers: {}, // simple handy methods
- tmp: {}
+ tmp: {
+ sort_par: 'sort-name',
+ sort_direction: -1,
+ sort_as_int: 0,
+ form_changed: 0,
+ search_activated: 0,
+ search_display_interval: 0,
+ search_hover_interval: 0
+ }
};
/*
@@ -92,10 +108,12 @@ VE.callbacks.click.do_delete = function(evt, elm) {
* @param custom_config Custom configuration parameters passed to dialog initialization (optional)
*/
VE.helpers.createConfirmationDialog = function(elm, dialog_title, confirmed_location_url, custom_config) {
+
var custom_config = !custom_config ? {} : custom_config;
var config = {
modal: true,
- autoOpen: true,
+ //autoOpen: true,
+ resizable: false,
width: 360,
title: dialog_title,
close: function() {
@@ -105,15 +123,27 @@ VE.helpers.createConfirmationDialog = function(elm, dialog_title, confirmed_loca
"OK": function(event, ui) {
location.href = confirmed_location_url;
},
- "Cancel": function() {
+ Cancel: function() {
$(this).dialog("close");
- $(this).dialog("destroy");
}
+ },
+ create:function () {
+ $(this).closest(".ui-dialog")
+ .find(".ui-button:first")
+ .addClass("submit");
+ $(this).closest(".ui-dialog")
+ .find(".ui-button")
+ .eq(1) // the first button
+ .addClass("cancel");
}
}
+
+
+ var reference_copied = $(elm[0]).clone();
+ console.log(reference_copied);
config = $.extend(config, custom_config);
- var reference_copied = $(elm).clone();
$(reference_copied).dialog(config);
+
}
/*
@@ -125,7 +155,7 @@ VE.helpers.warn = function(msg) {
VE.helpers.extendPasswordFields = function() {
var references = ['.password'];
-
+
$(document).ready(function() {
$(references).each(function(i, ref) {
VE.helpers.initAdditionalPasswordFieldElements(ref);
@@ -138,7 +168,7 @@ VE.helpers.initAdditionalPasswordFieldElements = function(ref) {
if (enabled) {
VE.helpers.hidePasswordFieldText(ref);
}
-
+
$(ref).prop('autocomplete', 'off');
var enabled_html = enabled ? '' : 'show-passwords-enabled-action';
@@ -167,4 +197,269 @@ VE.helpers.toggleHiddenPasswordText = function(ref, triggering_elm) {
}
}
+VE.helpers.refresh_timer = {
+ speed: 50,
+ degr: 180,
+ right: 0,
+ left: 0,
+ periodical: 0,
+ first: 1,
+
+ start: function(){
+ this.periodical = setInterval(function(){VE.helpers.refresh_timer.turn()}, this.speed);
+ },
+
+ stop: function(){
+ clearTimeout(this.periodical);
+ },
+
+ turn: function(){
+ this.degr += 1;
+
+ if (this.first && this.degr >= 361){
+ this.first = 0;
+ this.degr = 180;
+ this.left.css({'-webkit-transform': 'rotate(180deg)'});
+ this.left.css({'transform': 'rotate(180deg)'});
+ this.left.children('.loader-half').addClass('dark');
+ }
+ if (!this.first && this.degr >= 360){
+ this.first = 1;
+ this.degr = 180;
+ this.left.css({'-webkit-transform': 'rotate(0deg)'});
+ this.right.css({'-webkit-transform': 'rotate(180deg)'});
+ this.left.css({'transform': 'rotate(0deg)'});
+ this.right.css({'transform': 'rotate(180deg)'});
+ this.left.children('.loader-half').removeClass('dark');
+
+ this.stop();
+ location.reload();
+ }
+
+ if (this.first){
+ this.right.css({'-webkit-transform': 'rotate('+this.degr+'deg)'});
+ this.right.css({'transform': 'rotate('+this.degr+'deg)'});
+ }
+ else{
+ this.left.css({'-webkit-transform': 'rotate('+this.degr+'deg)'});
+ this.left.css({'transform': 'rotate('+this.degr+'deg)'});
+ }
+ }
+}
+
+VE.navigation.enter_focused = function() {
+ if($('.units').hasClass('active')){
+ location.href=($('.units.active .l-unit.focus .actions-panel__col.actions-panel__edit a').attr('href'));
+ } else {
+ if($(VE.navigation.state.menu_selector + '.focus a').attr('href')){
+ location.href=($(VE.navigation.state.menu_selector + '.focus a').attr('href'));
+ }
+ }
+}
+
+VE.navigation.move_focus_left = function(){
+ var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
+ if(index == -1)
+ index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector)));
+
+ if($('.units').hasClass('active')){
+ $('.units').removeClass('active');
+ if(VE.navigation.state.active_menu == 0){
+ $('.l-menu').addClass('active');
+ } else {
+ $('.l-stat').addClass('active');
+ }
+ index++;
+ }
+
+ $(VE.navigation.state.menu_selector).removeClass('focus');
+
+ if(index > 0){
+ $($(VE.navigation.state.menu_selector)[index-1]).addClass('focus');
+ } else {
+ VE.navigation.switch_menu('last');
+ }
+}
+
+VE.navigation.move_focus_right = function(){
+ var max_index = $(VE.navigation.state.menu_selector).length-1;
+ var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
+ if(index == -1)
+ index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector))) || 0;
+ $(VE.navigation.state.menu_selector).removeClass('focus');
+
+ if($('.units').hasClass('active')){
+ $('.units').removeClass('active');
+ if(VE.navigation.state.active_menu == 0){
+ $('.l-menu').addClass('active');
+ } else {
+ $('.l-stat').addClass('active');
+ }
+ index--;
+ }
+
+ if(index < max_index){
+ $($(VE.navigation.state.menu_selector)[index+1]).addClass('focus');
+ } else {
+ VE.navigation.switch_menu('first');
+ }
+}
+
+VE.navigation.move_focus_down = function(){
+ var max_index = $('.units .l-unit:not(.header)').length-1;
+ var index = parseInt($('.units .l-unit').index($('.units .l-unit.focus')));
+
+ if($('.l-menu').hasClass('active') || $('.l-stat').hasClass('active')){
+ $('.l-menu').removeClass('active');
+ $('.l-stat').removeClass('active');
+ $('.units').addClass('active');
+ index--;
+
+ if(index == -2)
+ index = -1;
+ }
+
+ if(index < max_index){
+ $('.units .l-unit.focus').removeClass('focus');
+ $($('.units .l-unit:not(.header)')[index+1]).addClass('focus');
+
+ $('html, body').animate({
+ scrollTop: $('.units .l-unit.focus').offset().top - 200
+ }, 80);
+ }
+}
+
+VE.navigation.move_focus_up = function(){
+ var index = parseInt($('.units .l-unit:not(.header)').index($('.units .l-unit.focus')));
+
+ if(index == -1)
+ index = 0;
+
+ if($('.l-menu').hasClass('active') || $('.l-stat').hasClass('active')){
+ $('.l-menu').removeClass('active');
+ $('.l-stat').removeClass('active');
+ $('.units').addClass('active');
+ index++;
+ }
+
+ if(index > 0){
+ $('.units .l-unit.focus').removeClass('focus');
+ $($('.units .l-unit:not(.header)')[index-1]).addClass('focus');
+
+ $('html, body').animate({
+ scrollTop: $('.units .l-unit.focus').offset().top - 200
+ }, 80);
+ }
+}
+
+VE.navigation.switch_menu = function(position){
+ position = position || 'first'; // last
+
+ if(VE.navigation.state.active_menu == 0){
+ VE.navigation.state.active_menu = 1;
+ VE.navigation.state.menu_selector = '.l-stat__col';
+ VE.navigation.state.menu_active_selector = '.l-stat__col--active';
+ $('.l-menu').removeClass('active');
+ $('.l-stat').addClass('active');
+
+ if(position == 'first'){
+ $($(VE.navigation.state.menu_selector)[0]).addClass('focus');
+ } else {
+ var max_index = $(VE.navigation.state.menu_selector).length-1;
+ $($(VE.navigation.state.menu_selector)[max_index]).addClass('focus');
+ }
+ } else {
+ VE.navigation.state.active_menu = 0;
+ VE.navigation.state.menu_selector = '.l-menu__item';
+ VE.navigation.state.menu_active_selector = '.l-menu__item--active';
+ $('.l-menu').addClass('active');
+ $('.l-stat').removeClass('active');
+
+ if(position == 'first'){
+ $($(VE.navigation.state.menu_selector)[0]).addClass('focus');
+ } else {
+ var max_index = $(VE.navigation.state.menu_selector).length-1;
+ $($(VE.navigation.state.menu_selector)[max_index]).addClass('focus');
+ }
+ }
+}
+
+VE.notifications.get_list = function(){
+/// TODO get notifications only once
+ $.ajax({
+ url: "/list/notifications/?ajax=1",
+ dataType: "json"
+ }).done(function(data) {
+ var acc = [];
+
+ $.each(data, function(i, elm){
+ var tpl = Tpl.get('notification', 'WEB');
+ if(elm.ACK == 'no')
+ tpl.set(':UNSEEN', 'unseen');
+ else
+ tpl.set(':UNSEEN', '');
+
+ tpl.set(':ID', elm.ID);
+ tpl.set(':TYPE', elm.TYPE);
+ tpl.set(':TOPIC', elm.TOPIC);
+ tpl.set(':NOTICE', elm.NOTICE);
+ acc.push(tpl.finalize());
+ });
+
+ $('.notification-container').html(acc.done()).show();
+
+ $('.notification-container .mark-seen').click(function(event){
+ /// TODO add token
+ VE.notifications.mark_seen($(event.target).attr('id').replace("notification-", ""));
+// VE.notifications.delete($(event.target).attr('id').replace("notification-", ""));
+ });
+
+ });
+}
+
+
+VE.notifications.delete = function(id){
+ $('#notification-'+id).parents('li').remove();
+ $.ajax({
+ url: "/delete/notification/?delete=1¬ification_id="+id+"&token="+$('#token').attr('token')
+ });
+}
+
+VE.notifications.mark_seen = function(id){
+ $('#notification-'+id).parents('li').removeClass('unseen');
+ $.ajax({
+ url: "/delete/notification/?notification_id="+id+"&token="+$('#token').attr('token')
+ });
+ if($('.notification-container .unseen').length == 0)
+ $('.l-profile__notifications').removeClass('updates');
+}
+
+
+VE.navigation.init = function(){
+ if($('.l-menu__item.l-menu__item--active').length){
+// VE.navigation.switch_menu();
+ VE.navigation.state.active_menu = 0;
+ VE.navigation.state.menu_selector = '.l-menu__item';
+ VE.navigation.state.menu_active_selector = '.l-menu__item--active';
+ $('.l-menu').addClass('active');
+ $('.l-stat').removeClass('active');
+ } else {
+ $('.l-stat').addClass('active');
+ }
+}
+
+VE.navigation.shortcut = function(elm){
+ var action = elm.attr('key-action');
+
+ if(action == 'js'){
+ var e = elm.find('.data-controls');
+ VE.core.dispatch(true, e, 'click');
+ }
+ if(action == 'href') {
+ location.href=elm.find('a').attr('href');
+ }
+}
+
VE.helpers.extendPasswordFields();
+
+
diff --git a/web/js/file_manager.js b/web/js/file_manager.js
index 7a532f87b..c551b21c2 100644
--- a/web/js/file_manager.js
+++ b/web/js/file_manager.js
@@ -1,9 +1,13 @@
var FM = {};
+FM.Env = {};
+
GLOBAL.ajax_url = '/file_manager/fm_api.php';
FM.DIR_MARKER = ' /';
+FM.errorMessageTimeout = 3500;
+
FM.CURRENT_TAB = '';
FM.CURRENT_A_LINE = -1;
FM.CURRENT_B_LINE = -1;
@@ -25,21 +29,88 @@ FM.ORDER_BOX_B = $('.context-menu.sort-order.tab-b');
FM.ORDER_TAB_A = 'type_asc';
FM.ORDER_TAB_B = 'type_asc';
+FM.Env.RELOAD_IN_TIME = false;
+
FM.TAB_A_CURRENT_PATH = GLOBAL.TAB_A__PATH;
FM.TAB_B_CURRENT_PATH = GLOBAL.TAB_B_PATH;
FM.IMAGES = {'A':[], 'B': []};
+FM.RELOAD_IN_TIME_SECONDS = 3;
+
FM.IMG_FILETYPES = 'png, jpg, jpeg, gif';
+FM.SUPPORTED_ARCHIEVES = [
+ 'zip', 'tgz', 'tar.gz',
+ 'gzip', 'tbz', 'tar.bz',
+ 'gz', 'zip', 'tar', 'rar'
+];
+
+FM.EDITABLE_FILETYPES = [
+ 'txt', 'php', 'js', 'html'
+];
+
+FM.EDITABLE_MIMETYPES = [
+ 'application/emma+xml',
+ 'application/epp+xml',
+ 'application/javascript',
+ 'application/json',
+ 'application/jsonml+json ',
+ 'application/lost+xml',
+ 'application/marc',
+ 'application/msword',
+ 'application/sru+xml',
+ 'application/vnd.android.package-archive',
+ 'text/csv',
+ 'text/css',
+ 'text/javascript',
+ 'text/html',
+ 'text/x-java-source'
+];
+
+FM.EDITABLE_MIMETYPES_MASKS = [
+ /(.)*text(.)*/,
+ /(.)*inode(.)*/
+];
+
+FM.preselectedItems = {'A': [], 'B': []};
+
FM.directoryNotAvailable = function(reply) {
- alert('Directory not available'); // todo: translate
+ var tpl = Tpl.get('popup_alert', 'FM');
+ tpl.set(':TEXT', App.Constants.FM_DIRECTORY_NOT_AVAILABLE);
+
+ FM.popupOpen(tpl.finalize());
}
FM.showError = function(type, message) {
- alert(message);
+ if (FM.isPopupOpened()) {
+ var ref = FM.getPopupReference();
+ if (ref.find('.warning-message').length > 0) {
+ ref.find('.warning-message').html('' + message + '
');
+ ref.find('.warning-message').show();
+
+ clearInterval(FM.Env.errorMessageHideTimeout);
+ FM.Env.errorMessageHideTimeout =
+ setTimeout(function() {
+ ref.find('.warning-message').fadeOut();
+ }, FM.errorMessageTimeout);
+
+ return;
+ }
+
+ if (ref.find('.results').length > 0) {
+ ref.find('.results').html(message);
+ }
+ }
+ else {
+ FM.popupClose();
+ var tpl = Tpl.get('popup_alert', 'FM');
+ tpl.set(':TEXT', message);
+
+ FM.popupOpen(tpl.finalize());
+ }
}
FM.formatPath = function(dir) {
@@ -66,64 +137,175 @@ FM.init = function() {
FM.TAB_A_CURRENT_PATH = FM.formatPath(GLOBAL.START_DIR_A);
FM.TAB_B_CURRENT_PATH = FM.formatPath(GLOBAL.START_DIR_B);
- FM.open(dir_A, FM.TAB_A);
- FM.open(dir_B, FM.TAB_B);
+ FM.open(dir_A, FM.TAB_A, function() {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
+ });
+ FM.open(dir_B, FM.TAB_B, function() {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
+ });
+
+
}
FM.setActive = function(index, box) {
var tab = FM.getTabLetter(box);
$(box + ' .selected').removeClass('selected');
- $(box).find('li:eq('+index+')').addClass('selected');
- //$(box).find('li:eq('+index+')').addClass('selected');
- var w_h = $(window).height();
- var pos = $(box).find('li:eq('+index+')').position();
- console.log(w_h);
- console.log(pos);
- if (pos.top > w_h) {
- $(box).scrollTo($(box).find('li:eq('+index+')'));
- }
- else {
- if (Math.abs(pos.top) > w_h) {
- $(box).scrollTo($(box).find('li:eq('+index+')'));
- }
- }
+ $(box).find('li.dir:eq('+index+')').addClass('selected');
+
+ $(box + ' .active').removeClass('active');
+ $(box).find('li.dir:eq('+index+')').addClass('active');
+
+ var w_offset = $(box).scrollTop();
+ var w_height = $(box).height()
+ var pos = $(box).find('li.selected').position();
+
+ var wwh = w_height - w_offset + pos.top;
+
+ var cur_elm = $(box).find('li.selected').position();
+ var cur_elm_height = $(box).find('li.selected').height();
+
+ $(box).scrollTo(w_offset + cur_elm.top - w_height/2 + cur_elm_height/2);
+
FM['CURRENT_' + tab + '_LINE'] = index;
FM.CURRENT_TAB = box;
+
+ $(FM.preselectedItems[tab]).each(function(i, index) {
+ $(box).find('.dir:eq(' + index + ')').addClass('selected');
+ });
+
+
+ var src = $(box).find('.dir:eq('+index+')').find('.source').val();
+ src = $.parseJSON(src);
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+
+ if (FM.itemIsArchieve(src)) {
+ if($('.menu-'+tab+' .archive.button').first().is(':visible'))
+ $('.menu-'+tab+' .extract-btn').first().show();
+ else
+ $('.menu-'+tab+' .extract-btn.small').show();
+ }
+ else {
+ $('.menu-'+tab+' .extract-btn').hide();
+ }
}
FM.setSecondInactive = function(index, box) {
- //$(box + ' .active').removeClass('selected-inactive');
$(box).find('li:eq('+index+')').addClass('selected-inactive');
FM.BG_LINE = index;
FM.BG_TAB = box;
}
+FM.goBackwards = function() {
+ if (FM.isPopupOpened()) {
+ return;
+ }
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+ $(box).find('.dir:eq(0)').find('.source').val();
+
+ var src = $.parseJSON($(box).find('.dir:eq(0)').find('.source').val());
+ var dir = src.full_path;
+
+ FM.open(dir, box);
+}
+
+FM.goToTop = function() {
+ if (FM.isPopupOpened()) {
+ return;
+ }
+ if (FM.isPopupOpened()) {
+ return;
+ }
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var index = 0;
+
+ FM.setActive(index, FM.CURRENT_TAB);
+}
+
+FM.goToBottom = function() {
+ if (FM.isPopupOpened()) {
+ return;
+ }
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var index = $(FM.CURRENT_TAB).find('.dir').length - 1;
+
+ FM.setActive(index, FM.CURRENT_TAB);
+}
+
FM.goUp = function() {
+ if (FM.isPopupOpened()) {
+ return;
+ }
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var index = FM['CURRENT_' + tab + '_LINE'];
index -= 1;
+ /*if (index < 0) {
+ index = $(FM.CURRENT_TAB).find('li.dir').length - 1;
+ }*/
if (index < 0) {
- index = $(FM.CURRENT_TAB).find('li').length - 1;
+ index = 0;
}
-
+
FM.setActive(index, FM.CURRENT_TAB);
}
FM.goDown = function() {
+ if (FM.isPopupOpened()) {
+ return;
+ }
+
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var index = FM['CURRENT_' + tab + '_LINE'];
index += 1;
- if (index > ($(FM.CURRENT_TAB).find('li').length - 1)) {
- index = 0;
+
+ if (index > ($(FM.CURRENT_TAB).find('li.dir').length - 1)) {
+ index = $(FM.CURRENT_TAB).find('li.dir').length - 1;
}
FM.setActive(index, FM.CURRENT_TAB);
}
+// reloads provided tab
+// reloads opposite tab if its needed
+FM.openAndSync = function(dir, box, callback, forceOppositeSync) {
+ var tab = FM.getTabLetter(box);
-FM.open = function(dir, box) {
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ var oppositeSyncNeeded = false;
+
+ if (FM.TAB_A_CURRENT_PATH == FM.TAB_B_CURRENT_PATH) {
+ oppositeSyncNeeded = true;
+ }
+
+ if ('undefined' != typeof forceOppositeSync) {
+ oppositeSyncNeeded = forceOppositeSync;
+ }
+
+ if (oppositeSyncNeeded) {
+ FM.open(dir, FM['TAB_' + opposite_tab], callback);
+ return FM.open(dir, box, callback);
+ }
+ else {
+ return FM.open(dir, box, callback);
+ }
+}
+
+
+FM.open = function(dir, box, callback) {
var tab = FM.getTabLetter(box);
FM['TAB_'+tab+'_CURRENT_PATH'] = dir;
@@ -132,15 +314,54 @@ FM.open = function(dir, box) {
'dir': dir
};
App.Ajax.request('cd', params, function(reply) {
- if (reply.result) {
+ //var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ FM.preselectedItems[tab] = [];
+ if (reply.result == true) {
var html = FM.generate_listing(reply.listing, box);
}
else {
FM.directoryNotAvailable(reply);
}
+
+ callback && callback(reply);
+
+ var current_pwd = dir.trim() == '' ? FM.ROOT_DIR : dir;
+
+ FM.updateTopLevelPathBar(box, tab, current_pwd);
+
+
+ var path_a = FM['TAB_A_CURRENT_PATH'] == '' ? FM.ROOT_DIR : FM['TAB_A_CURRENT_PATH'];
+ var path_b = FM['TAB_B_CURRENT_PATH'] == '' ? FM.ROOT_DIR : FM['TAB_B_CURRENT_PATH'];
+ var url = '/list/directory/?dir_a='+path_a+'&dir_b='+path_b;
+ history.pushState({}, null, url);
+
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
});
}
+FM.updateTopLevelPathBar = function(box, tab, path) {
+
+ var formattedPath = [];
+ path = path.replace(FM.ROOT_DIR, '');
+ formattedPath.push(''+FM.ROOT_DIR+'');
+
+ var fullDirPath = FM.ROOT_DIR;
+ $.each(path.split('/'), function(i, part) {
+ if (part.trim() == '') {
+ return;
+ }
+ fullDirPath += '/' + part;
+
+ fullDirPath = fullDirPath.replace(/\/\//g, '/');
+
+ formattedPath.push(' '+part+'');
+ });
+
+ $('.pwd-tab-' + tab).html(formattedPath.join(' / '));
+}
+
FM.isItemFile = function(item) {
return item.type == 'f';
}
@@ -149,6 +370,11 @@ FM.isItemDir = function(item) {
return item.type == 'd';
}
+FM.isItemLink = function(item) {
+ return item.type == 'l';
+}
+
+
FM.getFileType = function(name) {
var filetype = name.split('.').pop().toLowerCase();
return filetype.length > 6 || name.indexOf('.') <= 0 ? '' : filetype;
@@ -156,14 +382,15 @@ FM.getFileType = function(name) {
FM.sortItems = function(items, box) {
var sorted = [];
-
+
var files = [];
var dirs = [];
var combined = []
-
+
$.each(items, function(i, o) {
if (i > 0) { // i == 0 means first .. element in list
- if (FM.isItemFile(o)) {
+ if (FM.isItemFile(o) || FM.isItemLink(o)) {
+ o.filetype = FM.getFileType(o.name);
files.push(o);
}
else {
@@ -172,16 +399,15 @@ FM.sortItems = function(items, box) {
}
});
- // var sort_type = $(box).parents('.window').find('.menu').find('.sort-by-v').val();
var sort_type = FM.ORDER_TAB_A;
if($(box).closest('.window').find('.menu').hasClass('menu-right')){
- sort_type = FM.ORDER_TAB_B;
+ sort_type = FM.ORDER_TAB_B;
}
-
+
switch (sort_type) {
case 'type_asc':
files.sort(function (a, b) {
- return a.name.localeCompare( b.name );
+ return a.filetype.localeCompare( b.filetype );
});
dirs.sort(function (a, b) {
return a.name.localeCompare( b.name );
@@ -190,7 +416,7 @@ FM.sortItems = function(items, box) {
break;
case 'type_desc':
files.sort(function (a, b) {
- return a.name.localeCompare( b.name );
+ return b.filetype.localeCompare( a.filetype );
});
dirs.sort(function (a, b) {
return a.name.localeCompare( b.name );
@@ -203,7 +429,7 @@ FM.sortItems = function(items, box) {
var size_b = parseInt(b.size, 10);
return ((size_a < size_b) ? -1 : ((size_a > size_b) ? 1 : 0));
});
-
+
sorted = $.merge(dirs, files);
break;
case 'size_desc':
@@ -212,7 +438,7 @@ FM.sortItems = function(items, box) {
var size_b = parseInt(b.size, 10);
return ((size_a > size_b) ? -1 : ((size_a < size_b) ? 1 : 0));
});
-
+
sorted = $.merge(dirs, files);
break;
case 'date_asc':
@@ -235,9 +461,9 @@ FM.sortItems = function(items, box) {
var date_b = Date.parseDate(b.date + ' ' + time_b, 'yy-m-d h:i:s');
return ((date_a > date_b) ? -1 : ((date_a < date_b) ? 1 : 0));
});
-
+
break;
-
+
case 'name_asc':
sorted = $.merge(dirs, files);
sorted.sort(function (a, b) {
@@ -250,7 +476,7 @@ FM.sortItems = function(items, box) {
sorted.sort(function (a, b) {
return a.name.localeCompare(b.name);
});
-
+
sorted = sorted.reverse();
break;
default:
@@ -263,35 +489,88 @@ FM.sortItems = function(items, box) {
sorted = $.merge(dirs, files);
break;
}
-
-
+
+
sorted = $.merge([items[0]], sorted);
return sorted;
}
+FM.isFileEditable = function(src, mime) {
+
+ if ('undefined' == typeof src.filetype) {
+ return false;
+ }
+
+ if ($.inArray(src.filetype, FM.EDITABLE_FILETYPES) != -1) {
+ return true;
+ }
+
+ var mime_type = mime.split(';');
+ mime_type = mime_type[0];
+
+ if ($.inArray(mime_type, FM.EDITABLE_MIMETYPES) != -1) {
+ return true;
+ }
+
+ var editable = false;
+ $.each(FM.EDITABLE_MIMETYPES_MASKS, function(i, mask) {
+ if (mime_type.search(mask) != -1) {
+ editable = true;
+ }
+ });
+
+ return editable;
+}
+
+FM.editFileFromSubcontext = function(elm) {
+ var elm = $(elm).hasClass('dir') ? $(elm) : $(elm).closest('.dir');
+ var src = $.parseJSON($(elm).find('.source').val());
+
+ var myWindow = window.open('/edit/file/?path=' + src.full_path, '_blank');//, src.full_path, "width=900, height=700");
+}
+
+FM.downloadFileFromSubcontext = function(elm) {
+ var elm = $(elm).hasClass('dir') ? $(elm) : $(elm).closest('.dir');
+ var src = $.parseJSON($(elm).find('.source').val());
+
+ var path = src.full_path;
+ var win = window.open('/download/file/?path=' + path, '_blank');
+ win.focus();
+}
+
FM.openFile = function(dir, box, elm) {
var tab = FM.getTabLetter(box);
- FM['TAB_'+tab+'_CURRENT_PATH'] = dir;
-
var elm = $(elm).hasClass('dir') ? $(elm) : $(elm).closest('.dir');
var src = $.parseJSON($(elm).find('.source').val());
- var myWindow = window.open('/edit/file/?path=' + src.full_path, '_blank');//, src.full_path, "width=900, height=700");
- /*var params = {
- 'dir': dir
+ if (FM.isItemPseudo(src)) {
+ return FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]);
+ }
+
+ var params = {
+ dir: src.full_path
};
- App.Ajax.request('open_file', params, function(reply) {
+
+ App.Ajax.request('check_file_type', params, function(reply) {
if (reply.result) {
-
- //var html = FM.generate_listing(reply.listing, box);
+ if (FM.isFileEditable(src, reply.data)) {
+ var myWindow = window.open('/edit/file/?path=' + src.full_path, '_blank');//, src.full_path, "width=900, height=700");
+ }
+ else {
+ var path = src.full_path;
+ var win = window.open('/download/file/?path=' + path, '_blank');
+ //win.focus();
+ }
}
else {
- //FM.directoryNotAvailable(reply);
- alert('Cannot open file');
+ // force download file
+ var path = src.full_path;
+ var win = window.open('/download/file/?path=' + path, '_blank');
+ //win.focus();
}
- });*/
+ });
}
FM.getTabLetter = function(box) {
@@ -303,10 +582,14 @@ FM.getTabLetter = function(box) {
return tab;
}
+FM.toggleSubContextMenu = function(ref) {
+ $(ref).find('.subcontext-menu').toggleClass('subcontext-menu-hidden');
+}
+
FM.generate_listing = function(reply, box) {
var tab = FM.getTabLetter(box);
FM.IMAGES[tab] = [];
-
+
var acc = [];
if (reply.length == 0) {
reply = [{
@@ -319,7 +602,7 @@ FM.generate_listing = function(reply, box) {
date: ''
}];
}
-
+
var path_arr = FM['TAB_'+tab+'_CURRENT_PATH'].split('/');
path_arr = path_arr.filter(function(v){return v!==''});
path_arr.pop();
@@ -327,12 +610,15 @@ FM.generate_listing = function(reply, box) {
if (back_path == FM.ROOT_DIR || path_arr.length < FM.ROOT_DIR.split('/').length) {
back_path = '';//FM.ROOT_DIR;
}
-
+
reply = FM.sortItems(reply, box);
+
$(reply).each(function(i, o) {
var path = FM.formatPath(FM['TAB_'+tab+'_CURRENT_PATH']+'/'+o.name);
var cl_act = o.type == 'd' ? 'onClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"';
-
+ //var cl_act = o.type == 'd' ? 'onDblClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onDblClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"';
+ //var cl_act = '';
+
if (o.name == '') {
path = FM.formatPath(back_path);
cl_act = o.type == 'd' ? 'onClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"';
@@ -349,15 +635,23 @@ FM.generate_listing = function(reply, box) {
var time = o.time.split('.');
time = time[0];
-
+
+ var psDate = new Date(o.date);
+
o.full_path = path;
- o.filetype = FM.getFileType(o.name);
- if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.filetype.length > 0) {
- FM.IMAGES[tab][FM.IMAGES[tab].length] = {'img': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'thumb': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'id': 'img-'+i};
- cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"';
- }
-
+ o.filetype = FM.getFileType(o.name);
+ if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.filetype.length > 0) {
+ FM.IMAGES[tab][FM.IMAGES[tab].length++] =
+ {
+ 'img': "/view/file/?path="+o.full_path+"&raw=true",
+ 'thumb': "/view/file/?path="+o.full_path+"&raw=true",
+ 'id': 'img-'+i
+ };
+ cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"';
+ }
+
+ var t_index = tab + '_' + i;
var tpl = Tpl.get('entry_line', 'FM');
tpl.set(':CL_ACTION_1', cl_act);
@@ -365,13 +659,27 @@ FM.generate_listing = function(reply, box) {
tpl.set(':NAME', o.name);
tpl.set(':PERMISSIONS', o.permissions);
tpl.set(':OWNER', o.owner);
- tpl.set(':SIZE', o.size);
- tpl.set(':TIME', time);
- tpl.set(':DATE', o.date);
+ tpl.set(':SIZE_VALUE', o.type == 'f' ? FM.humanFileSizeValue(o.size) : ' ');
+ tpl.set(':SIZE_UNIT', o.type == 'f' ? FM.humanFileSizeUnit(o.size) : ' ');
+ tpl.set(':TIME', (psDate.getFullYear() != new Date().getFullYear()) ? psDate.getFullYear() || "" : time);
+ tpl.set(':DATE', o.date.trim() != '' ? App.Constants.FM_TRANSLATED_DATES[psDate.format('mmm')] + psDate.format(' d'): ' '/*o.date*/);
+
+ if (o.name == '..' || o.type == 'd') {
+ tpl.set(':SUBMENU_CLASS', 'hidden');
+ }
+ else {
+ tpl.set(':SUBMENU_CLASS', '');
+ }
+ /*tpl.set(':index', t_index);
+ tpl.set(':index1', t_index);
+ tpl.set(':index2', t_index);*/
if (FM.isItemDir(o)) {
tpl.set(':ITEM_TYPE', 'filetype-dir');
}
+ else if (FM.isItemLink(o)) {
+ tpl.set(':ITEM_TYPE', 'filetype-link');
+ }
else {
tpl.set(':ITEM_TYPE', 'filetype-' + o.filetype);
}
@@ -381,33 +689,470 @@ FM.generate_listing = function(reply, box) {
$(box).html(acc.done());
+ ////////
+ /*if (FM['CURRENT_'+tab+'_LINE'] > -1 && $(box).find('.dir:eq(' + FM['CURRENT_'+tab+'_LINE'] + ')').lrngth > 0) {
+
+ }
+ else {
+ FM['CURRENT_'+tab+'_LINE'] = -1;
+ }*/
FM['CURRENT_'+tab+'_LINE'] = -1;
}
+FM.toggleCheck = function(uid) {
+ var ref = $('#check' + uid);
+ if (ref.length > 0) {
+ $(ref).hasClass('checkbox-selected') ? $(ref).addClass('checkbox-selected') : $(ref).removeClass('checkbox-selected');
+ }
+}
+
FM.fotoramaOpen = function(tab, img_index) {
- console.log('index: ' + img_index);
$('.fotorama').fotorama({
- nav: 'thumbs',
- arrows: true,
- click: true,
- allowfullscreen: true,
- fit: 'scaledown',
- thumbfit: 'scaledown',
- data: FM.IMAGES[tab]
+ nav: 'thumbs',
+ arrows: true,
+ click: true,
+ allowfullscreen: true,
+ fit: 'scaledown',
+ thumbfit: 'scaledown',
+ data: FM.IMAGES[tab]
});
$('.fotorama').on('fotorama:fullscreenexit', function (e, fotorama) {
- $('.fotorama').data('fotorama').destroy();
+ $('.fotorama').data('fotorama').destroy();
});
$('.fotorama').fotorama().data('fotorama').requestFullScreen();
$('.fotorama').fotorama().data('fotorama').show(img_index);
}
+FM.bulkOperation = function(ref) {
+ //console.log(ref);
+ var box = $(ref).parents('.menu').hasClass('menu-left') ? FM.setTabActive(FM.TAB_A, 'skip_highlights') : FM.setTabActive(FM.TAB_B, 'skip_highlights');
+
+ var operation = $(ref).val();
+ if ('function' == typeof FM[operation]) {
+ FM[operation] && FM[operation](ref);
+ }
+
+ $(ref).find('option[value=-1]').attr('selected', true);
+}
+
+FM.checkBulkStatus = function(bulkStatuses, acc) {
+ var status = true;
+ var msg = '';
+ if (bulkStatuses.length == acc.length) {
+ $.each(bulkStatuses, function(i, o) {
+ if (o != true) {
+ msg += ''+o+'
';
+ }
+ });
+
+ if (msg != '') {
+ status = false;
+ }
+ }
+
+ if (status == true) {
+ FM.popupClose();
+ }
+ else {
+ $('#popup .results').show().html(msg);
+ $('#popup .ok').hide();
+ }
+
+ var box = FM['TAB_' + tab];
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box, function(){}, true);
+}
+
+FM.bulkPopupClose = function() {
+ FM.popupClose();
+ FM.open(FM['TAB_A_CURRENT_PATH'], FM['TAB_A']);
+ FM.open(FM['TAB_B_CURRENT_PATH'], FM['TAB_B']);
+}
+
+FM.humanFileSize = function(size) {
+ var sizes = [' Bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB'];
+ for (var i = 1; i < sizes.length; i++) {
+ if (size < Math.pow(1024, i)) return (Math.round((size/Math.pow(1024, i-1))*100)/100) + sizes[i-1];
+ }
+ return size;
+}
+
+FM.humanFileSizeValue = function(size) {
+ var sizes = ['b', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
+ for (var i = 1; i < sizes.length; i++) {
+ if (size < Math.pow(1024, i)) return (Math.round((size/Math.pow(1024, i-1))*100)/100);
+ }
+ return size;
+}
+
+FM.humanFileSizeUnit = function(size) {
+ if (!parseInt(size)) return " ";
+
+ var sizes = ['b', ' kb', ' Mb', ' Gb', ' Tb', ' Pb', ' Eb', ' Zb', ' Yb'];
+ for (var i = 1; i < sizes.length; i++) {
+ if (size < Math.pow(1024, i)) return sizes[i-1];
+ }
+ return sizes[i];
+}
+
+
+FM.bulkCopyDo = function() {
+ var acc = $(FM.CURRENT_TAB).find('.dir.selected');
+ if (acc.length > 0) {
+ //FM.popupClose();
+
+ var cfr_html = '';
+ var numberOfItems = 0;
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ if (!FM.isItemPseudo(o)) {
+ cfr_html += ''+src.name+'
';
+ numberOfItems++;
+ }
+ });
+
+
+ var bulkStatuses = [];
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ //cfr_html += ''+src.name+'
';
+ return;
+ }
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ if (FM.isItemPseudo(src)) {
+ /*return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );*/
+ return;
+ }
+
+ var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ];
+ if (dest == '') {
+ dest = GLOBAL.ROOT_DIR;
+ }
+
+ var action = FM.isItemFile(src) ? 'copy_file' : 'copy_directory';
+
+ var params = {
+ item: src.full_path,
+ filename: src.name,
+ dir: FM['TAB_' + tab + '_CURRENT_PATH'],
+ dir_target: dest
+ };
+
+ App.Ajax.request(action, params, function(reply) {
+ if (reply.result == true) {
+ bulkStatuses.push(true);
+ }
+ else {
+ //FM.showError('copy-items', reply.message);
+ bulkStatuses.push(reply.message);
+ }
+
+ FM.checkBulkStatus(bulkStatuses, acc);
+ });
+ });
+ }
+}
+
+FM.bulkCopy = function() {
+ var acc = $(FM.CURRENT_TAB).find('.dir.selected');
+ if (acc.length > 0) {
+ FM.popupClose();
+
+ var cfr_html = '';
+ var numberOfItems = 0;
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ if (!FM.isItemPseudo(src)) {
+ cfr_html += ''+src.name+'
';
+ numberOfItems++;
+ }
+ });
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+ var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ];
+ if (dest == '') {
+ dest = GLOBAL.ROOT_DIR;
+ }
+
+ var tpl = Tpl.get('popup_bulk_copy', 'FM');
+ tpl.set(':NUMBER_OF_ITEMS', numberOfItems);
+ tpl.set(':DST_FILENAME', dest);
+ //popup_bulk_copy
+
+ FM.popupOpen(tpl.finalize());
+
+ }
+}
+
+FM.bulkRemoveDo = function() {
+ var acc = $(FM.CURRENT_TAB).find('.dir.selected');
+ if (acc.length > 0) {
+ //FM.popupClose();
+
+ var cfr_html = '';
+
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ if (!FM.isItemPseudo(o)) {
+ cfr_html += ''+src.name+'
';
+ }
+ });
+
+ var bulkStatuses = [];
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ if (FM.isItemPseudo(src)) {
+ return;
+ /*return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );*/
+ }
+
+ var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ];
+ if (dest == '') {
+ dest = GLOBAL.ROOT_DIR;
+ }
+
+ var params = {
+ item: src.full_path,
+ dir: FM['TAB_' + tab + '_CURRENT_PATH']
+ };
+
+ App.Ajax.request('delete_files', params, function(reply) {
+ if (reply.result == true) {
+ bulkStatuses.push(true);
+ }
+ else {
+ //FM.showError('copy-items', reply.message);
+ bulkStatuses.push(reply.message);
+ }
+
+ FM.checkBulkStatus(bulkStatuses, acc);
+ });
+ });
+
+ }
+}
+
+FM.bulkRemove = function() {
+ var acc = $(FM.CURRENT_TAB).find('.dir.selected');
+ if (acc.length > 0) {
+ FM.popupClose();
+
+ var cfr_html = '';
+ var numberOfItems = 0;
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ if (!FM.isItemPseudo(src)) {
+ cfr_html += ''+src.name+'
';
+ numberOfItems++;
+ }
+ });
+
+ var tpl = Tpl.get('popup_bulk_remove', 'FM');
+ tpl.set(':NUMBER_OF_ITEMS', numberOfItems);
+ //tpl.set(':DST_FILENAME', dest);
+
+ FM.popupOpen(tpl.finalize());
+ }
+}
+
+
+FM.bulkRemove11111 = function() {
+ var acc = $(FM.CURRENT_TAB).find('.dir.selected');
+ if (acc.length > 0) {
+ //FM.popupClose();
+
+ var cfr_html = '';
+
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ if (!FM.isItemPseudo(o)) {
+ cfr_html += ''+src.name+'
';
+ }
+ });
+
+ var tpl = Tpl.get('popup_bulk', 'FM');
+ tpl.set(':ACTION', App.Constants.FM_YOU_ARE_REMOVING);
+ tpl.set(':TEXT', cfr_html);
+
+ FM.popupOpen(tpl.finalize());
+
+ var bulkStatuses = [];
+ $.each(acc, function(i, o) {
+ var ref = $(o);
+ var src = $(ref).find('.source').val();
+ src = $.parseJSON(src);
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ if (FM.isItemPseudo(src)) {
+ return;
+ /*return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );*/
+ }
+
+ var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ];
+ if (dest == '') {
+ dest = GLOBAL.ROOT_DIR;
+ }
+
+ var params = {
+ item: src.full_path,
+ dir: FM['TAB_' + tab + '_CURRENT_PATH']
+ };
+
+ App.Ajax.request('delete_files', params, function(reply) {
+ if (reply.result == true) {
+ bulkStatuses.push(true);
+ }
+ else {
+ //FM.showError('copy-items', reply.message);
+ bulkStatuses.push(reply.message);
+ }
+
+ FM.checkBulkStatus(bulkStatuses, acc);
+ });
+ });
+
+ }
+}
+
+FM.toggleAllItemsSelected = function() {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+ var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
+ var dir_items = $(FM['TAB_' + tab] ).find('.dir');
+ if (selected.length == dir_items.length) {
+ $(box).find('.dir').removeClass('selected');
+ var index = FM['CURRENT_' + tab + '_LINE'];
+ $(box).find('.dir:eq(' + index + ')').addClass('selected');
+
+ $(FM.preselectedItems[tab]).each(function(i, index) {
+ $(box).find('.dir:eq(' + index + ')').addClass('selected');
+ });
+ }
+ else {
+ $(box).find('.dir').addClass('selected');
+ }
+}
+
+FM.selectCurrentElementAndGoToNext = function () {
+ if (FM.isPopupOpened()) {
+ return;
+ }
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+
+ var index = FM['CURRENT_' + tab + '_LINE'];
+
+ if ($.inArray(index, FM.preselectedItems[tab]) != -1) {
+ FM.preselectedItems[tab] = $.grep(FM.preselectedItems[tab], function(i) {
+ return i != index;
+ });
+
+ $(box).find('.dir:eq(' + index + ')').removeClass('selected');
+ //FM.preselectedItems[tab].push(index);
+ }
+ else {
+ $(box).find('.dir:eq(' + index + ')').addClass('selected');
+ FM.preselectedItems[tab].push(index);
+ }
+
+ FM.goDown();
+}
+
FM.selectItem = function(item, box) {
+ //console.log(item);
+ /*if ($(item).hasClass('ch-toggle')) {
+ if ($(item).parents('.dir').prev('.dir').length == 0) {
+ var checked = $(item).parents('.dir').find('.ch-toggle').is(':checked');
+ $(item).parents('.listing').find('.ch-toggle').prop('checked', checked);
+ }
+
+ return;
+ }*/
+
+
+
+ if (FM.CURRENT_TAB == FM.TAB_A) {
+ FM.setTabActive(FM.TAB_B, 'skip_highlights');
+ $(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive');
+ // tmp
+ //$(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive');
+ $(FM.TAB_B).find('.selected').removeClass('selected');
+
+ //$(FM.TAB_A).find('.selected').addClass('selected-inactive');
+ $(FM.TAB_B).find('.selected').addClass('selected-inactive').removeClass('selected');
+ }
+ else {
+ FM.setTabActive(FM.TAB_A, 'skip_highlights');
+ $(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive');
+ //$(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive');
+ //$(FM.TAB_B).find('.selected').addClass('selected-inactive');
+ $(FM.TAB_A).find('.selected').removeClass('selected');
+
+ $(FM.TAB_A).find('.selected').addClass('selected-inactive').removeClass('selected');
+ }
+
$(box).find('.active').removeClass('active');
$(box).find('.selected').removeClass('selected');
+
+ //
+ // tmp
+ //$(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive');
+ //$(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive');
+
/*if ($(item).hasClass('active')) {
$(item).removeClass('active');
}
@@ -421,10 +1166,130 @@ FM.selectItem = function(item, box) {
$(item).addClass('selected');
}
+
+
FM.setTabActive(box);
+
+
+
+ var item = $(item).hasClass('dir') ? item : $(item).parents('.dir');
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var src = $(item).find('.source').val();
+ src = $.parseJSON(src);
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+
+
+
+ if (FM.itemIsArchieve(src)) {
+ if($('.menu-'+tab+' .archive.button').first().is(':visible'))
+ $('.menu-'+tab+' .extract-btn').first().show();
+ else
+ $('.menu-'+tab+' .extract-btn.small').show();
+ }
+ else {
+ $('.menu-'+tab+' .extract-btn').hide();
+ }
+
+}
+FM.isItemPseudo = function(item) {
+ if (item.name == '.' || item.name == '..') {
+ return true;
+ }
+ return false;
}
+FM.itemIsArchieve = function(item) {
+
+ if ($.inArray(item.filetype, FM.SUPPORTED_ARCHIEVES) != -1) {
+ return true;
+ }
+
+ return false;
+}
+
+FM.unpackItem = function() {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+ var selected = $(FM['TAB_' + tab] ).find('.dir.active');
+ if (selected.length == 0) {
+ //return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_SELECTED
+ );
+ }
+
+
+ var src = selected.find('.source').val();
+ src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_SELECTED
+ );
+ }
+
+ if (!FM.itemIsArchieve(src)) {
+ return FM.displayError(
+ App.Constants.FM_FILE_TYPE_NOT_SUPPORTED
+ );
+ }
+
+ var dst = FM['TAB_' + tab + '_CURRENT_PATH'];
+ if (dst == '') {
+ dst = GLOBAL.ROOT_DIR;
+ }
+
+ var tpl = Tpl.get('popup_unpack', 'FM');
+ tpl.set(':FILENAME', src.name);
+ tpl.set(':DST_DIRNAME', (dst).replace('//', '/'));
+ FM.popupOpen(tpl.finalize());
+}
+
+FM.packItem = function() {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+ var selected = $(FM['TAB_' + tab] ).find('.dir.active');
+ if (selected.length == 0) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_SELECTED
+ );
+ }
+
+
+ var src = selected.find('.source').val();
+ src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+
+ var dst = FM['TAB_' + tab + '_CURRENT_PATH'];
+ if (dst == '') {
+ dst = GLOBAL.ROOT_DIR;
+ }
+
+ var tpl = Tpl.get('popup_pack', 'FM');
+ tpl.set(':FILENAME', src.name);
+ tpl.set(':DST_DIRNAME', (dst + '/' + src.name + '.tar.gz').replace('//', '/'));
+ FM.popupOpen(tpl.finalize());
+}
+
+
+
FM.switchTab = function() {
+ if (FM.isPopupOpened()) {
+ return;
+ }
+
if (FM.CURRENT_TAB == FM.TAB_A) {
FM.setTabActive(FM.TAB_B);
$(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive');
@@ -435,15 +1300,38 @@ FM.switchTab = function() {
$(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive');
$(FM.TAB_B).find('.selected').addClass('selected-inactive');
}
+
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
}
-FM.setTabActive = function(box) {
+FM.setTabActive = function(box, action) {
FM.CURRENT_TAB = box;
$('.window.active').removeClass('active');
$('.listing-left.active').removeClass('active');
$('.listing-right.active').removeClass('active');
$(FM.CURRENT_TAB).addClass('active');
$(FM.CURRENT_TAB).closest('.window').addClass('active');
+
+ if (action == 'skip_highlights') {
+ return true;
+ }
+
+ if (FM.CURRENT_TAB == FM.TAB_A) {
+ $(FM.TAB_B).find('.selected').addClass('selected-inactive').removeClass('selected');
+ $(FM.TAB_A).find('.selected-inactive').addClass('selected').removeClass('selected-inactive');
+
+ if ($(FM.TAB_A).find('.selected-inactive').length == 0 && $(FM.TAB_A).find('.selected').length == 0) {
+
+ }
+ }
+ else {
+ $(FM.TAB_A).find('.selected').addClass('selected-inactive').removeClass('selected');
+ $(FM.TAB_B).find('.selected-inactive').addClass('selected').removeClass('selected-inactive');
+ }
}
FM.confirmRename = function() {
@@ -451,7 +1339,9 @@ FM.confirmRename = function() {
var box = FM['TAB_' + tab];
var selected = $(FM['TAB_' + tab] ).find('.dir.active');
if (!selected) {
- return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
}
var src = selected.find('.source').val();
@@ -460,23 +1350,27 @@ FM.confirmRename = function() {
var target_name = $('#rename-title').val();
if (target_name.trim().length == 0) {
- return alert('Cannot be renamed.');
+ return FM.displayError(
+ App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY
+ );
}
+
+ var action = FM.isItemFile(src) ? 'rename_file' : 'rename_directory';
var params = {
item: src.name,
target_name: target_name,
- dir: FM['TAB_' + tab + '_CURRENT_PATH']
+ dir: FM['TAB_' + tab + '_CURRENT_PATH'] + '/'
};
- App.Ajax.request('rename_file', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
+ App.Ajax.request(action, params, function(reply) {
+ if (reply.result == true) {
+ FM.popupClose();
+ FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box);
}
else {
FM.showError('rename-items', reply.message);
}
- FM.popupClose();
});
}
@@ -484,44 +1378,195 @@ FM.renameItems = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var selected = $(FM['TAB_' + tab] ).find('.dir.active');
if (selected.length == 0) {
- return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
}
var src = selected.find('.source').val();
src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
var tpl = Tpl.get('popup_rename', 'FM');
tpl.set(':FILENAME', src.name);
+ tpl.set(':NEW_NAME', src.name);
FM.popupOpen(tpl.finalize());
- /*var tab = FM.getTabLetter(FM.CURRENT_TAB);
- var box = FM.CURRENT_TAB;
-
- var delete_list = $(box).find('.active');
- if (delete_list.length == 0) {
- return FM.showError('hint', 'No selected items');
- }
-
- $(delete_list).each(function(i, o) {
- var opt = $(o).find('.source').val();
- opt = $.parseJSON(opt);
- prompt('Rename "' + opt.name + '" to:');
- });*/
+}
+
+FM.isPopupOpened = function() {
+ return $('#popup').length > 0 ? true : false;
}
FM.popupOpen = function(html) {
- $('').attr('id', 'popup').html(html).flayer();
+ FM.popupClose();
+ //$('#popup').flayer_close();
+ $('
').attr('id', 'popup').html(html).flayer({
+ afterStart: function(elm) {
+ elm.find('input[type="text"]:first').focus();
+ }
+ });
}
FM.popupClose = function() {
+ clearTimeout(FM.Env.errorMessageHideTimeout);
return $('#popup').flayer_close();
}
FM.copyItems = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
+ if (selected.length == 0) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+ if (selected.length > 1) { // multi operation
+ return FM.bulkCopy();
+ }
+
+
+ var src = selected.find('.source').val();
+ src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ var dst = FM['TAB_' + opposite_tab + '_CURRENT_PATH'];
+ if (dst == '') {
+ dst = GLOBAL.ROOT_DIR;
+ }
+
+ var tpl = Tpl.get('popup_copy', 'FM');
+ tpl.set(':SRC_FILENAME', src.full_path);
+ tpl.set(':DST_FILENAME', (dst + '/' + src.name).replace('//', '/'));
+ FM.popupOpen(tpl.finalize());
+}
+
+FM.confirmUnpackItem = function () {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+ var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
+ if (selected.length == 0) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_SELECTED
+ );
+ }
+
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ var src = selected.find('.source').val();
+ src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_SELECTED
+ );
+ }
+
+ if (!FM.itemIsArchieve(src)) {
+ return FM.displayError(
+ App.Constants.FM_FILE_TYPE_NOT_SUPPORTED
+ );
+ }
+
+ var dst = FM['TAB_' + tab + '_CURRENT_PATH'];
+ if (dst == '') {
+ dst = GLOBAL.ROOT_DIR;
+ }
+
+ var params = {
+ item: src.full_path,
+ filename: src.name,
+ dir: FM['TAB_' + tab + '_CURRENT_PATH'],
+ dir_target: $('#unpack-destination').val()
+ };
+
+ App.Ajax.request('unpack_item', params, function(reply) {
+ if (reply.result == true) {
+ FM.popupClose();
+ FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]);
+ FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]);
+ }
+ else {
+ FM.showError('unpack_item', reply.message);
+ }
+ });
+}
+
+FM.confirmPackItem = function () {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var box = FM['TAB_' + tab];
+ var selected = $(FM['TAB_' + tab] ).find('.dir.active');
+ if (selected.length == 0) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+ var opposite_tab = 'A';
+ if (tab == 'A') {
+ opposite_tab = 'B';
+ }
+
+ var src = selected.find('.source').val();
+ src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+ var dst = FM['TAB_' + tab + '_CURRENT_PATH'];
+ if (dst == '') {
+ dst = GLOBAL.ROOT_DIR;
+ }
+
+ var params = {
+ item: src.full_path,
+ filename: src.name,
+ dir: FM['TAB_' + tab + '_CURRENT_PATH'],
+ dir_target: $('#pack-destination').val()
+ };
+
+
+ App.Ajax.request('pack_item', params, function(reply) {
+ if (reply.result == true) {
+ FM.popupClose();
+ FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]);
+ FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]);
+ }
+ else {
+ FM.showError('unpack_item', reply.message);
+ }
+ });
+}
+
+FM.confirmCopyItems = function () {
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
if (!selected) {
- return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
}
var opposite_tab = 'A';
@@ -531,39 +1576,64 @@ FM.copyItems = function() {
var src = selected.find('.source').val();
src = $.parseJSON(src);
- console.log(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
+
+ var dest = $('#copy_dest').val();
+ if (dest == '') {
+ dest = GLOBAL.ROOT_DIR;
+ }
+
+ var action = FM.isItemFile(src) ? 'copy_file' : 'copy_directory';
var params = {
item: src.full_path,
filename: src.name,
dir: FM['TAB_' + tab + '_CURRENT_PATH'],
- dir_target: FM['TAB_' + opposite_tab + '_CURRENT_PATH']
+ dir_target: dest
};
- App.Ajax.request('copy_files', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]);
- FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]);
+ App.Ajax.request(action, params, function(reply) {
+ if (reply.result == true) {
+ FM.popupClose();
+ // FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]);
+ FM.openAndSync(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]);
}
else {
- FM.showError('delete-items', reply.message);
+ FM.showError('copy-items', reply.message);
}
- //FM.popupClose();
});
}
FM.downloadFiles = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
- var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
+ var selected = $(FM['TAB_' + tab] ).find('.dir.active');
if (!selected) {
- return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
}
var src = selected.find('.source').val();
src = $.parseJSON(src);
-
- if (src.type != 'f') {
- return alert('Only files can be dosnloaded in this version');
+
+ if (FM.isItemPseudo(src) || FM.isItemDir(src)) {
+ //alert('Folder downloads are in progress atm');
+ return FM.displayError(
+ App.Constants.FM_DIRECTORY_DOWNLOAD_NOT_READY
+ );
+ }
+
+ if (FM.isItemPseudo(src)) {
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
}
var path = src.full_path;
@@ -581,11 +1651,19 @@ FM.confirmDelete = function() {
var box = FM['TAB_' + tab];
var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
if (!selected) {
- return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
}
var src = selected.find('.source').val();
src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
var params = {
item: src.full_path,
@@ -593,13 +1671,13 @@ FM.confirmDelete = function() {
};
App.Ajax.request('delete_files', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
+ if (reply.result == true) {
+ FM.popupClose();
+ FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box);
}
else {
FM.showError('delete-items', reply.message);
}
- FM.popupClose();
});
}
@@ -607,62 +1685,91 @@ FM.deleteItems = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
if (selected.length == 0) {
- return alert('No file selected');
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
}
+ if (selected.length > 1) { // multi operation
+ return FM.bulkRemove();
+ }
+
+
+
var src = selected.find('.source').val();
src = $.parseJSON(src);
+
+ if (FM.isItemPseudo(src)) {
+ return FM.displayError(
+ App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED
+ );
+ }
var tpl = Tpl.get('popup_delete', 'FM');
tpl.set(':FILENAME', src.name);
FM.popupOpen(tpl.finalize());
+}
-
- /*var tab = FM.getTabLetter(FM.CURRENT_TAB);
- var confirmed = confirm(App.i18n.ARE_YOU_SURE);
- var box = FM.CURRENT_TAB;
-
- var delete_list = $(box).find('.selected');
- if (delete_list.length == 0) {
- return FM.showError('hint', 'No selected items');
+
+FM.displayError = function(msg) {
+ if (FM.isPopupOpened()) {
+ var ref = FM.getPopupReference();
+ if (ref.find('.warning-message').length > 0) {
+ ref.find('.warning-message').html('
' + msg + '
');
+ ref.find('.warning-message').show();
+
+ clearInterval(FM.Env.errorMessageHideTimeout);
+ FM.Env.errorMessageHideTimeout =
+ setTimeout(function() {
+ ref.find('.warning-message').fadeOut();
+ }, FM.errorMessageTimeout);
+ return;
+ }
}
-
- var params = {
- items: [],
- dir: FM['TAB_' + tab + '_CURRENT_PATH']
- };
- $(delete_list).each(function(i, opt){
- var opt = $(o).find('.source').val();
- opt = $.parseJSON(opt);
- params.items.push(opt.name);
- });
- App.Ajax.request('delete_files', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
+ FM.popupClose();
+ var tpl = Tpl.get('popup_alert', 'FM');
+ tpl.set(':TEXT', msg);
+
+ FM.popupOpen(tpl.finalize());
+ //return alert(msg);
+}
+
+FM.triggerRefreshActionTrick = function() {
+ // reload-in-time
+ $('#reload-in-time').remove();
+ FM.Env.RELOAD_IN_TIME = true;
+ var tpl = Tpl.get('reload_in_time', 'FM');
+ //tpl.set(':TIME_LEFT', FM.RELOAD_IN_TIME_SECONDS + 1);
+
+ $('body').append(tpl.finalize());
+
+ var ref = $('#reload-in-time').find('.reload-in-time-counter');
+
+ var timeleft = FM.RELOAD_IN_TIME_SECONDS;
+ FM.Env.reload_in_time_interval =
+ setInterval(function() {
+ if (timeleft <= 0) {
+ clearInterval(FM.Env.reload_in_time_interval);
+ $('#reload-in-time').remove();
+ FM.Env.RELOAD_IN_TIME = false;
}
- else {
- FM.showError('delete-items', reply.message);
- }
- });*/
+ //ref.text(timeleft);
+ timeleft -= 1;
+ }, 1000);
}
FM.confirmCreateDir = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var box = FM['TAB_' + tab];
- /*var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
- if (!selected) {
- return alert('No file selected');
- }
-
- var src = selected.find('.source').val();
- src = $.parseJSON(src);*/
var dirname = $('#rename-title').val();
if (dirname.trim().length == 0) {
- return alert('Cannot be created.');
+ return FM.displayError(
+ App.Constants.FM_DIRECTORY_NAME_CANNOT_BE_EMPTY
+ );
}
var params = {
@@ -671,13 +1778,13 @@ FM.confirmCreateDir = function() {
};
App.Ajax.request('create_dir', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
+ if (reply.result == true) {
+ FM.popupClose();
+ FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box);
}
else {
- FM.showError('create-file', reply.message);
+ FM.showError('create-dir', reply.message);
}
- FM.popupClose();
});
}
@@ -686,44 +1793,18 @@ FM.createDir = function() {
var tpl = Tpl.get('popup_create_dir', 'FM');
FM.popupOpen(tpl.finalize());
- /*var dirname = prompt('Enter dir name:');
- if (dirname.trim() != '') {
-
- var box = FM.CURRENT_TAB;
- var tab = FM.getTabLetter(box);
- var params = {
- 'dirname': dirname,
- 'dir': FM['TAB_' + tab + '_CURRENT_PATH']
- };
- App.Ajax.request('create_dir', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
- }
- else {
- FM.showError('create-dir', reply.message);
- }
- });
- }
- else {
- FM.showError('dirname-empty', 'Dirname cannot be empty');
- }*/
}
FM.confirmCreateFile = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var box = FM['TAB_' + tab];
- /*var selected = $(FM['TAB_' + tab] ).find('.dir.selected');
- if (!selected) {
- return alert('No file selected');
- }
-
- var src = selected.find('.source').val();
- src = $.parseJSON(src);*/
var filename = $('#rename-title').val();
if (filename.trim().length == 0) {
- return alert('Cannot be created.');
+ return FM.displayError(
+ App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY
+ );
}
var params = {
@@ -732,13 +1813,13 @@ FM.confirmCreateFile = function() {
};
App.Ajax.request('create_file', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
+ if (reply.result == true) {
+ FM.popupClose();
+ FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box);
}
else {
FM.showError('create-file', reply.message);
}
- FM.popupClose();
});
}
@@ -747,27 +1828,6 @@ FM.createFile = function() {
var tpl = Tpl.get('popup_create_file', 'FM');
FM.popupOpen(tpl.finalize());
- /*var filename = prompt('Enter file name:');
- if (filename.trim() != '') {
-
- var box = FM.CURRENT_TAB;
- var tab = FM.getTabLetter(box);
- var params = {
- 'filename': filename,
- 'dir': FM['TAB_' + tab + '_CURRENT_PATH']
- };
- App.Ajax.request('create_file', params, function(reply) {
- if (reply.result) {
- FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box);
- }
- else {
- FM.showError('create-file', reply.message);
- }
- });
- }
- else {
- FM.showError('filename-empty', 'Filename cannot be empty');
- }*/
}
FM.showOrderBox = function(elm, tab) {
@@ -823,39 +1883,58 @@ FM.reOrderList = function(elm){
FM.ORDER_TAB_B = entity+'_'+direction;
}
- primary_box.find('span').removeClass('selected');
+ primary_box.find('span').removeClass('active');
$(menu).find('.sort-by .entity').html(elm.closest('li').find('span').html());
$(menu).find('.sort-by').removeClass('desc asc').addClass(direction).addClass('sort-by');
- elm.addClass('selected');
+ elm.addClass('active');
primary_box.hide();
FM.open(path, tab);
}
+FM.isPopupOpened = function() {
+ var ref = $('#popup');
+ if (ref.length > 0) {
+ return true;
+ }
+
+ return false;
+}
+
+FM.getPopupReference = function() {
+ var ref = $('#popup');
+
+ return ref;
+}
+
+FM.handlePopupSubmit = function() {
+ try {
+ var method = $('#popup').find('.ok').attr('onClick');
+ if (method) {
+ method = method.replace('\(\);', '').replace('FM.', '');
+ if ('function' == typeof FM[method]) {
+ FM[method]();
+ }
+ }
+ }
+ catch(e) {
+
+ }
+}
+
+FM.handlePopupCancel = function() {
+ FM.popupClose();
+}
+
FM.init();
$(document).ready(function() {
+ $('.progress-container').hide();
- //return alert('statechange: Back');
- /*$(document).bind('keydown.up', function() {
- console.log(1);
- //try{FM.goUp();}catch(e){console.log(e);}
- //console.log(FM);
- FM.goUp();
- });
-
- $(document).bind('keydown.down', function() {
- console.log(1);
- //try{FM.goUp();}catch(e){console.log(e);}
- //console.log(FM);
- FM.goDown();
- });*/
-
-
var ph = $('.window .pwd').outerHeight();
var mh = $('.window .menu').outerHeight();
var wh = $(window).outerHeight();
@@ -863,12 +1942,35 @@ $(document).ready(function() {
$('.window ul').outerHeight(hgt);
+ shortcut.add("Esc",function() {
+ FM.Env.RELOAD_IN_TIME = false;
+ $('#reload-in-time').remove();
+ $('.shortcuts').hide();
+ if (FM.isPopupOpened()) {
+ return FM.handlePopupCancel();
+ }
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+
+ shortcut.add("h", function(){
+ $('.shortcuts').toggle();
+ }, {
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
shortcut.add("Down",function() {
FM.goDown();
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -877,7 +1979,58 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("Left",function() {
+ if (!FM.isPopupOpened()) {
+ FM.setTabActive(FM.TAB_A);
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
+ }
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("Right",function() {
+ if (!FM.isPopupOpened()) {
+ FM.setTabActive(FM.TAB_B);
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
+ }
+
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("Home",function() {
+ FM.goToTop();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("End",function() {
+ FM.goToBottom();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
'target': document
});
@@ -886,11 +2039,42 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("Space",function() {
+ FM.selectCurrentElementAndGoToNext();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("Insert",function() {
+ FM.selectCurrentElementAndGoToNext();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+
+ shortcut.add("ctrl+a",function() {
+ FM.toggleAllItemsSelected();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
'target': document
});
shortcut.add("Enter",function() {
+ if (FM.isPopupOpened()) {
+ return FM.handlePopupSubmit();
+ }
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var elm = $(FM.CURRENT_TAB).find('.dir:eq('+FM['CURRENT_'+tab+'_LINE']+')');
@@ -901,7 +2085,14 @@ $(document).ready(function() {
FM.open(src.full_path, FM.CURRENT_TAB);
}
else {
- FM.openFile(src.full_path, FM.CURRENT_TAB, elm);
+ if(FM.IMG_FILETYPES.indexOf(src.filetype) >= 0 && src.filetype.length > 0) {
+ //FM.IMAGES[tab][FM.IMAGES[tab].length] = {'img': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'thumb': "/view/file/?path=/home/admin/"+o.name//+"&raw=true", 'id': 'img-'+i};
+ //cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"';
+ FM.fotoramaOpen(tab, 'img-' + elm.index());
+ }
+ else {
+ FM.openFile(src.full_path, FM.CURRENT_TAB, elm);
+ }
}
}
},{
@@ -911,6 +2102,118 @@ $(document).ready(function() {
'target': document
});
+ shortcut.add("n",function() {
+ FM.createFile();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ shortcut.add("F7",function() {
+ FM.createDir();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("F8",function() {
+ FM.deleteItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("Delete",function() {
+ FM.deleteItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("shift+F6",function() {
+ FM.renameItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("F2",function() {
+ FM.renameItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("F5",function() {
+ if (FM.Env.RELOAD_IN_TIME == true) {
+ location.reload();
+ return;
+ }
+ else {
+ FM.copyItems();
+ FM.triggerRefreshActionTrick();
+ }
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+
+ shortcut.add("a",function() {
+ FM.packItem();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("d",function() {
+ FM.downloadFiles();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ shortcut.add("Backspace",function() {
+ FM.goBackwards();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ /*shortcut.add("Y",function() {
+ if (FM.Env.RELOAD_IN_TIME == true) {
+ location.reload();
+ }
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });*/
+
+
+ shortcut.add("u",function() {
+ var tab_letter = FM.getTabLetter(FM.CURRENT_TAB);
+ $('#file_upload_'+tab_letter).trigger('click');
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
/* is jQuery .live() has been removed in version 1.9 onwards
$(FM.TAB_A + ' .dir').live('click', function(evt) {
@@ -921,12 +2224,19 @@ $(document).ready(function() {
});
*/
- $(FM.TAB_A).on('click', '.dir', function(evt) {
+ /*$(FM.TAB_A).on('click', '.dir', function(evt) {
+ //console.log(evt);
+ if (evt.ctrlKey || evt.metaKey || evt.altKey) {
+ return;
+ }
FM.selectItem(evt.target, FM.TAB_A);
});
$(FM.TAB_B).on('click', '.dir', function(evt) {
+ if (evt.ctrlKey || evt.metaKey || evt.altKey) {
+ return;
+ }
FM.selectItem(evt.target, FM.TAB_B);
- });
+ });*/
$(FM.TAB_A_MENU).on('click', '.sort-by', function(evt){
FM.showOrderBox($(evt.target), FM.TAB_A);
@@ -939,11 +2249,22 @@ $(document).ready(function() {
$('.context-menu.sort-order').on('click', 'span', function(evt){
FM.reOrderList($(evt.target));
});
-
+
$('.warning-box .close').on('click', function(evt){
$(evt.target).closest('.warning-box').hide();
});
+ $('.menu-A .extract-btn').hide();
+ $('.menu-B .extract-btn').hide();
+
+
+ $('.to-shortcuts').click(function(){
+ $('.shortcuts').toggle();
+ });
+
+ $('.shortcuts .close').click(function(){
+ $('.shortcuts').hide();
+ });
});
@@ -954,5 +2275,5 @@ $(document).ready(function() {
$(window).bind('statechange', function(evt){
$(evt).stopPropagation();
// History.getState()
- alert('No way back yet');
+ //alert('No way back yet');
})
diff --git a/web/js/floating_layer.js b/web/js/floating_layer.js
index b0af2a903..84f6c91f7 100644
--- a/web/js/floating_layer.js
+++ b/web/js/floating_layer.js
@@ -2,7 +2,12 @@
{
jQuery.fn.flayer_close = function()
{
- jQuery(this).flayer.close();
+ try {
+ jQuery(this).flayer.close();
+ }
+ catch (e) {
+ fb.error(e);
+ }
}
jQuery.fn.flayer = function(params)
{
@@ -15,8 +20,9 @@
id : 'floating-box',
className : 'floating-box-class',
zIndex : 5000,
- beforeStart : function(){},
- beforeEnd : function(){},
+ beforeStart : function() {},
+ beforeEnd : function() {},
+ afterStart: function() {},
close : null,
closeClass : 'close-floating-layer',
outerClose : false,
@@ -207,6 +213,7 @@
jQuery(ref.content).append(jQuery(elm).removeClass('hidden'));
start_ovservers();
jQuery(ref.container).removeClass('hidden').css({'display':'block'});
+ config.afterStart(elm);
}
//
diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php
index 2ac93240b..34f52f188 100644
--- a/web/js/i18n.js.php
+++ b/web/js/i18n.js.php
@@ -1,48 +1,52 @@
1) {
- $args[0] = $text;
- return call_user_func_array("sprintf",$args);
- } else {
- return $text;
- }
- }
-}
-
-if (!function_exists('__')) {
- function __() {
- $args = func_get_args();
- array_unshift($args,$_SESSION['language']);
- return call_user_func_array("_translate",$args);
- }
+ $_SESSION['language'] = detect_user_language();
}
?>
-App.i18n.ARE_YOU_SURE = '';
-App.Constants.UNLIM_VALUE = '';
+App.i18n.ARE_YOU_SURE = '=__('Are you sure?')?>';
+App.Constants.UNLIM_TRANSLATED_VALUE = '=__('unlimited')?>';
+
+App.Constants.FM_HIT = '=__('Hit')?>';
+App.Constants.FM_TO_RELOAD_THE_PAGE = '=__('to reload the page')?>'
+App.Constants.FM_DIRECTORY_NAME_CANNOT_BE_EMPTY = '=__('Directory name cannot be empty')?>';
+App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY = '=__('File name cannot be empty')?>';
+App.Constants.FM_NO_FILE_SELECTED = '=__('No file selected')?>';
+App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED = '=__('No file or folder selected')?>';
+App.Constants.FM_FILE_TYPE_NOT_SUPPORTED = '=__('File type not supported')?>';
+App.Constants.FM_DIRECTORY_DOWNLOAD_NOT_READY = '=__('Directory download not available in current version')?>';
+
+App.Constants.FM_DIRECTORY_NOT_AVAILABLE = '=__('Directory not available')?>';
+App.Constants.FM_DONE = '=__('Done')?>';
+App.Constants.FM_CLOSE = '=__('Close')?>';
+App.Constants.FM_COPY = '=__('Copy') ?>';
+App.Constants.FM_CANCEL = '=__('Cancel')?>';
+App.Constants.FM_RENAME = '=__('Rename')?>';
+App.Constants.FM_DELETE = '=__('Delete')?>';
+App.Constants.FM_CONFIRM_DELETE_BULK = '=__('Delete items')?>';
+App.Constants.FM_EXTRACT = '=__('Extract')?>';
+App.Constants.FM_CREATE = '=__('Create')?>';
+App.Constants.FM_PACK = '=__('Compress')?>';
+App.Constants.FM_PACK_BUTTON = '=__('Compress')?>';
+App.Constants.FM_OK = '=__('OK')?>';
+App.Constants.FM_YOU_ARE_COPYING = '=__('YOU ARE COPYING')?>';
+App.Constants.FM_YOU_ARE_REMOVING = '=__('YOU ARE REMOVING')?>';
+
+App.Constants.FM_COPY_BULK = '=__('Copy files')?>';
+
+App.Constants.FM_CONFIRM_COPY = '=__('Are you sure you want to copy')?>';
+App.Constants.FM_CONFIRM_DELETE = '=__('Are you sure you want to delete')?>';
+App.Constants.FM_INTO_KEYWORD = '=__('into')?>';
+App.Constants.FM_EXISTING_FILES_WILL_BE_REPLACED= '=__('existing files will be replaced')?>';
+App.Constants.FM_ORIGINAL_NAME = '=__('Original name')?>';
+App.Constants.FM_FILE = '=__('File')?>';
+App.Constants.FM_ALREADY_EXISTS = '=__('already exists')?>';
+App.Constants.FM_CREATE_FILE = '=__('Create file')?>';
+App.Constants.FM_CREATE_DIRECTORY = '=__('Create directory')?>';
+App.Constants.FM_TRANSLATED_DATES = {'Jan': '=__('Jan')?>', 'Feb': '=__('Feb')?>','Mar': '=__('Mar')?>','Apr': '=__('Apr')?>','May': '=__('May')?>','Jun': '=__('Jun')?>','Jul': '=__('Jul')?>','Aug': '=__('Aug')?>','Sep': '=__('Sep')?>','Oct': '=__('Oct')?>','Nov': '=__('Nov')?>','Dec': '=__('Dec')?>'};
+
+
diff --git a/web/js/jquery.finder.js b/web/js/jquery.finder.js
index f8a02d8e5..745013700 100644
--- a/web/js/jquery.finder.js
+++ b/web/js/jquery.finder.js
@@ -203,14 +203,30 @@
},
selectAll: function(p,o) {
p.on('mouseover', function(){
- d.on("keydown", turnOff);
+ //d.on("keydown", turnOff);
});
p.on('mouseout', function(){
- d.off("keydown", turnOff);
+ //d.off("keydown", turnOff);
});
function turnOff(e) {
if (f.detect.ctrl(e)) {
+/*
+ shortcut.add("Ctrl+a", function(evt){
+ if(jQuery('.ch-toggle:checked').length > 0) {
+ f.t.unHAll(p, o);
+ jQuery('.ch-toggle:checked').attr('checked', false);
+ } else {
+ f.t.hAll(p,o);
+ }
+ }, {
+ 'type': 'keyup',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ }
+ );
+*/
if (e.keyCode == 65) { // ctrl + a
e.preventDefault();
//if(f.detect.alt(e)) {
diff --git a/web/js/pages/add.mail_acc.js b/web/js/pages/add.mail_acc.js
index 5b612caad..19d1e1928 100644
--- a/web/js/pages/add.mail_acc.js
+++ b/web/js/pages/add.mail_acc.js
@@ -1,7 +1,7 @@
App.Actions.MAIL_ACC.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
- $(elm).val(App.Constants.UNLIM_VALUE);
+ $(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@@ -70,6 +70,9 @@ App.Listeners.MAIL_ACC.checkbox_unlimited_feature();
$('form[name="v_quota"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
+ if (App.Helpers.isUnlimitedValue($(elm).val())) {
+ $(elm).val(App.Constants.UNLIM_VALUE);
+ }
});
});
diff --git a/web/js/pages/add.package.js b/web/js/pages/add.package.js
index 6aa773db0..beb5fe4df 100644
--- a/web/js/pages/add.package.js
+++ b/web/js/pages/add.package.js
@@ -1,7 +1,7 @@
App.Actions.PACKAGE.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
- $(elm).val(App.Constants.UNLIM_VALUE);
+ $(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@@ -70,6 +70,9 @@ App.Listeners.PACKAGE.checkbox_unlimited_feature();
$('form[name="v_add_package"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
+ if (App.Helpers.isUnlimitedValue($(elm).val())) {
+ $(elm).val(App.Constants.UNLIM_VALUE);
+ }
});
});
diff --git a/web/js/pages/add.web.js b/web/js/pages/add.web.js
index e319e3c1e..7a01f7460 100644
--- a/web/js/pages/add.web.js
+++ b/web/js/pages/add.web.js
@@ -3,11 +3,11 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
$(elm).parent().find('.hint').html('');
}
- hint = hint.replace(/[^\w\d]/gi, '');
-
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
}
+ hint = hint.replace(/[^\w\d]/gi, '');
+
$(elm).parent().find('.v-ftp-user').val(hint);
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
}
diff --git a/web/js/pages/edit.mail_acc.js b/web/js/pages/edit.mail_acc.js
index 5b612caad..19d1e1928 100644
--- a/web/js/pages/edit.mail_acc.js
+++ b/web/js/pages/edit.mail_acc.js
@@ -1,7 +1,7 @@
App.Actions.MAIL_ACC.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
- $(elm).val(App.Constants.UNLIM_VALUE);
+ $(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@@ -70,6 +70,9 @@ App.Listeners.MAIL_ACC.checkbox_unlimited_feature();
$('form[name="v_quota"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
+ if (App.Helpers.isUnlimitedValue($(elm).val())) {
+ $(elm).val(App.Constants.UNLIM_VALUE);
+ }
});
});
diff --git a/web/js/pages/edit.package.js b/web/js/pages/edit.package.js
index b1f2cb345..301a91823 100644
--- a/web/js/pages/edit.package.js
+++ b/web/js/pages/edit.package.js
@@ -1,7 +1,7 @@
App.Actions.PACKAGE.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
- $(elm).val(App.Constants.UNLIM_VALUE);
+ $(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@@ -70,6 +70,9 @@ App.Listeners.PACKAGE.checkbox_unlimited_feature();
$('form[name="v_edit_package"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
+ if (App.Helpers.isUnlimitedValue($(elm).val())) {
+ $(elm).val(App.Constants.UNLIM_VALUE);
+ }
});
});
diff --git a/web/js/pages/edit.web.js b/web/js/pages/edit.web.js
index f339b46d7..1406d9d09 100644
--- a/web/js/pages/edit.web.js
+++ b/web/js/pages/edit.web.js
@@ -3,11 +3,11 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
$(elm).parent().find('.hint').html('');
}
- hint = hint.replace(/[^\w\d]/gi, '');
-
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
}
+ hint = hint.replace(/[^\w\d]/gi, '');
+
$(elm).parent().find('.v-ftp-user').val(hint);
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
}
diff --git a/web/js/templates.js b/web/js/templates.js
index 47c9f5aa5..d600ddc6d 100644
--- a/web/js/templates.js
+++ b/web/js/templates.js
@@ -4,66 +4,170 @@
*/
App.Templates.html = {
WEB: {
- hint: ['']
+ hint: [''],
+ notification: [
+ '
\
+ ~!:TOPIC~! \
+ ~!:NOTICE~!\
+ '
+ ]
+
},
// file manager
+ //
+
FM: {
+ reload_in_time: [
+ '
\
+
'+App.Constants.FM_HIT+' F5 '+App.Constants.FM_TO_RELOAD_THE_PAGE+'
\
+
'
+ ],
entry_line: ['
\
- \
+ \
+ \
\
\
- ~!:NAME~! \
+ ~!:NAME~!
\
~!:PERMISSIONS~! \
~!:OWNER~! \
- ~!:SIZE~! \
+ ~!:SIZE_UNIT~! \
+ ~!:SIZE_VALUE~! \
~!:DATE~! \
~!:TIME~! \
+ \
'],
- popup_delete: ['