diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index ec98fd72..2b4c52ca 100755 --- a/bin/v-add-dns-record +++ b/bin/v-add-dns-record @@ -15,6 +15,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 record=$(idn -t --quiet -u "$3" ) record=$(echo "$record" | tr '[:upper:]' '[:lower:]') rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]') @@ -53,6 +54,7 @@ fi # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-mail-account-alias b/bin/v-add-mail-account-alias index 03ecaec9..7c28f88d 100755 --- a/bin/v-add-mail-account-alias +++ b/bin/v-add-mail-account-alias @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 malias=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index f8c8f62b..86c8cf11 100755 --- a/bin/v-add-mail-account-autoreply +++ b/bin/v-add-mail-account-autoreply @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 autoreply=$4 @@ -30,6 +31,7 @@ fi # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-mail-account-forward b/bin/v-add-mail-account-forward index 6be94b22..2e25d158 100755 --- a/bin/v-add-mail-account-forward +++ b/bin/v-add-mail-account-forward @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 forward=$4 diff --git a/bin/v-add-mail-account-fwd-only b/bin/v-add-mail-account-fwd-only index 02704cfb..9a62805c 100755 --- a/bin/v-add-mail-account-fwd-only +++ b/bin/v-add-mail-account-fwd-only @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 # Includes @@ -29,6 +30,7 @@ fi # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index 2676e750..10e87032 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 antispam=${3-yes} antivirus=${4-yes} dkim=${5-yes} diff --git a/bin/v-add-mail-domain-antispam b/bin/v-add-mail-domain-antispam index 4ca81f94..eb31404f 100755 --- a/bin/v-add-mail-domain-antispam +++ b/bin/v-add-mail-domain-antispam @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-mail-domain-antivirus b/bin/v-add-mail-domain-antivirus index c0acd82d..84910756 100755 --- a/bin/v-add-mail-domain-antivirus +++ b/bin/v-add-mail-domain-antivirus @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-mail-domain-catchall b/bin/v-add-mail-domain-catchall index f827449f..a0897641 100755 --- a/bin/v-add-mail-domain-catchall +++ b/bin/v-add-mail-domain-catchall @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 email="$3" # Includes diff --git a/bin/v-add-mail-domain-dkim b/bin/v-add-mail-domain-dkim index 4c0a095e..9c643b6e 100755 --- a/bin/v-add-mail-domain-dkim +++ b/bin/v-add-mail-domain-dkim @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 dkim_size=${3-1024} # Includes @@ -29,6 +30,7 @@ fi # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# @@ -81,7 +83,7 @@ fi # Adding dkim in config update_object_value 'mail' 'DOMAIN' "$domain" '$DKIM' 'yes' -increase_user_value "$user" '$U_MAIL_DKMI' +increase_user_value "$user" '$U_MAIL_DKIM' # Logging log_history "enabled DKIM support for $domain" diff --git a/bin/v-add-sys-sftp-jail b/bin/v-add-sys-sftp-jail index 7953f151..7d5c4035 100755 --- a/bin/v-add-sys-sftp-jail +++ b/bin/v-add-sys-sftp-jail @@ -45,6 +45,7 @@ fi # Enabling jailed sftp if [ -z "$sftp_i" ]; then + echo " " >> $config echo "Subsystem sftp internal-sftp" >> $config echo "Match Group sftp-only" >> $config echo "ChrootDirectory /chroot/%u" >> $config diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias index 932e1ffa..e5676af4 100755 --- a/bin/v-add-web-domain-alias +++ b/bin/v-add-web-domain-alias @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 aliases=$3 restart="$4" @@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? format_aliases diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp index 1c118706..1a722bad 100755 --- a/bin/v-add-web-domain-ftp +++ b/bin/v-add-web-domain-ftp @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ftp_user=${1}_${3} password=$4; HIDE=4 ftp_path=$5 @@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-add-web-domain-httpauth b/bin/v-add-web-domain-httpauth index 42dd269e..e99384c1 100755 --- a/bin/v-add-web-domain-httpauth +++ b/bin/v-add-web-domain-httpauth @@ -24,6 +24,8 @@ 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" +shtaccess="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess" +shtpasswd="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd" docroot="$HOMEDIR/$user/web/$domain/public_html" @@ -71,15 +73,23 @@ fi auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password) touch $htpasswd chmod 640 $htpasswd $htaccess +chgrp $user $htpasswd $htaccess sed -i "/^$auth_user:/d" $htpasswd echo "$auth_user:$auth_hash" >> $htpasswd +# Symbolic link for secure web templates +if [ ! -L $shtpasswd ]; then + ln -s $htpasswd $shtpasswd +fi +if [ ! -L $shtaccess ]; then + ln -s $htaccess $shtaccess +fi + # Restarting web server if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then $BIN/v-restart-web fi - #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# diff --git a/bin/v-add-web-domain-stats b/bin/v-add-web-domain-stats index 60caf0c1..8da1451f 100755 --- a/bin/v-add-web-domain-stats +++ b/bin/v-add-web-domain-stats @@ -16,6 +16,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 type=$3 # Includes diff --git a/bin/v-backup-user b/bin/v-backup-user index 786941a9..978b4be3 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -137,6 +137,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then mkdir -p $tmpdir/web/$domain/vesta # Get domain variables + domain_idn=$domain format_domain_idn get_domain_values 'web' @@ -286,6 +287,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log mkdir -p $tmpdir/mail/$domain/conf mkdir -p $tmpdir/mail/$domain/vesta + domain_idn=$domain format_domain_idn # Backup exim config @@ -809,12 +811,12 @@ current_time=$(date "+%T") if [ "$run_time" -lt 1 ]; then run_time=1 fi -min=miutes +min=minutes if [ "$run_time" -eq 1 ]; then min=minute fi -echo "$(date "+%F %T") Size: $size Mb" |tee -a $BACKUP/$user.log +echo "$(date "+%F %T") Size: $size MB" |tee -a $BACKUP/$user.log echo "$(date "+%F %T") Runtime: $run_time $min" |tee -a $BACKUP/$user.log diff --git a/bin/v-change-dns-domain-exp b/bin/v-change-dns-domain-exp index e5b0c6a9..23abb6f4 100755 --- a/bin/v-change-dns-domain-exp +++ b/bin/v-change-dns-domain-exp @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 exp=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-dns-domain-ip b/bin/v-change-dns-domain-ip index fca3ecb7..175268e3 100755 --- a/bin/v-change-dns-domain-ip +++ b/bin/v-change-dns-domain-ip @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ip=$3 restart=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-dns-domain-soa b/bin/v-change-dns-domain-soa index e235a639..8bb21370 100755 --- a/bin/v-change-dns-domain-soa +++ b/bin/v-change-dns-domain-soa @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g') restart=$4 @@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-dns-domain-tpl b/bin/v-change-dns-domain-tpl index 63c71e41..7f4d17b1 100755 --- a/bin/v-change-dns-domain-tpl +++ b/bin/v-change-dns-domain-tpl @@ -14,6 +14,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 template=$3 restart=$4 diff --git a/bin/v-change-dns-domain-ttl b/bin/v-change-dns-domain-ttl index 131b7930..c2e29553 100755 --- a/bin/v-change-dns-domain-ttl +++ b/bin/v-change-dns-domain-ttl @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ttl=$3 restart=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-dns-record b/bin/v-change-dns-record index 612ffc6c..12f2454b 100755 --- a/bin/v-change-dns-record +++ b/bin/v-change-dns-record @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 id=$3 dvalue=$(idn -t --quiet -u "$4" ) priority=$5 @@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-dns-record-id b/bin/v-change-dns-record-id index 5dbcf299..90ca28ae 100755 --- a/bin/v-change-dns-record-id +++ b/bin/v-change-dns-record-id @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 id=$3 newid=$4 restart=$5 @@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-mail-account-password b/bin/v-change-mail-account-password index 0540ac7b..28c8809b 100755 --- a/bin/v-change-mail-account-password +++ b/bin/v-change-mail-account-password @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 password=$4; HIDE=4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-mail-account-quota b/bin/v-change-mail-account-quota index edbbabab..84216949 100755 --- a/bin/v-change-mail-account-quota +++ b/bin/v-change-mail-account-quota @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 quota=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-mail-domain-catchall b/bin/v-change-mail-domain-catchall index 022dbf1d..080e6a10 100755 --- a/bin/v-change-mail-domain-catchall +++ b/bin/v-change-mail-domain-catchall @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 email=$3 # Includes diff --git a/bin/v-change-sys-service-config b/bin/v-change-sys-service-config index d6977459..c6de294e 100755 --- a/bin/v-change-sys-service-config +++ b/bin/v-change-sys-service-config @@ -104,7 +104,8 @@ if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then service $service restart >/dev/null 2>&1 if [ $? -ne 0 ]; then for config in $dst; do - mv -f $config.vst.back $config + cat $config.vst.back > $config + rm -f $config.vst.back done check_result $E_RESTART "$service failed to start with new config" fi diff --git a/bin/v-change-web-domain-backend-tpl b/bin/v-change-web-domain-backend-tpl index 36a15000..4259335b 100755 --- a/bin/v-change-web-domain-backend-tpl +++ b/bin/v-change-web-domain-backend-tpl @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 template=$3 restart=$4 diff --git a/bin/v-change-web-domain-ftp-password b/bin/v-change-web-domain-ftp-password index c41fdde7..6e74fd9e 100755 --- a/bin/v-change-web-domain-ftp-password +++ b/bin/v-change-web-domain-ftp-password @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ftp_user=$3 password=$4; HIDE=4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-ftp-path b/bin/v-change-web-domain-ftp-path index 8cfefade..61e1aa80 100755 --- a/bin/v-change-web-domain-ftp-path +++ b/bin/v-change-web-domain-ftp-path @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ftp_user=$3 ftp_path=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-ip b/bin/v-change-web-domain-ip index 05fde851..17eb55d9 100755 --- a/bin/v-change-web-domain-ip +++ b/bin/v-change-web-domain-ip @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ip=$3 restart=$4 @@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-name b/bin/v-change-web-domain-name index 51215393..6cbd1d99 100755 --- a/bin/v-change-web-domain-name +++ b/bin/v-change-web-domain-name @@ -12,6 +12,7 @@ # Argument defenition user=$1 domain=$2 +domain_idn=$2 new_domain=$3 restart=$4 @@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-proxy-tpl b/bin/v-change-web-domain-proxy-tpl index c2be52f1..4d022cb9 100755 --- a/bin/v-change-web-domain-proxy-tpl +++ b/bin/v-change-web-domain-proxy-tpl @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 template=$3 default_extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,\ exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm" @@ -27,6 +28,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-sslcert b/bin/v-change-web-domain-sslcert index 444510c7..f60a4eb0 100755 --- a/bin/v-change-web-domain-sslcert +++ b/bin/v-change-web-domain-sslcert @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ssl_dir=$3 restart=$4 @@ -24,6 +25,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-sslhome b/bin/v-change-web-domain-sslhome index f9768e32..06b4c563 100755 --- a/bin/v-change-web-domain-sslhome +++ b/bin/v-change-web-domain-sslhome @@ -8,6 +8,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ssl_home=$3 restart=$4 @@ -19,6 +20,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-stats b/bin/v-change-web-domain-stats index afaa7fe7..6355e4a1 100755 --- a/bin/v-change-web-domain-stats +++ b/bin/v-change-web-domain-stats @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 type=$3 # Includes diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl index ef88e7a4..9b9623bb 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 template=$3 restart=$4 @@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-check-letsencrypt-domain b/bin/v-check-letsencrypt-domain index cc8c15af..6b835ec3 100755 --- a/bin/v-check-letsencrypt-domain +++ b/bin/v-check-letsencrypt-domain @@ -89,15 +89,21 @@ uri=$(echo "$answer" |grep -A 3 http-01 |grep uri |cut -f 4 -d \") # Adding location wrapper for request challenge if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then conf="$HOMEDIR/$user/conf/web/nginx.$r_domain.conf_letsencrypt" + sconf="$HOMEDIR/$user/conf/web/snginx.$r_domain.conf_letsencrypt" if [ ! -e "$conf" ]; then echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' > $conf echo ' default_type text/plain;' >> $conf echo ' return 200 "$1.'$thumb'";' >> $conf echo '}' >> $conf fi + if [ ! -e "$sconf" ]; then + ln -s "$conf" "$sconf" + fi else acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge" - mkdir -p $acme + if [ ! -d "$acme" ]; then + mkdir -p $acme + fi echo "$token.$thumb" > $acme/$token chown -R $user:$user $HOMEDIR/$user/web/$r_domain/public_html/.well-known fi diff --git a/bin/v-delete-dns-on-web-alias b/bin/v-delete-dns-on-web-alias index b74fc900..87e68849 100755 --- a/bin/v-delete-dns-on-web-alias +++ b/bin/v-delete-dns-on-web-alias @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 dom_alias=$(idn -t --quiet -u "$3" ) dom_alias=$(echo $dom_alias |sed -e 's/\.*$//g' -e 's/^\.*//g') dom_alias=$(echo $dom_alias |tr '[:upper:]' '[:lower:]') @@ -26,6 +27,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-dns-record b/bin/v-delete-dns-record index 16bb2b46..4b4555df 100755 --- a/bin/v-delete-dns-record +++ b/bin/v-delete-dns-record @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 id=$3 restart=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-mail-account b/bin/v-delete-mail-account index ffc22114..f0da423c 100755 --- a/bin/v-delete-mail-account +++ b/bin/v-delete-mail-account @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 # Includes diff --git a/bin/v-delete-mail-account-alias b/bin/v-delete-mail-account-alias index 230d0113..9d5f902f 100755 --- a/bin/v-delete-mail-account-alias +++ b/bin/v-delete-mail-account-alias @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 malias=$4 diff --git a/bin/v-delete-mail-account-autoreply b/bin/v-delete-mail-account-autoreply index 2169190a..d4cb0213 100755 --- a/bin/v-delete-mail-account-autoreply +++ b/bin/v-delete-mail-account-autoreply @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 malias=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-mail-account-forward b/bin/v-delete-mail-account-forward index c690e9a4..bb209651 100755 --- a/bin/v-delete-mail-account-forward +++ b/bin/v-delete-mail-account-forward @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 forward=$4 diff --git a/bin/v-delete-mail-account-fwd-only b/bin/v-delete-mail-account-fwd-only index f5147f9b..820164ed 100755 --- a/bin/v-delete-mail-account-fwd-only +++ b/bin/v-delete-mail-account-fwd-only @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-mail-domain b/bin/v-delete-mail-domain index f128d752..f3541edb 100755 --- a/bin/v-delete-mail-domain +++ b/bin/v-delete-mail-domain @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh diff --git a/bin/v-delete-mail-domain-antispam b/bin/v-delete-mail-domain-antispam index 35568434..455ed9ca 100755 --- a/bin/v-delete-mail-domain-antispam +++ b/bin/v-delete-mail-domain-antispam @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-mail-domain-antivirus b/bin/v-delete-mail-domain-antivirus index e176a755..312120f7 100755 --- a/bin/v-delete-mail-domain-antivirus +++ b/bin/v-delete-mail-domain-antivirus @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-mail-domain-catchall b/bin/v-delete-mail-domain-catchall index f5a7ddf8..7a30175d 100755 --- a/bin/v-delete-mail-domain-catchall +++ b/bin/v-delete-mail-domain-catchall @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh diff --git a/bin/v-delete-mail-domain-dkim b/bin/v-delete-mail-domain-dkim index e8e57cf4..f11e48d4 100755 --- a/bin/v-delete-mail-domain-dkim +++ b/bin/v-delete-mail-domain-dkim @@ -61,7 +61,7 @@ fi # Updatoing config update_object_value 'mail' 'DOMAIN' "$domain" '$DKIM' 'no' -decrease_user_value "$user" '$U_MAIL_DKMI' +decrease_user_value "$user" '$U_MAIL_DKIM' # Logging log_history "disabled DKIM support on $domain" diff --git a/bin/v-delete-web-domain b/bin/v-delete-web-domain index 6ef7280b..529f5d09 100755 --- a/bin/v-delete-web-domain +++ b/bin/v-delete-web-domain @@ -15,6 +15,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 restart=$3 # Includes @@ -26,6 +27,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-web-domain-backend b/bin/v-delete-web-domain-backend index 5b548096..47c00444 100755 --- a/bin/v-delete-web-domain-backend +++ b/bin/v-delete-web-domain-backend @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-web-domain-ftp b/bin/v-delete-web-domain-ftp index 08130584..218f4d55 100755 --- a/bin/v-delete-web-domain-ftp +++ b/bin/v-delete-web-domain-ftp @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ftp_user=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-web-domain-httpauth b/bin/v-delete-web-domain-httpauth index 84f9767a..3fbc85da 100755 --- a/bin/v-delete-web-domain-httpauth +++ b/bin/v-delete-web-domain-httpauth @@ -23,7 +23,8 @@ 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" - +shtaccess="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess" +shtpasswd="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd" #----------------------------------------------------------# # Verifications # @@ -54,7 +55,7 @@ sed -i "/^$auth_user:/d" $htpasswd # Deleting password protection if [ "$(echo "$AUTH_USER" |tr : '\n' |wc -l)" -le 1 ]; then - rm -f $htaccess $htpasswd + rm -f $htaccess $htpasswd $shtaccess $shtpasswd restart_required='yes' fi diff --git a/bin/v-delete-web-domain-proxy b/bin/v-delete-web-domain-proxy index 215506cb..73eeabb7 100755 --- a/bin/v-delete-web-domain-proxy +++ b/bin/v-delete-web-domain-proxy @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 restart=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-web-domain-ssl b/bin/v-delete-web-domain-ssl index 131feb23..05e8c940 100755 --- a/bin/v-delete-web-domain-ssl +++ b/bin/v-delete-web-domain-ssl @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 restart=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-delete-web-domain-stats b/bin/v-delete-web-domain-stats index 00566999..33a22dca 100755 --- a/bin/v-delete-web-domain-stats +++ b/bin/v-delete-web-domain-stats @@ -13,6 +13,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh diff --git a/bin/v-get-dns-domain-value b/bin/v-get-dns-domain-value index ec77df2f..b530588a 100755 --- a/bin/v-get-dns-domain-value +++ b/bin/v-get-dns-domain-value @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 key=$(echo "$3"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/") # Includes @@ -20,6 +21,7 @@ source $VESTA/func/main.sh # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-get-mail-account-value b/bin/v-get-mail-account-value index f011875c..abff06a5 100755 --- a/bin/v-get-mail-account-value +++ b/bin/v-get-mail-account-value @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 key=$(echo "$4"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/") @@ -21,6 +22,7 @@ source $VESTA/func/main.sh # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-get-mail-domain-value b/bin/v-get-mail-domain-value index e7ad584a..97a1a3e4 100755 --- a/bin/v-get-mail-domain-value +++ b/bin/v-get-mail-domain-value @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 key=$(echo "$3"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/") # Includes @@ -20,6 +21,7 @@ source $VESTA/func/main.sh # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-restore-user b/bin/v-restore-user index fa93482e..750ae421 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -567,6 +567,9 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then # Rebuilding mail config rebuild_mail_domain_conf + + domain_idn=$domain + format_domain_idn # Restoring emails if [ -e "$tmpdir/mail/$domain/accounts.tar.gz" ]; then diff --git a/bin/v-suspend-dns-domain b/bin/v-suspend-dns-domain index d016b786..b42e2e99 100755 --- a/bin/v-suspend-dns-domain +++ b/bin/v-suspend-dns-domain @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 restart="$3" # Includes @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-suspend-dns-record b/bin/v-suspend-dns-record index 4de9ae40..003f8d75 100755 --- a/bin/v-suspend-dns-record +++ b/bin/v-suspend-dns-record @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 id=$3 restart=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-suspend-mail-account b/bin/v-suspend-mail-account index 803594eb..06d98a66 100755 --- a/bin/v-suspend-mail-account +++ b/bin/v-suspend-mail-account @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-suspend-mail-accounts b/bin/v-suspend-mail-accounts index bd282ca6..ab8c440f 100755 --- a/bin/v-suspend-mail-accounts +++ b/bin/v-suspend-mail-accounts @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -19,6 +20,8 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain +format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-suspend-mail-domain b/bin/v-suspend-mail-domain index 66fe8152..201dc7f3 100755 --- a/bin/v-suspend-mail-domain +++ b/bin/v-suspend-mail-domain @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain index 15dbe9c4..7bd658ce 100755 --- a/bin/v-suspend-web-domain +++ b/bin/v-suspend-web-domain @@ -14,6 +14,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 restart=$3 # Includes @@ -25,6 +26,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-unsuspend-dns-domain b/bin/v-unsuspend-dns-domain index e845b6a8..bc8de6ee 100755 --- a/bin/v-unsuspend-dns-domain +++ b/bin/v-unsuspend-dns-domain @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-unsuspend-dns-record b/bin/v-unsuspend-dns-record index c84e7744..f1bc163f 100755 --- a/bin/v-unsuspend-dns-record +++ b/bin/v-unsuspend-dns-record @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 id=$3 restart=$4 @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-unsuspend-mail-account b/bin/v-unsuspend-mail-account index 2e9a887f..314c13bc 100755 --- a/bin/v-unsuspend-mail-account +++ b/bin/v-unsuspend-mail-account @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 account=$3 # Includes @@ -22,6 +23,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-unsuspend-mail-accounts b/bin/v-unsuspend-mail-accounts index 2c651b2c..420bcf05 100755 --- a/bin/v-unsuspend-mail-accounts +++ b/bin/v-unsuspend-mail-accounts @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-unsuspend-mail-domain b/bin/v-unsuspend-mail-domain index 9c688d6f..935865d7 100755 --- a/bin/v-unsuspend-mail-domain +++ b/bin/v-unsuspend-mail-domain @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-unsuspend-web-domain b/bin/v-unsuspend-web-domain index b47b67f4..91bc1e16 100755 --- a/bin/v-unsuspend-web-domain +++ b/bin/v-unsuspend-web-domain @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 restart=$3 # Includes @@ -23,6 +24,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-update-mail-domain-disk b/bin/v-update-mail-domain-disk index a1b6b3f4..451dbd37 100755 --- a/bin/v-update-mail-domain-disk +++ b/bin/v-update-mail-domain-disk @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -20,6 +21,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-update-web-domain-disk b/bin/v-update-web-domain-disk index 252fac3c..ac851b92 100755 --- a/bin/v-update-web-domain-disk +++ b/bin/v-update-web-domain-disk @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-update-web-domain-ssl b/bin/v-update-web-domain-ssl index 8a3381a9..877005c4 100755 --- a/bin/v-update-web-domain-ssl +++ b/bin/v-update-web-domain-ssl @@ -15,6 +15,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 ssl_dir=$3 restart=$4 @@ -27,6 +28,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/bin/v-update-web-domain-stat b/bin/v-update-web-domain-stat index 24eba8cf..c77b750b 100755 --- a/bin/v-update-web-domain-stat +++ b/bin/v-update-web-domain-stat @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh diff --git a/bin/v-update-web-domain-traff b/bin/v-update-web-domain-traff index 299bafd2..ce18707d 100755 --- a/bin/v-update-web-domain-traff +++ b/bin/v-update-web-domain-traff @@ -12,6 +12,7 @@ # Argument definition user=$1 domain=$2 +domain_idn=$2 # Includes source $VESTA/func/main.sh @@ -21,6 +22,7 @@ source $VESTA/conf/vesta.conf # Additional argument formatting format_domain format_domain_idn +# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ? #----------------------------------------------------------# diff --git a/func/domain.sh b/func/domain.sh index 3ee84c8c..53f41270 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -172,6 +172,9 @@ add_web_config() { conf="$HOMEDIR/$user/conf/web/s$1.conf" fi + domain_idn=$domain + format_domain_idn + cat $WEBTPL/$1/$WEB_BACKEND/$2 | \ sed -e "s|%ip%|$local_ip|g" \ -e "s|%domain%|$domain|g" \ @@ -228,6 +231,8 @@ get_web_config_lines() { check_result $E_PARSING "can't parse template $1" fi + domain_idn=$domain + format_domain_idn vhost_lines=$(grep -niF "name $domain_idn" $2) vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #" vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :) diff --git a/func/main.sh b/func/main.sh index b1761fd8..b9dc14c8 100644 --- a/func/main.sh +++ b/func/main.sh @@ -864,6 +864,9 @@ format_domain() { } format_domain_idn() { + if [ -z "$domain_idn" ]; then + domain_idn=$domain + fi if [[ "$domain_idn" = *[![:ascii:]]* ]]; then domain_idn=$(idn -t --quiet -a $domain_idn) fi diff --git a/func/rebuild.sh b/func/rebuild.sh index 69331cce..e5ab182a 100644 --- a/func/rebuild.sh +++ b/func/rebuild.sh @@ -227,6 +227,8 @@ rebuild_web_domain_conf() { # Adding web stats parser if [ ! -z "$STATS" ]; then + domain_idn=$domain + format_domain_idn cat $WEBTPL/$STATS/$STATS.tpl |\ sed -e "s|%ip%|$local_ip|g" \ -e "s|%web_system%|$WEB_SYSTEM|g" \ diff --git a/install/debian/7/templates/web/nginx/php5-fpm/laravel.stpl b/install/debian/7/templates/web/nginx/php5-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/laravel.tpl b/install/debian/7/templates/web/nginx/php5-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl b/install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/laravel.tpl b/install/debian/8/templates/web/nginx/php5-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/rhel/5/templates/web/nginx/php-fpm/laravel.stpl b/install/rhel/5/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/laravel.tpl b/install/rhel/5/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl b/install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/laravel.tpl b/install/rhel/6/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl b/install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/laravel.tpl b/install/rhel/7/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/owncloud.tpl index 0cc95177..d0682ea4 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.stpl index ea52172f..ef7b01f0 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.tpl index e345e871..89f4b3d2 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/owncloud.tpl index e33332e0..2c697cc4 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.stpl index 2e5d9c8d..ced7b44b 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.tpl index 4b2ec788..f850c412 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/laravel.stpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 00000000..f1ffc4c0 --- /dev/null +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/laravel.stpl @@ -0,0 +1,56 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/laravel.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/laravel.tpl new file mode 100644 index 00000000..5ef66f98 --- /dev/null +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/laravel.tpl @@ -0,0 +1,50 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%/public; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + location / { + try_files $uri $uri/ /index.php?$query_string; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + location /vstats/ { + alias %home%/%user%/web/%domain%/stats/; + include %home%/%user%/web/%domain%/stats/auth.conf*; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain_idn%.conf*; +} diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/owncloud.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/owncloud.tpl index e33332e0..2c697cc4 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/owncloud.tpl @@ -73,11 +73,6 @@ server { include %home%/%user%/web/%domain%/stats/auth.conf*; } - location /vstats/ { - alias %home%/%user%/web/%domain%/stats/; - include %home%/%user%/web/%domain%/stats/auth.conf*; - } - include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.stpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.stpl index 2e5d9c8d..ced7b44b 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.stpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.stpl @@ -1,7 +1,7 @@ server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; @@ -12,7 +12,7 @@ server { ssl_certificate_key %ssl_key%; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.tpl index 4b2ec788..d7dd09ea 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.tpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/pyrocms.tpl @@ -1,14 +1,14 @@ server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; - root %docroot%; + root %docroot%/public; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location /installer { - try_files $uri $uri/ /installer/index.php; + try_files $uri $uri/ /installer/index.php?$query_string; } location / { diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index af05f12c..ada45705 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -29,7 +29,7 @@ if [ "$release" -eq 8 ]; then 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 expect libmail-dkim-perl" + bsdmainutils cron vesta vesta-nginx vesta-php expect libmail-dkim-perl unrar-free" else software="nginx apache2 apache2-utils apache2.2-common apache2-suexec-custom libapache2-mod-ruid2 @@ -41,7 +41,7 @@ else 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 expect" + bsdmainutils cron vesta vesta-nginx vesta-php expect unrar-free" fi # Defining help function @@ -1088,6 +1088,10 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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 + chmod 640 /etc/roundcube/debian-db-roundcube.php + chmod 640 /etc/roundcube/config.inc.php + chown root:www-data /etc/roundcube/debian-db-roundcube.php + chown root:www-data /etc/roundcube/config.inc.php wget $vestacp/roundcube/vesta.php -O \ /usr/share/roundcube/plugins/password/drivers/vesta.php wget $vestacp/roundcube/config.inc.php -O \ @@ -1102,7 +1106,10 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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 - + chmod 640 /etc/roundcube/debian-db-roundcube.php + chmod 640 /etc/roundcube/config.inc.php + chown root:www-data /etc/roundcube/debian-db-roundcube.php + chown root:www-data /etc/roundcube/config.inc.php # RoundCube tinyMCE fix tinymceFixArchiveURL=$vestacp/roundcube/roundcube-tinymce.tar.gz tinymceParentFolder=/usr/share/roundcube/program/js diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index 7b8e4d85..1c4ac908 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -1171,6 +1171,8 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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 + chmod 640 /etc/roundcubemail/config.inc.php + chown root:apache /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 @@ -1199,6 +1201,9 @@ if [ "$fail2ban" = 'yes' ]; then sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local fi chkconfig fail2ban on + /bin/mkdir -p /var/run/fail2ban + sed -i "s/\[Service\]/\[Service\]\nExecStartPre = \/bin\/mkdir -p \/var\/run\/fail2ban/g" /usr/lib/systemd/system/fail2ban.service + systemctl daemon-reload service fail2ban start check_result $? "fail2ban start failed" fi diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 19666573..07d17492 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -14,8 +14,8 @@ VESTA='/usr/local/vesta' 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}')" +release="$(lsb_release -s -r)" +codename="$(lsb_release -s -c)" vestacp="http://$CHOST/$VERSION/$release" if [ "$release" = '16.04' ]; then @@ -30,6 +30,18 @@ if [ "$release" = '16.04' ]; then 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 expect" +elif [ "$release" = '16.10' ]; then + software="nginx apache2 apache2-utils apache2.2-common + apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf + libapache2-mod-fcgid libapache2-mod-php7.0 php7.0 php7.0-common php7.0-cgi + php7.0-mysql php7.0-curl php7.0-fpm php7.0-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 expect" else software="nginx apache2 apache2-utils apache2.2-common apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf @@ -463,6 +475,7 @@ rm -f /etc/apache2/conf.d/* > /dev/null 2>&1 # Backing up PHP configuration service php7.0-fpm stop > /dev/null 2>&1 service php5-fpm stop > /dev/null 2>&1 +cp -r /etc/php7.0/* $vst_backups/php/ > /dev/null 2>&1 cp -r /etc/php5/* $vst_backups/php/ > /dev/null 2>&1 cp -r /etc/php/* $vst_backups/php/ > /dev/null 2>&1 @@ -536,10 +549,12 @@ if [ "$apache" = 'no' ]; then 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-php7.0//") software=$(echo "$software" | sed -e "s/libapache2-mod-php5//") software=$(echo "$software" | sed -e "s/libapache2-mod-php//") fi if [ "$phpfpm" = 'no' ]; then + software=$(echo "$software" | sed -e "s/php7.0-fpm//") software=$(echo "$software" | sed -e "s/php5-fpm//") software=$(echo "$software" | sed -e "s/php-fpm//") fi @@ -575,14 +590,16 @@ 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/php7.0-mysql//') software=$(echo "$software" | sed -e 's/php5-mysql//') - software=$(echo "$software" | sed -e 's/phpMyAdmin//') software=$(echo "$software" | sed -e 's/php-mysql//') + software=$(echo "$software" | sed -e 's/phpMyAdmin//') 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/php7.0-pgsql//') software=$(echo "$software" | sed -e 's/php5-pgsql//') software=$(echo "$software" | sed -e 's/php-pgsql//') software=$(echo "$software" | sed -e 's/phppgadmin//') @@ -1098,6 +1115,8 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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 + chmod 640 /etc/roundcube/debian-db-roundcube.php + chown root:www-data /etc/roundcube/debian-db-roundcube.php wget $vestacp/roundcube/vesta.php -O \ /usr/share/roundcube/plugins/password/drivers/vesta.php wget $vestacp/roundcube/config.inc.php -O \ @@ -1106,10 +1125,11 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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 - if [ "$release" = '16.04' ]; then mv /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php mv /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php + chmod 640 /etc/roundcube/debian-db-roundcube.php + chown root:www-data /etc/roundcube/debian-db-roundcube.php fi mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql diff --git a/web/edit/server/apache2/index.php b/web/edit/server/apache2/index.php index d3c79bcb..10eddb7c 100644 --- a/web/edit/server/apache2/index.php +++ b/web/edit/server/apache2/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." apache2 ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/bind9/index.php b/web/edit/server/bind9/index.php index 155e8176..bbe7e563 100644 --- a/web/edit/server/bind9/index.php +++ b/web/edit/server/bind9/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_options'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9-opt ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -43,7 +43,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9 ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/clamd/index.php b/web/edit/server/clamd/index.php index 8041b8d0..29b8dcdf 100644 --- a/web/edit/server/clamd/index.php +++ b/web/edit/server/clamd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." clamd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/cron/index.php b/web/edit/server/cron/index.php index 3b080197..16736b0b 100644 --- a/web/edit/server/cron/index.php +++ b/web/edit/server/cron/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." cron ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/crond/index.php b/web/edit/server/crond/index.php index fdac7def..c35174c9 100644 --- a/web/edit/server/crond/index.php +++ b/web/edit/server/crond/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." crond ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/dovecot/index.php b/web/edit/server/dovecot/index.php index 5e217134..9e8015a9 100644 --- a/web/edit/server/dovecot/index.php +++ b/web/edit/server/dovecot/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -43,7 +43,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config1'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-1 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -56,7 +56,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config2'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-2 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -69,7 +69,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config3'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-3 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -82,7 +82,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config4'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-4 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -95,7 +95,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config5'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-5 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -108,7 +108,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config6'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-6 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -121,7 +121,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config7'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-7 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -134,7 +134,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config8'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-8 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/exim/index.php b/web/edit/server/exim/index.php index 65a069f0..4cce7720 100644 --- a/web/edit/server/exim/index.php +++ b/web/edit/server/exim/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." exim ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/exim4/index.php b/web/edit/server/exim4/index.php index 163f0a0d..3aa66cf0 100644 --- a/web/edit/server/exim4/index.php +++ b/web/edit/server/exim4/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." exim4 ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/fail2ban/index.php b/web/edit/server/fail2ban/index.php index 7194e00b..98f5ff53 100644 --- a/web/edit/server/fail2ban/index.php +++ b/web/edit/server/fail2ban/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." fail2ban ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/httpd/index.php b/web/edit/server/httpd/index.php index 159c687b..05864a97 100644 --- a/web/edit/server/httpd/index.php +++ b/web/edit/server/httpd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." httpd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/mariadb/index.php b/web/edit/server/mariadb/index.php index c30c259b..bf9d9fb6 100644 --- a/web/edit/server/mariadb/index.php +++ b/web/edit/server/mariadb/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mariadb ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/mysql/index.php b/web/edit/server/mysql/index.php index 6fcacf0b..a0dcc72e 100644 --- a/web/edit/server/mysql/index.php +++ b/web/edit/server/mysql/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mysql ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/mysqld/index.php b/web/edit/server/mysqld/index.php index 865eaff2..7c8548ed 100644 --- a/web/edit/server/mysqld/index.php +++ b/web/edit/server/mysqld/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mysqld ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/named/index.php b/web/edit/server/named/index.php index 3370d353..6fc04a9c 100644 --- a/web/edit/server/named/index.php +++ b/web/edit/server/named/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." named ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/nginx/index.php b/web/edit/server/nginx/index.php index 3eb1ab85..f9da848a 100644 --- a/web/edit/server/nginx/index.php +++ b/web/edit/server/nginx/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." nginx ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/php-fpm/index.php b/web/edit/server/php-fpm/index.php index ea6d653d..c2c2413f 100644 --- a/web/edit/server/php-fpm/index.php +++ b/web/edit/server/php-fpm/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/php/index.php b/web/edit/server/php/index.php index ea6d653d..c2c2413f 100644 --- a/web/edit/server/php/index.php +++ b/web/edit/server/php/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/php5-fpm/index.php b/web/edit/server/php5-fpm/index.php index ea6d653d..c2c2413f 100644 --- a/web/edit/server/php5-fpm/index.php +++ b/web/edit/server/php5-fpm/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/postgresql/index.php b/web/edit/server/postgresql/index.php index f679c59d..abd003e1 100644 --- a/web/edit/server/postgresql/index.php +++ b/web/edit/server/postgresql/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_options'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." postgresql-hba ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/proftpd/index.php b/web/edit/server/proftpd/index.php index 9cf45eab..32ffd125 100644 --- a/web/edit/server/proftpd/index.php +++ b/web/edit/server/proftpd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." proftpd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/spamassassin/index.php b/web/edit/server/spamassassin/index.php index 13d89983..afd1330b 100644 --- a/web/edit/server/spamassassin/index.php +++ b/web/edit/server/spamassassin/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." spamassassin ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/spamd/index.php b/web/edit/server/spamd/index.php index 843cc580..95f720a5 100644 --- a/web/edit/server/spamd/index.php +++ b/web/edit/server/spamd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." spamd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/vsftpd/index.php b/web/edit/server/vsftpd/index.php index 20e29264..ed26924c 100644 --- a/web/edit/server/vsftpd/index.php +++ b/web/edit/server/vsftpd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." vsftpd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/web/index.php b/web/edit/web/index.php index 75b6942c..e736908d 100644 --- a/web/edit/web/index.php +++ b/web/edit/web/index.php @@ -230,8 +230,8 @@ if (!empty($_POST['save'])) { $restart_proxy = 'yes'; } - // Change proxy template / Update extension list - if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) { + // Change proxy template / Update extension list (admin only) + if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg'])) && ($_SESSION['user'] == 'admin')) { $ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']); $ext = preg_replace("/,/", " ", $ext); $ext = preg_replace('/\s+/', ' ',$ext); @@ -279,7 +279,7 @@ if (!empty($_POST['save'])) { } // Change SSL certificate - if (( $v_letsencrypt == 'no' ) && ( $v_ssl == 'yes' ) && (!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) { + if (( $v_letsencrypt == 'no' ) && (empty($_POST['v_letsencrypt'])) && ( $v_ssl == 'yes' ) && (!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) { if (( $v_ssl_crt != str_replace("\r\n", "\n", $_POST['v_ssl_crt'])) || ( $v_ssl_key != str_replace("\r\n", "\n", $_POST['v_ssl_key'])) || ( $v_ssl_ca != str_replace("\r\n", "\n", $_POST['v_ssl_ca']))) { exec ('mktemp -d', $mktemp_output, $return_var); $tmpdir = $mktemp_output[0]; diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php index 7d11a4e4..7af6d1ec 100644 --- a/web/inc/i18n/el.php +++ b/web/inc/i18n/el.php @@ -2,7 +2,8 @@ /** * VestaCP interface translation in Greek. * Translation by Cemendur. - * Last update: 10/03/2015 + * Last update: 2/02/2017 by ArisC + * */ $LANG['el'] = array( @@ -26,22 +27,22 @@ $LANG['el'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', - 'LOGIN' => 'LOGIN', - 'RESET PASSWORD' => 'RESET PASSWORD', - 'SEARCH' => 'SEARCH', - 'PACKAGE' => 'PACKAGE', + 'LOGIN' => 'ΣΥΝΔΕΣΗ', + 'RESET PASSWORD' => 'ΕΠΑΝΑΦΟΡΑ ΚΩΔΙΚΟΥ ΠΡΟΣΒΑΣΗΣ', + 'SEARCH' => 'ΑΝΑΖΗΤΗΣΗ', + 'PACKAGE' => 'ΠΑΚΕΤΑ', 'RRD' => 'RRD', - 'STATS' => 'STATS', - 'LOG' => 'LOG', - 'UPDATES' => 'UPDATES', + 'STATS' => 'ΣΤΑΤΙΣΤΙΚΑ', + 'LOG' => 'ΑΡΧΕΙΟ', + 'UPDATES' => 'ΕΝΗΜΕΡΩΣΕΙΣ', 'FIREWALL' => 'FIREWALL', 'SERVER' => 'SERVER', - 'MEMORY' => 'MEMORY', - 'DISK' => 'DISK', - 'NETWORK' => 'NETWORK', + 'MEMORY' => 'ΜΝΗΜΗ', + 'DISK' => 'ΔΙΣΚΟΣ', + 'NETWORK' => 'ΔΙΚΤΥΟ', 'Web Log Manager' => 'Web Log Manager', - 'no notifications' => 'no notifications', + 'no notifications' => 'Δεν υπάρχουν ειδοποιήσεις', 'Add User' => 'Προσθέστε χρήστη', 'Add Domain' => 'Προσθέστε domain', @@ -397,7 +398,7 @@ $LANG['el'] = array( 'SSH' => 'SSH', 'FTP' => 'FTP', 'VESTA' => 'VESTA', - 'Add one more Name Server' => 'Add one more Name Server', + 'Add one more Name Server' => 'Προσθέστε ένα ακόμη Name Server', 'web domain' => 'web domain', 'dns domain' => 'dns domain', @@ -409,7 +410,7 @@ $LANG['el'] = array( 'cron' => 'cron', 'user dir' => 'user dir', - 'unlimited' => 'unlimited', + 'unlimited' => 'απεριόριστα', '1 account' => '1 λογαριασμός', '%s accounts' => '%s λογαριασμοί', '1 domain' => '1 domain', @@ -534,23 +535,23 @@ $LANG['el'] = array( 'MAIL_RESET_SUBJECT' => 'Επαναφορά κωδικού πρόσβασης στο %s', 'PASSWORD_RESET_REQUEST' => "Για να επαναφέρετε τον κωδικό πρόσβασης του πίνακα ελέγχου σας, παρακαλώ ακολουθήστε το link:\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' => 'Ιαν', + 'Feb' => 'Φεβ', + 'Mar' => 'Μαρ', + 'Apr' => 'Απρ', + 'May' => 'Μαι', + 'Jun' => 'Ιουν', + 'Jul' => 'Ιουλ', + 'Aug' => 'Αυγ', + 'Sep' => 'Σεπ', + 'Oct' => 'Οκτ', + 'Nov' => 'Νοε', + 'Dec' => 'Δεκ', - 'Configuring Server' => 'Configuring Server', + 'Configuring Server' => 'Διαμόρφωση Διακομιστή', 'Hostname' => 'Hostname', - 'Time Zone' => 'Time Zone', - 'Default Language' => 'Default Language', + 'Time Zone' => 'Ζώνη Ώρας', + 'Default Language' => 'Προεπιλεγμένη Γλώσσα', 'Proxy Server' => 'Proxy Server', 'Web Server' => 'Web Server', 'Backend Server' => 'Backend Server', @@ -565,11 +566,11 @@ $LANG['el'] = array( 'phpMyAdmin URL' => 'phpMyAdmin URL', 'PostgreSQL Support' => 'PostgreSQL Support', 'phpPgAdmin URL' => 'phpPgAdmin URL', - 'Maximum Number Of Databases' => 'Maximum Number Of Databases', - 'Current Number Of Databases' => 'Current Number Of Databases', + 'Maximum Number Of Databases' => 'Μέγιστος αριθμός των βάσεων δεδομένων', + 'Current Number Of Databases' => 'Τρέχων αριθμός των βάσεων δεδομένων', 'Local backup' => 'Local backup', - 'Compression level' => 'Compression level', - 'Directory' => 'Directory', + 'Compression level' => 'Επίπεδο συμπίεσης', + 'Directory' => 'Ευρετήριο', 'Remote backup' => 'Remote backup', 'ftp' => 'FTP', 'sftp' => 'SFTP', @@ -584,50 +585,50 @@ $LANG['el'] = array( 'FileManager' => 'FileManager', 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => 'sort by', - 'Date' => 'Date', + 'sort by' => 'ταξινόμηση κατά', + 'Date' => 'Ημερομηνία', 'Starred' => 'Starred', - 'Name' => 'Name', + 'Name' => 'Όνομα', - 'save to favorites' => 'save to favorites', + 'save to favorites' => 'Αποθηκεύστε στα αγαπημένα', 'File Manager' => 'File Manager', 'size' => 'size', 'date' => 'date', 'name' => 'name', - 'Initializing' => 'Initializing', + 'Initializing' => 'Αρχικοποίηση', 'UPLOAD' => 'UPLOAD', - 'NEW FILE' => 'NEW FILE', - 'NEW DIR' => 'NEW DIR', - 'DELETE' => 'DELETE', - 'RENAME' => 'RENAME', - 'MOVE' => 'MOVE', - 'RIGHTS' => 'RIGHTS', - 'COPY' => 'COPY', - 'ARCHIVE' => 'ARCHIVE', - 'EXTRACT' => 'EXTRACT', - 'DOWNLOAD' => 'DOWNLOAD', - 'Are you sure?' => 'Are you sure?', + 'NEW FILE' => 'ΝΕΟ ΑΡΧΕΙΟ', + 'NEW DIR' => 'ΝΕΟΣ ΦΑΚΕΛΟΣ', + 'DELETE' => 'ΔΙΑΓΡΑΦΗ', + 'RENAME' => 'ΜΕΤΟΝΟΜΑΣΙΑ', + 'MOVE' => 'ΜΕΤΑΚΙΝΗΣΗ', + 'RIGHTS' => 'ΔΙΚΑΙΩΜΑΤΑ', + 'COPY' => 'ΑΝΤΙΓΡΑΦΕΙ', + 'ARCHIVE' => 'ΑΡΧΕΙΟ', + 'EXTRACT' => 'ΕΞΑΓΩΓΗ', + 'DOWNLOAD' => 'ΚΑΤΕΒΑΣΤΕ', + 'Are you sure?' => 'Είσται σίγουρος/η?', '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', + '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' => 'Done', 'Close' => 'Close', - 'Copy' => 'Copy', - 'Cancel' => 'Cancel', - 'Rename' => 'Rename', - 'Move' => 'Move', - 'Change Rights' => 'Change Rights', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', + 'Copy' => 'Αντιγραφή', + 'Cancel' => 'Ματαίωση', + 'Rename' => 'Μετονομασία', + 'Move' => 'Μετακίνηση', + 'Change Rights' => 'Αλλαγή Δικαιωμάτων', + 'Delete' => 'Διαγραφή', + 'Extract' => 'Εξαγωγή', + 'Create' => 'Δημιουργία', + 'Compress' => 'Συμπιέζω', 'OK' => 'OK', 'YOU ARE COPYING' => 'YOU ARE COPYING', 'YOU ARE REMOVING' => 'YOU ARE REMOVING', @@ -641,7 +642,7 @@ $LANG['el'] = array( 'existing files will be replaced' => 'existing files will be replaced', 'Original name' => 'Original name', 'File' => 'File', - 'already exists' => 'already exists', + 'already exists' => 'υπάρχει ήδη', 'Create file' => 'Create file', 'Create directory' => 'Create directory', 'read by owner' => 'read by owner', @@ -708,29 +709,29 @@ $LANG['el'] = array( '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.', - 'Minutes' => 'Minutes', + 'Minutes' => 'Λεπτά', 'Hourly' => 'Hourly', 'Run Command' => 'Run Command', 'every month' => 'every month', 'every odd month' => 'every odd month', 'every even month' => 'every even month', - 'every day' => 'every day', + 'every day' => 'κάθε μέρα', 'every odd day' => 'every odd day', 'every even day' => 'every even day', 'weekdays (5 days)' => 'weekdays (5 days)', 'weekend (2 days)' => 'weekend (2 days)', - 'Monday' => 'Monday', - 'Tuesday' => 'Tuesday', - 'Wednesday' => 'Wednesday', - 'Thursday' => 'Thursday', - 'Friday' => 'Friday', - 'Saturday' => 'Saturday', - 'Sunday' => 'Sunday', - 'every hour' => 'every hour', - 'every two hours' => 'every two hours', - 'every minute' => 'every minute', - 'every two minutes' => 'every two minutes', - 'every' => 'every', + 'Monday' => 'Δευτέρα', + 'Tuesday' => 'Τρίτη', + 'Wednesday' => 'Τετάρτη', + 'Thursday' => 'Πέμπτη', + 'Friday' => 'Παρασκευή', + 'Saturday' => 'Σάββατο', + 'Sunday' => 'Κυριακή', + 'every hour' => 'κάθε ώρα', + 'every two hours' => 'κάθε δύο ώρες', + 'every minute' => 'κάθε λεπτό', + 'every two minutes' => 'κάθε δύο λεπτά', + 'every' => 'κάθε', 'Generate' => 'Generate', 'webalizer' => 'webalizer', diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php index a8aafbfe..73623c40 100644 --- a/web/inc/i18n/nl.php +++ b/web/inc/i18n/nl.php @@ -3,6 +3,7 @@ * Vesta language file * drMacFaulty (wsanders@outlook.com, wsanders.eu) * ricardo777 (info@intio.nl, intio.nl) + * DaniWinter (mail@daniwinter.nl, daniwinter.nl) */ $LANG['nl'] = array( @@ -26,22 +27,22 @@ $LANG['nl'] = array( 'CRON' => 'Taken', 'BACKUP' => 'Back-up', - 'LOGIN' => 'LOGIN', - 'RESET PASSWORD' => 'RESET PASSWORD', - 'SEARCH' => 'SEARCH', - 'PACKAGE' => 'PACKAGE', + 'LOGIN' => 'INLOGGEN', + 'RESET PASSWORD' => 'WACHTWOORD RESETTEN', + 'SEARCH' => 'ZOEK', + 'PACKAGE' => 'PAKKET', 'RRD' => 'RRD', - 'STATS' => 'STATS', + 'STATS' => 'STATISTIEKEN', 'LOG' => 'LOG', 'UPDATES' => 'UPDATES', 'FIREWALL' => 'FIREWALL', 'SERVER' => 'SERVER', - 'MEMORY' => 'MEMORY', - 'DISK' => 'DISK', - 'NETWORK' => 'NETWORK', - 'Web Log Manager' => 'Web Log Manager', + 'MEMORY' => 'GEHEUGEN', + 'DISK' => 'SCHIJF', + 'NETWORK' => 'NETWERK', + 'Web Log Manager' => 'Web Log Beheer', - 'no notifications' => 'no notifications', + 'no notifications' => 'geen notificaties', 'Add User' => 'Gebruiker toevoegen', 'Add Domain' => 'Domein toevoegen', @@ -196,12 +197,12 @@ $LANG['nl'] = array( 'SSL Home Directory' => 'SSL Map', 'Lets Encrypt Support' => 'Lets Encrypt Support', 'Lets Encrypt' => 'Lets Encrypt', - 'Your certificate will be automatically issued in 5 minutes' => 'Your certificate will be automatically issued in 5 minutes', + 'Your certificate will be automatically issued in 5 minutes' => 'Het certificaat wordt automatisch aangemaakt in 5 minuten', 'Proxy Support' => 'Proxy Ondersteuning', 'Proxy Extensions' => 'Proxy Extensies', 'Web Statistics' => 'Web Statistieken', 'Additional FTP Account' => 'Extra FTP Account', - 'Path' => 'Path', + 'Path' => 'Pad', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Loopt af', @@ -216,16 +217,16 @@ $LANG['nl'] = array( 'Autoreply' => 'Auto-antwoord', 'Forward to' => 'Doorsturen naar', 'Do not store forwarded mail' => 'Doorgestuurde e-mail niet opslaan', - 'IMAP hostname' => 'IMAP hostname', - 'IMAP port' => 'IMAP port', - 'IMAP security' => 'IMAP security', - 'IMAP auth method' => 'IMAP auth method', - 'SMTP hostname' => 'SMTP hostname', - 'SMTP port' => 'SMTP port', - 'SMTP security' => 'SMTP security', - 'SMTP auth method' => 'SMTP auth method', + 'IMAP hostname' => 'IMAP hostnaam', + 'IMAP port' => 'IMAP poort', + 'IMAP security' => 'IMAP beveiliging', + 'IMAP auth method' => 'IMAP authenticatie methode', + 'SMTP hostname' => 'SMTP hostnaam', + 'SMTP port' => 'SMTP poort', + 'SMTP security' => 'SMTP beveiliging', + 'SMTP auth method' => 'SMTP authenticatie methode', 'STARTTLS' => 'STARTTLS', - 'Normal password' => 'Normal password', + 'Normal password' => 'Normaal wachtwoord', 'database' => 'database', 'User' => 'Gebruiker', 'Host' => 'Host', @@ -307,7 +308,7 @@ $LANG['nl'] = array( 'Prefix will be automaticaly added to username' => 'Voorvoegsel %s wordt automatisch toegevoegd aan gebruikersnaam', 'Send FTP credentials to email' => 'Stuur FTP inloggegevens naar e-mailadres', 'Expiration Date' => 'Vervaldatum', - 'YYYY-MM-DD' => 'YYYY-MM-DD', + 'YYYY-MM-DD' => 'DD-MM-YYYY', 'Name servers' => 'Naamservers', 'Record' => 'Record', 'IP or Value' => 'IP of Waarde', @@ -485,7 +486,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?', + 'LEAVE_PAGE_CONFIRMATION' => 'Pagina verlaten?', 'RESTART_CONFIRMATION' => 'Weet u zeker dat %s wilt herstarten?', 'Welcome' => 'Welkom', 'LOGGED_IN_AS' => 'Ingelogd als gebruiker %s', @@ -504,12 +505,13 @@ $LANG['nl'] = array( 'RESTORE_SCHEDULED' => 'De taak is toegevoegd aan de wachtrij. U ontvangt een e-mailbericht zodra de back-up is hersteld.', 'RESTORE_EXISTS' => 'Er wordt al een hersteltaak uitgevoerd. Wacht a.u.b. totdat de reservekopie is teruggezet.', - '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' => 'Type domeinnaam, één per lijn. Om alle domeinen uit te sluiten gebruik *. Om specifieke mappen uit te sluiten gebruik het volgende formaat: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Type domeinnaam, één per lijn. Om alle domeinen uit te sluiten gebruik *', + 'MAIL_EXCLUSIONS' => 'Type domeinnaam, één per lijn. Om alle domeinen uit te sluiten gebruik *. Om specifieke mappen uit te sluiten gebruik het volgende formaat: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Type volledige database naam, één per lijn. Om alle databases uit te sluiten gebruik *', + 'CRON_EXCLUSIONS' => 'Om alle cronjobs uit te sluiten gebruik *', + 'USER_EXCLUSIONS' => 'Type mapnaam, één per mijn. Om alle mappen uit te sluiten gebruik *', + 'Welcome to Vesta Control Panel' => 'Welkom bij het Vesta Controlepaneel', 'MAIL_FROM' => 'Vesta Controlepaneel ', @@ -534,21 +536,21 @@ $LANG['nl'] = array( 'MAIL_RESET_SUBJECT' => 'Wachtwoordherstel voor %s', 'PASSWORD_RESET_REQUEST' => "Om uw wachtwoord te herstellen klikt u op de link hieronder.\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nWanneer bovenstaande link niet werkt kunt u ook naar de volgende pagina gaan https://%s/reset/?action=code&user=%s en hier uw wachtwoord herstelcode invullen:\n%s\n\nAls u geen wachtwoord herstelcode heeft aangevraagd, kunt u dit bericht negeren.\n\n--\nVesta Controlepaneel\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' => 'jan', + 'Feb' => 'feb', + 'Mar' => 'mrt', + 'Apr' => 'apr', + 'May' => 'mei', + 'Jun' => 'jun', + 'Jul' => 'jul', + 'Aug' => 'aug', + 'Sep' => 'sep', + 'Oct' => 'okt', + 'Nov' => 'nov', + 'Dec' => 'dec', 'Configuring Server' => 'Server Instellen', - 'Hostname' => 'Hostname', + 'Hostname' => 'Hostnaam', 'Time Zone' => 'Tijdzone', 'Default Language' => 'Standaard Taal', 'Proxy Server' => 'Proxy Server', @@ -565,160 +567,160 @@ $LANG['nl'] = array( 'phpMyAdmin URL' => 'phpMyAdmin URL', 'PostgreSQL Support' => 'PostgreSQL Support', 'phpPgAdmin URL' => 'phpPgAdmin URL', - 'Maximum Number Of Databases' => 'Maximum Number Of Databases', - 'Current Number Of Databases' => 'Current Number Of Databases', + 'Maximum Number Of Databases' => 'Maximale aantal Databases', + 'Current Number Of Databases' => 'Huidige aantal Databases', 'Local backup' => 'Lokale backup', - 'Compression level' => 'Compression level', - 'Directory' => 'Directory', - 'Remote backup' => 'Afstand backup', + 'Compression level' => 'Compressie level', + 'Directory' => 'Map', + 'Remote backup' => 'Externe backup', 'ftp' => 'FTP', 'sftp' => 'SFTP', 'SFTP Chroot' => 'SFTP Chroot', - 'FileSystem Disk Quota' => 'BestandenSystem Schijf Quotum', + 'FileSystem Disk Quota' => 'Bestandssysteem Schijf Quotum', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'Voorbeeld', - 'Reseller Role' => 'Reseller Role', + 'Reseller Role' => 'Verkoper Rol', 'Web Config Editor' => 'Web Configuratie Bewerker', 'Template Manager' => 'Voorbeeld Manager', - 'Backup Migration Manager' => 'Backup Migration Manager', + 'Backup Migration Manager' => 'Backup Migratie Manager', 'FileManager' => 'FileManager', 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => 'sort by', - 'Date' => 'Date', - 'Starred' => 'Starred', - 'Name' => 'Name', + 'sort by' => 'sorteer op', + 'Date' => 'Datum', + 'Starred' => 'Favoriet', + 'Name' => 'Naam', - 'save to favorites' => 'save to favorites', + 'save to favorites' => 'sla op als favoriet', - 'File Manager' => 'File Manager', - 'size' => 'size', - 'date' => 'date', - 'name' => 'name', - 'Initializing' => 'Initializing', + 'File Manager' => 'Bestandsbeheer', + 'size' => 'grootte', + 'date' => 'datum', + 'name' => 'naam', + 'Initializing' => 'Initialiseren', 'UPLOAD' => 'UPLOAD', - 'NEW FILE' => 'NEW FILE', - 'NEW DIR' => 'NEW DIR', - 'DELETE' => 'DELETE', - 'RENAME' => 'RENAME', - 'MOVE' => 'MOVE', - 'RIGHTS' => 'RIGHTS', - 'COPY' => 'COPY', - 'ARCHIVE' => 'ARCHIVE', - 'EXTRACT' => 'EXTRACT', + 'NEW FILE' => 'NIEUW BESTAND', + 'NEW DIR' => 'NIEUWE MAP', + 'DELETE' => 'VERWIJDER', + 'RENAME' => 'HERNOEM', + 'MOVE' => 'VERPLAATS', + 'RIGHTS' => 'RECHTEN', + 'COPY' => 'KOPIEER', + 'ARCHIVE' => 'INPAKKEN', + 'EXTRACT' => 'UITPAKKEN', 'DOWNLOAD' => 'DOWNLOAD', - 'Are you sure?' => 'Are you sure?', + 'Are you sure?' => 'Ben je zeker?', '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', - 'Move' => 'Move', - 'Change Rights' => 'Change Rights', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', + 'to reload the page' => 'om de pagina te herladen', + 'Directory name cannot be empty' => 'Mapnaam naam kan niet leeg zijn', + 'File name cannot be empty' => 'Bestandsnaam kan niet leeg zijn', + 'No file selected' => 'Geen bestand geselecteerd', + 'No file or folder selected' => 'Geen bestand of map geselecteerd', + 'File type not supported' => 'Bestandstype niet ondersteund', + 'Directory download not available in current version' => 'Het downloaden van mappen is niet beschikbaar in deze versie', + 'Directory not available' => 'Map niet beschikbaar', + 'Done' => 'Klaar', + 'Close' => 'Sluit', + 'Copy' => 'Kopieer', + 'Cancel' => 'Annuleer', + 'Rename' => 'Hernoemen', + 'Move' => 'Verplaatsen', + 'Change Rights' => 'Rechten aanpassen', + 'Delete' => 'Verwijder', + 'Extract' => 'Uitpakken', + 'Create' => 'Aanmaken', + 'Compress' => 'Inpakken', 'OK' => 'OK', - 'YOU ARE COPYING' => 'YOU ARE COPYING', - 'YOU ARE REMOVING' => 'YOU ARE REMOVING', - 'Delete items' => 'Delete items', - 'Copy files' => 'Copy files', - 'Move files' => 'Move files', - 'Are you sure you want to copy' => 'Are you sure you want to copy', - 'Are you sure you want to move' => 'Are you sure you want to move', - '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', - 'read by owner' => 'read by owner', - 'write by owner' => 'write by owner', - 'execute/search by owner' => 'execute/search by owner', - 'read by group' => 'read by group', - 'write by group' => 'write by group', - 'execute/search by group' => 'execute/search by group', - 'read by others' => 'read by others', - 'write by others' => 'write by others', - 'execute/search by others' => 'execute/search by others', + 'YOU ARE COPYING' => 'JE BENT AAN HET KOPIËREN', + 'YOU ARE REMOVING' => 'JE BENT AAN HET VERPLAATSEN', + 'Delete items' => 'Verwijder items', + 'Copy files' => 'Bestanden kopiëren', + 'Move files' => 'Bestanden verplaatsen', + 'Are you sure you want to copy' => 'Weet u zeker dat u wilt kopiëren', + 'Are you sure you want to move' => 'Weet u zeker dat u wilt verplaatsen', + 'Are you sure you want to delete' => 'Weet je zeker dat je wilt verwijderen', + 'into' => 'naar', + 'existing files will be replaced' => 'bestaande bestanden zullen worden vervangen', + 'Original name' => 'Oorspronkelijke naam', + 'File' => 'Bestand', + 'already exists' => 'bestaat al', + 'Create file' => 'Maak een bestand', + 'Create directory' => 'Maak een map', + 'read by owner' => 'lezen door eigenaar', + 'write by owner' => 'schrijven door eigenaar', + 'execute/search by owner' => 'uitvoeren/zoeken door eigenaar', + 'read by group' => 'lezen door groep', + 'write by group' => 'schrijven door groep', + 'execute/search by group' => 'uitvoeren/zoeken door groep', + 'read by others' => 'lezen door andere', + 'write by others' => 'schrijven door andere', + 'execute/search by others' => 'uitvoeren/zoeken door groep', - 'Shortcuts' => 'Shortcuts', - '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', - 'Move up through elements list' => 'Move up through elements list', - 'Move down through elements list' => 'Move down through elements list', + 'Shortcuts' => 'Snelkoppelingen', + 'Add New object' => 'Voeg nieuw object toe', + 'Save Form' => 'Formulier opslaan', + 'Cancel saving form' => 'Annuleer opslaan', + 'Go to USER list' => 'Ga naar GEBRUIKER lijst', + 'Go to WEB list' => 'Ga naar WEBSITES lijst', + 'Go to DNS list' => 'Ga naar DNS lijst', + 'Go to MAIL list' => 'Ga naar MAIL lijst', + 'Go to DB list' => 'Ga naar DATABASES lijst', + 'Go to CRON list' => 'Ga naar CRON lijst', + 'Go to BACKUP list' => 'Ga naar BACKUP lijst', + 'Focus on search' => 'Focus op zoek', + 'Display/Close shortcuts' => 'Toon/Sluiten snelkoppelingen', + 'Move backward through top menu' => 'Beweeg terug door topmenu', + 'Move forward through top menu' => 'Beweeg vooruit door topmenu', + 'Enter focused element' => 'Enter gefocust element', + 'Move up through elements list' => 'Beweeg omhoog door elementen lijst', + 'Move down through elements list' => 'Beweeg omlaag door elementen lijst', 'Upload' => 'Upload', - 'New File' => 'New File', - 'New Folder' => 'New Folder', + 'New File' => 'Nieuw bestand', + 'New Folder' => 'Nieuwe map', 'Download' => 'Download', - 'Archive' => 'Archive', - 'Save File (in text editor)' => 'Save File (in text editor)', - 'Close Popup / Cancel' => 'Close Popup / Cancel', - 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Down' => 'Move Cursor Down', - 'Switch to Left Tab' => 'Switch to Left Tab', - 'Switch to Right Tab' => 'Switch to Right Tab', + 'Archive' => 'Inpakken', + 'Save File (in text editor)' => 'Bestand opslaan (in tekst verwerker)', + 'Close Popup / Cancel' => 'Sluit Popup / Annuleer', + 'Move Cursor Up' => 'Beweeg cursor omhoog', + 'Move Cursor Down' => 'Beweeg Cursor omlaag', + 'Switch to Left Tab' => 'Switch naar links Tab', + 'Switch to Right Tab' => 'Switch naar rechts Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of the File List' => 'Go to the Top of the File List', - 'Go to the Last File' => 'Go to the Last File', - 'Open File / Enter Directory' => 'Open File / Enter Directory', - 'Edit File' => 'Edit File', - 'Go to Parent Directory' => 'Go to Parent Directory', - 'Select Current File' => 'Select Current File', - 'Select Bunch of Files' => 'Select Bunch of Files', - 'Add File to the Current Selection' => 'Add File to the Current Selection', - 'Select All Files' => 'Select All Files', + 'Go to the Top of the File List' => 'Ga naar boven in de bestandenlijst', + 'Go to the Last File' => 'Ga naar het laatste bestand', + 'Open File / Enter Directory' => 'Bestand/Map openen', + 'Edit File' => 'Wijzig bestand', + 'Go to Parent Directory' => 'Ga naar bovenliggende map', + 'Select Current File' => 'Selecteer Huidig bestand', + 'Select Bunch of Files' => 'Selecteer meerdere bestanden', + 'Add File to the Current Selection' => 'Bestand toevoegen aan de huidige selectie', + 'Select All Files' => 'Selecteer alle bestanden', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', + 'snelkoppelingen zijn geïnspireerd door 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.', + 'Licence Key' => 'Licentiecode', + 'Enter License Key' => 'Voer de licentiecode in', + 'Buy Licence' => 'Koop Licentie', + 'Buy Lifetime License' => 'Kopen Levenslange licentie', + 'Disable and Cancel Licence' => 'Activeer en Annuleren licentie', + 'Licence Activated' => 'Licentie geactiveerde', + 'Licence Deactivated' => 'Licentie gedeactiveerd', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Gebruikers beperken zodat zij niet SSH kunnen gebruiken en enkel hun home map kunnen gebruiken.', + 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Blader, kopieer, wijzig, bekijk, en verkrijg al je webbestanden met een volledige bestandsbeheerder.', + 'This is a commercial module, you would need to purchace license key to enable it.' => 'Dit is een commerciële module, u moet een licentiesleutel kopen om het te kunnen gebruiken.', 'Minutes' => 'Minuten', - 'Hourly' => 'Ieder Uur', + 'Hourly' => 'Ieder uur', 'Run Command' => 'Voer commando uit', 'every month' => 'elke maand', - 'every odd month' => 'every odd month', - 'every even month' => 'every even month', - 'every day' => 'every day', - 'every odd day' => 'every odd day', - 'every even day' => 'every even day', - 'weekdays (5 days)' => 'weekdays (5 days)', - 'weekend (2 days)' => 'weekend (2 days)', + 'every odd month' => 'elke oneven maand', + 'every even month' => 'elke even maand', + 'every day' => 'elke dag', + 'every odd day' => 'elke oneven dag', + 'every even day' => 'elke even dag', + 'weekdays (5 days)' => 'weekdagen (5 dagen)', + 'weekend (2 days)' => 'weekend (2 dagen)', 'Monday' => 'Maandag', 'Tuesday' => 'Dinsdag', 'Wednesday' => 'Woensdag', @@ -737,21 +739,20 @@ $LANG['nl'] = array( 'awstats' => 'awstats', 'Vesta SSL' => 'Vesta SSL', - 'SUBJECT' => 'SUBJECT', - 'ALIASES' => 'ALIASES', - 'NOT_BEFORE' => 'NOT_BEFORE', - 'NOT_AFTER' => 'NOT_AFTER', - 'SIGNATURE' => 'SIGNATURE', + 'SUBJECT' => 'ONDERWERP', + 'ALIASES' => 'ALIASEN', + 'NOT_BEFORE' => 'NIET_VOOR', + 'NOT_AFTER' => 'NIET_NA', + 'SIGNATURE' => 'HANDTEKENING', 'PUB_KEY' => 'PUB_KEY', 'ISSUER' => 'ISSUER', - 'Use server hostname' => 'Use server hostname', - 'Use domain hostname' => 'Use domain hostname', - 'Use STARTTLS' => 'Use STARTTLS', - 'Use SSL' => 'Use SSL', - 'No encryption' => 'No encryption', - 'Do not use encryption' => 'Do not use encryption', - - 'maximum characters length, including prefix' => 'maximum %s characters length, including prefix', + 'Use server hostname' => 'Gebruik server hostnaam', + 'Use domain hostname' => 'Gebruik domein hostname', + 'Use STARTTLS' => 'Gebruik STARTTLS', + 'Use SSL' => 'Gebruik SSL', + 'No encryption' => 'Geen encryptie', + 'Do not use encryption' => 'Gebruik geen encryptie', + 'maximum characters length, including prefix' => 'maximaal %s karakters lang, inclusief prefix', ); diff --git a/web/inc/i18n/pt-BR.php b/web/inc/i18n/pt-BR.php index 0ec958ac..deac82ee 100644 --- a/web/inc/i18n/pt-BR.php +++ b/web/inc/i18n/pt-BR.php @@ -40,7 +40,7 @@ $LANG['pt-BR'] = array( 'NETWORK' => 'NETWORK', 'Web Log Manager' => 'Gerenciador de Log Web', - 'no notifications' => 'no notifications', + 'no notifications' => 'sem notificações', 'Add User' => 'Adicionar Usuário', 'Add Domain' => 'Adicionar Domínio', @@ -406,7 +406,7 @@ $LANG['pt-BR'] = array( 'cron job' => 'tarefa', 'cron' => 'cron', - 'user dir' => 'user dir', + 'user dir' => 'diretório do usuário', 'unlimited' => 'ilimitado', '1 account' => '1 conta', @@ -422,9 +422,9 @@ $LANG['pt-BR'] = array( '1 cron job' => '1 tarefa', '%s cron jobs' => '%s tarefas', '1 archive' => '1 arquivo', - '%s archives' => '%s aquivos', + '%s archives' => '%s arquivos', '1 item' => '1 item', - '%s items' => '%s items', + '%s items' => '%s itens', '1 package' => '1 pacote', '%s packages' => '%s pacotes', '1 IP address' => '1 endereço IP', @@ -628,8 +628,8 @@ $LANG['pt-BR'] = array( 'Create' => 'Criar', 'Compress' => 'Comprimir', 'OK' => 'OK', - 'YOU ARE COPYING' => 'VOCE ESTA COPIANDO', - 'YOU ARE REMOVING' => 'VOCE ESTA EXCLUINDO', + 'YOU ARE COPYING' => 'VOCÊ ESTÁ COPIANDO', + 'YOU ARE REMOVING' => 'VOCÊ ESTÁ EXCLUINDO', 'Delete items' => 'Excluir itens', 'Copy files' => 'Copiar arquivos', 'Move files' => 'Mover arquivos', diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index 46f1eafb..da88e88c 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -197,7 +197,7 @@ $LANG['ru'] = array( 'SSL Home Directory' => 'Директория SSL', 'Lets Encrypt Support' => 'Поддержка Lets Encrypt', 'Lets Encrypt' => 'Lets Encrypt', - 'Your certificate will be automatically issued in 5 minutes' => 'Сертификат будет автоматически создан в течении 5-ти минут', + 'Your certificate will be automatically issued in 5 minutes' => 'Сертификат будет автоматически создан в течение 5-ти минут', 'Proxy Support' => 'Поддержка Proxy', 'Proxy Extensions' => 'Обработка Proxy', 'Web Statistics' => 'Статистика сайта', diff --git a/web/login/index.php b/web/login/index.php index 9edcfbb7..4be64ecc 100644 --- a/web/login/index.php +++ b/web/login/index.php @@ -34,62 +34,68 @@ if (isset($_SESSION['user'])) { // Basic auth if (isset($_POST['user']) && isset($_POST['password'])) { - $v_user = escapeshellarg($_POST['user']); + if(isset($_SESSION['token']) && isset($_POST['token']) && $_POST['token'] == $_SESSION['token']) { + $v_user = escapeshellarg($_POST['user']); - // Send password via tmp file - $v_password = exec('mktemp -p /tmp'); - $fp = fopen($v_password, "w"); - fwrite($fp, $_POST['password']."\n"); - fclose($fp); + // Send password via tmp file + $v_password = exec('mktemp -p /tmp'); + $fp = fopen($v_password, "w"); + fwrite($fp, $_POST['password']."\n"); + fclose($fp); - // Check user & password - exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." ".escapeshellarg($_SERVER['REMOTE_ADDR']), $output, $return_var); - unset($output); + // Check user & password + exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." ".escapeshellarg($_SERVER['REMOTE_ADDR']), $output, $return_var); + unset($output); - // Remove tmp file - unlink($v_password); + // Remove tmp file + unlink($v_password); - // Check API answer - if ( $return_var > 0 ) { - $ERROR = "".__('Invalid username or password').""; + // Check API answer + if ( $return_var > 0 ) { + $ERROR = "".__('Invalid username or password').""; - } else { - - // Make root admin user - if ($_POST['user'] == 'root') $v_user = 'admin'; - - // Get user speciefic parameters - exec (VESTA_CMD . "v-list-user ".$v_user." json", $output, $return_var); - $data = json_decode(implode('', $output), true); - - // Define session user - $_SESSION['user'] = key($data); - $v_user = $_SESSION['user']; - - // Get user favorites - get_favourites(); - - // Define language - $output = ''; - exec (VESTA_CMD."v-list-sys-languages json", $output, $return_var); - $languages = json_decode(implode('', $output), true); - if(in_array($data[$v_user]['LANGUAGE'], $languages)){ - $_SESSION['language'] = $data[$v_user]['LANGUAGE']; - } - else { - $_SESSION['language'] = 'en'; - } - - - // Redirect request to control panel interface - if (!empty($_SESSION['request_uri'])) { - header("Location: ".$_SESSION['request_uri']); - unset($_SESSION['request_uri']); - exit; } else { - header("Location: /"); - exit; + + // Make root admin user + if ($_POST['user'] == 'root') $v_user = 'admin'; + + // Get user speciefic parameters + exec (VESTA_CMD . "v-list-user ".$v_user." json", $output, $return_var); + $data = json_decode(implode('', $output), true); + + // Define session user + $_SESSION['user'] = key($data); + $v_user = $_SESSION['user']; + + // Get user favorites + get_favourites(); + + // Define language + $output = ''; + exec (VESTA_CMD."v-list-sys-languages json", $output, $return_var); + $languages = json_decode(implode('', $output), true); + if(in_array($data[$v_user]['LANGUAGE'], $languages)){ + $_SESSION['language'] = $data[$v_user]['LANGUAGE']; + } + else { + $_SESSION['language'] = 'en'; + } + + // Regenerate session id to prevent session fixation + session_regenerate_id(); + + // Redirect request to control panel interface + if (!empty($_SESSION['request_uri'])) { + header("Location: ".$_SESSION['request_uri']); + unset($_SESSION['request_uri']); + exit; + } else { + header("Location: /"); + exit; + } } + } else { + $ERROR = "".__('Invalid or missing token').""; } } @@ -119,6 +125,9 @@ if (empty($_SESSION['language'])) { } } +// Generate CSRF token +$_SESSION['token'] = md5(uniqid(mt_rand(), true)); + require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.$_SESSION['language'].'.php'); require_once('../templates/header.html'); require_once('../templates/login.html'); diff --git a/web/robots.txt b/web/robots.txt new file mode 100644 index 00000000..77470cb3 --- /dev/null +++ b/web/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/web/stop/service/index.php b/web/stop/service/index.php index a151dc6d..fea495b0 100644 --- a/web/stop/service/index.php +++ b/web/stop/service/index.php @@ -14,10 +14,14 @@ if ($_SESSION['user'] == 'admin') { exec (VESTA_CMD."v-stop-service ".$v_service, $output, $return_var); } } + if ($return_var != 0) { $error = implode('
', $output); - if (empty($error)) $error = __('SERVICE_ACTION_FAILED',__('stop'),$v_service); - $_SESSION['error_srv'] = $error; + if (empty($error)) { + $error = __('SERVICE_ACTION_FAILED', __('stop'), $v_service); + } + + $_SESSION['error_srv'] = $error; } unset($output); } diff --git a/web/templates/admin/add_mail_acc.html b/web/templates/admin/add_mail_acc.html index 647c0d87..5d3fbae8 100644 --- a/web/templates/admin/add_mail_acc.html +++ b/web/templates/admin/add_mail_acc.html @@ -170,7 +170,7 @@
- + :
diff --git a/web/templates/admin/edit_mail_acc.html b/web/templates/admin/edit_mail_acc.html index ed2db24d..33a346a4 100644 --- a/web/templates/admin/edit_mail_acc.html +++ b/web/templates/admin/edit_mail_acc.html @@ -177,7 +177,7 @@
- + :
diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index af7d44ed..e82050dc 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -106,7 +106,7 @@ - + " . strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -131,8 +131,8 @@ - - + + @@ -178,7 +178,7 @@ - + diff --git a/web/templates/login.html b/web/templates/login.html index d02127bd..ee7f9ca4 100644 --- a/web/templates/login.html +++ b/web/templates/login.html @@ -9,6 +9,7 @@
+ + + + + + + + +