Browse Source

fix #178 - ee secure --ip

old-stable
Mitesh Shah 11 years ago
parent
commit
b9342bee87
  1. 3
      bin/easyengine
  2. 5
      src/modules/stack/install/ee_mod_setup_nginx.sh

3
bin/easyengine

@ -571,13 +571,14 @@ elif [ "$EE_FIRST" = "debug" ]; then
# EasyEngine secure
elif [ "$EE_FIRST" = "secure" ]; then
if [ "$EE_SECOND" = "--auth" ] || [ "$EE_SECOND" = "--port" ]; then
if [ "$EE_SECOND" = "--auth" ] || [ "$EE_SECOND" = "--port" ] || [ "$EE_SECOND" = "--ip" ]; then
ee_mod_secure_$(echo $EE_SECOND | sed 's/--//')
ee_lib_service nginx reload
else
ee_lib_echo "ee secure commands:"
ee_lib_echo_escape "\t--auth\tUpdate credential of HTTP authentication"
ee_lib_echo_escape "\t--port\tChange EasyEngine admin port 22222"
ee_lib_echo_escape "\t--ip\tUpdate whitelist IP address"
fi
# EasyEngine update

5
src/modules/stack/install/ee_mod_setup_nginx.sh

@ -90,9 +90,8 @@ function ee_mod_setup_nginx()
# White list IP address
if [ -n "$EE_IP_ADDRESS" ]; then
for ee_whitelist_ip_address in $(echo $EE_IP_ADDRESS)
do
sed -i "/deny/i $(echo allow $ee_whitelist_ip_address\;)" /etc/nginx/common/acl.conf
for ee_whitelist_ip_address in $(echo $EE_IP_ADDRESS);do
sed -i "/deny/i $(echo allow $ee_whitelist_ip_address\;)" /etc/nginx/common/acl.conf
done
fi

Loading…
Cancel
Save