Skip to content

Commit

Permalink
update addons/linfo.sh from 1.10 to 2.0.2
Browse files Browse the repository at this point in the history
and work around for new open_basedir restrictions in .08 beta
  • Loading branch information
centminmod committed Mar 10, 2015
1 parent 3db877e commit 80650a1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions addons/linfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# latest version at http://linfo.sourceforge.net/
#################################################
DIR_TMP='/svr-setup'
LINFO_VER='1.10'
LINFO_VER='2.0.2'
LINFOBASE='/usr/local/nginx/html' # DO NOT CHANGE
LINFODIR='cinfo'
LINFOPATH="${LINFOBASE}/${LINFODIR}"
Expand Down Expand Up @@ -88,7 +88,7 @@ echo ""
fi

rm -rf ${LINFOPATH}
/bin/cp -af linfo-${LINFO_VER} ${LINFOPATH}
\cp -aRf linfo-${LINFO_VER}/* ${LINFOPATH}

chown nginx:nginx ${LINFOPATH}
chown -R nginx:nginx ${LINFOPATH}
Expand Down Expand Up @@ -116,9 +116,13 @@ fi

python /usr/local/nginx/conf/htpasswd.py -b /usr/local/nginx/conf/cinfo_htpasswd $CUSER $CPASS

echo "setup /usr/local/nginx/conf/phpallowed.conf"
\cp -af /usr/local/nginx/conf/php.conf /usr/local/nginx/conf/phpallowed.conf
sed -i 's/fastcgi_param PHP_ADMIN_VALUE open_basedir/#fastcgi_param PHP_ADMIN_VALUE open_basedir/' /usr/local/nginx/conf/phpallowed.conf

echo ""
cecho "cinfo_htpasswd user/pass created..." $boldyellow
cat /usr/local/nginx/conf/cinfo_htpasswd
cat /usr/local/nginx/conf/cinfo_htpasswd

echo ""
cecho "Create /usr/local/nginx/conf/cinfo.conf" $boldyellow
Expand All @@ -127,6 +131,7 @@ cat > "/usr/local/nginx/conf/cinfo.conf" <<EOF
location /${LINFODIR}/ {
auth_basic "Private";
auth_basic_user_file /usr/local/nginx/conf/cinfo_htpasswd;
include /usr/local/nginx/conf/phpallowed.conf;
}
EOF

Expand Down

0 comments on commit 80650a1

Please sign in to comment.