bugfix nginx config
This commit is contained in:
parent
8ea03bd645
commit
b5772b2651
4
nlvmi
4
nlvmi
|
@ -198,7 +198,7 @@ function vmstart {
|
||||||
rm $TMPF
|
rm $TMPF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -n $WPORT ] && [ -n $NGINXCONFIGPATH ]; then
|
if [ ! -z $WPORT ] && [ ! -z $NGINXCONFIGPATH ]; then
|
||||||
echo "location /${array[1]}/ {" >$NGINXCONFIGPATH/${array[1]}.conf
|
echo "location /${array[1]}/ {" >$NGINXCONFIGPATH/${array[1]}.conf
|
||||||
echo " proxy_pass http://${array[3]}:$WPORT/;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
echo " proxy_pass http://${array[3]}:$WPORT/;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
||||||
echo " proxy_http_version 1.1;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
echo " proxy_http_version 1.1;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
||||||
|
@ -207,7 +207,7 @@ function vmstart {
|
||||||
echo " proxy_read_timeout 61s;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
echo " proxy_read_timeout 61s;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
||||||
echo " proxy_buffering off;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
echo " proxy_buffering off;" >>$NGINXCONFIGPATH/${array[1]}.conf
|
||||||
echo "}" >>$NGINXCONFIGPATH/${array[1]}.conf
|
echo "}" >>$NGINXCONFIGPATH/${array[1]}.conf
|
||||||
if [ -n $NGINXRESTARTCOMMAND ]; then $NGINXRESTARTCOMMAND; fi
|
if [ ! -z $NGINXRESTARTCOMMAND ]; then $NGINXRESTARTCOMMAND; fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
export VMFOUND="yes"
|
export VMFOUND="yes"
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
function clean($str) {
|
function clean($str) {
|
||||||
$search = array('&' , '"' , "'" , '<' , '>' );
|
$search = array('&' , '"' , "'" , '<' , '>' );
|
||||||
$replace = array('&', '"', ''', '<', '>' );
|
$replace = array('&', '"', ''', '<', '>' );
|
||||||
$str = str_replace($search, $replace, $str);
|
$str = str_replace($search, $replace, $str);
|
||||||
return $str;
|
$strf = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
|
||||||
|
return $strf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_REQUEST['logout'])){
|
if(isset($_REQUEST['logout'])){
|
||||||
|
|
Loading…
Reference in New Issue