diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index ec98fd72a..2b4c52ca4 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 03ecaec96..7c28f88d6 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 f8c8f62b7..86c8cf110 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 6be94b224..2e25d158d 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 02704cfb3..9a62805c8 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 2676e7506..10e87032b 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 4ca81f94a..eb31404fa 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 c0acd82d1..849107566 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 f827449fb..a08976413 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 307fe9b55..9c643b6e9 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 ? #----------------------------------------------------------# diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias index 932e1ffad..e5676af4e 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 1c1187060..1a722bad6 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 42dd269e0..e99384c10 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 60caf0c16..8da1451f8 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 2cd0be551..978b4be3d 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 diff --git a/bin/v-change-dns-domain-exp b/bin/v-change-dns-domain-exp index e5b0c6a95..23abb6f4d 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 fca3ecb75..175268e37 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 e235a6399..8bb213708 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 63c71e417..7f4d17b1f 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 131b7930b..c2e29553c 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 612ffc6ca..12f2454bd 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 5dbcf2997..90ca28aee 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 0540ac7b5..28c8809b1 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 edbbababe..842169494 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 022dbf1df..080e6a10c 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 d6977459b..c6de294ef 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 36a150008..4259335bc 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 c41fdde79..6e74fd9e9 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 8cfefadeb..61e1aa80c 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 05fde851a..17eb55d95 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 51215393a..6cbd1d999 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 c2be52f11..4d022cb9d 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 444510c78..f60a4eb0f 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 f9768e327..06b4c563a 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 afaa7fe78..6355e4a1b 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 ef88e7a4c..9b9623bb1 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-delete-dns-on-web-alias b/bin/v-delete-dns-on-web-alias index b74fc900c..87e688493 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 16bb2b463..4b4555dfa 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 ffc221147..f0da423cb 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 230d0113a..9d5f902f3 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 2169190af..d4cb02133 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 c690e9a46..bb2096514 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 f5147f9b9..820164ed8 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 f128d752a..f3541edbe 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 355684344..455ed9caa 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 e176a7555..312120f77 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 f5a7ddf8b..7a30175d0 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-web-domain b/bin/v-delete-web-domain index 6ef7280be..529f5d09e 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 5b5480961..47c004443 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 081305847..218f4d55f 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 84f9767a3..3fbc85da2 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 215506cb4..73eeabb73 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 131feb239..05e8c9403 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 005669997..33a22dca6 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 ec77df2f0..b530588a1 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 f011875c6..abff06a53 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 e7ad584a5..97a1a3e46 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 fa93482ed..750ae421d 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 d016b786f..b42e2e99d 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 4de9ae408..003f8d757 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 803594eb1..06d98a66d 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 bd282ca63..ab8c440fa 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 66fe81522..201dc7f3d 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 15dbe9c47..7bd658ceb 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 e845b6a83..bc8de6eec 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 c84e7744c..f1bc163f4 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 2e9a887fc..314c13bc0 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 2c651b2cd..420bcf050 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 9c688d6f3..935865d70 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 b47b67f4a..91bc1e16b 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 a1b6b3f4c..451dbd37d 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 252fac3c2..ac851b922 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 8a3381a99..877005c40 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 24eba8cf7..c77b750be 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 299bafd23..ce18707d7 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 3ee84c8ce..53f412707 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 b1761fd88..b9dc14c8e 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 69331cce4..e5ab182a9 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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/8/templates/web/nginx/php5-fpm/laravel.stpl b/install/debian/8/templates/web/nginx/php5-fpm/laravel.stpl new file mode 100644 index 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/6/templates/web/nginx/php-fpm/laravel.stpl b/install/rhel/6/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/7/templates/web/nginx/php-fpm/laravel.stpl b/install/rhel/7/templates/web/nginx/php-fpm/laravel.stpl new file mode 100644 index 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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.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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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.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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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.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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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.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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 0cc951770..d0682ea48 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/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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 e33332e03..2c697cc46 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.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 000000000..f1ffc4c04 --- /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 000000000..5ef66f987 --- /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 e33332e03..2c697cc46 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/vst-install-debian.sh b/install/vst-install-debian.sh index 4237f4f54..ada457056 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 unrar" + 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 unrar" + bsdmainutils cron vesta vesta-nginx vesta-php expect unrar-free" fi # Defining help function @@ -1091,6 +1091,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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 \ @@ -1108,6 +1109,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then 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-ubuntu.sh b/install/vst-install-ubuntu.sh index 421512edc..07d174921 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 diff --git a/web/edit/server/apache2/index.php b/web/edit/server/apache2/index.php index d3c79bcb9..10eddb7cb 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 155e8176e..bbe7e5634 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 8041b8d0c..29b8dcdf0 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 3b0801970..16736b0bd 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 fdac7defa..c35174c97 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 5e217134b..9e8015a93 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 65a069f02..4cce77209 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 163f0a0db..3aa66cf05 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 7194e00b5..98f5ff53d 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 159c687b7..05864a975 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 c30c259bd..bf9d9fb68 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 6fcacf0b4..a0dcc72e3 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 865eaff2d..7c8548ed2 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 3370d353e..6fc04a9c4 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 3eb1ab852..f9da848a1 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 ea6d653d2..c2c2413f3 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 ea6d653d2..c2c2413f3 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 ea6d653d2..c2c2413f3 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 f679c59df..abd003e12 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 9cf45eab9..32ffd125f 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 13d899832..afd1330b7 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 843cc5804..95f720a5d 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 20e29264f..ed26924ce 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 11cda0ea2..e736908dd 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); diff --git a/web/robots.txt b/web/robots.txt new file mode 100644 index 000000000..77470cb39 --- /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 a151dc6d8..fea495b06 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 647c0d87c..5d3fbae8b 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 ed2db24d1..33a346a4e 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 af7d44edc..e82050dc9 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/user/edit_web.html b/web/templates/user/edit_web.html index 20358b032..f26559b50 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -85,6 +85,29 @@ + + + + + + + + + + + + + + + +
+ +
+ +
+ + +