diff --git a/.dev-tools/beta-test-blocker-rate-limiting.sh b/.dev-tools/beta-test-blocker-rate-limiting.sh index 7ce7afa57..b63c1f769 100755 --- a/.dev-tools/beta-test-blocker-rate-limiting.sh +++ b/.dev-tools/beta-test-blocker-rate-limiting.sh @@ -62,7 +62,7 @@ echo "${bold}${yellow}---------------------------------------------------------- printf "\n\n" sleep 10s -ratelimittestfile=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/ratelimittest.txt +ratelimittestfile=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/ratelimittest-beta.txt truncate -s 0 ${ratelimittestfile} curl -A "GoogleBot" http://localhost:9000 2>&1 > ${ratelimittestfile} & curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} & diff --git a/.dev-tools/beta-test-blocker-whitelist-ips.sh b/.dev-tools/beta-test-blocker-whitelist-ips.sh index bd56782b3..c7d6f34a1 100755 --- a/.dev-tools/beta-test-blocker-whitelist-ips.sh +++ b/.dev-tools/beta-test-blocker-whitelist-ips.sh @@ -57,18 +57,12 @@ printf '%s\t%s\n' "127.0.0.1" "1;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/ printf '%s\t%s\n' "127.0.0.1" "1;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf printf '%s\t%s\n' "127.0.0.1" "1;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf printf '%s\t%s\n' "127.0.0.1" "0;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf + sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf /etc/nginx/bots.d/whitelist-ips.conf +# TEST ANY CHANGES TO botblocker-nginx-settings.conf sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/botblocker-nginx-settings.conf /etc/nginx/conf.d/botblocker-nginx-settings.conf -#printf "\n" -#echo "${bold}${yellow}---------------------------------------------------" -#echo "${bold}${yellow}Copy Test Unit of globalblacklist.conf file to test" -#echo "${bold}${yellow}---------------------------------------------------" -#printf "\n" - -#sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf /etc/nginx/conf.d/globalblacklist.conf - echo "${bold}${green}---------------" echo "${bold}${green}Reloading Nginx" diff --git a/.dev-tools/beta-test-blocker.sh b/.dev-tools/beta-test-blocker.sh index c84477712..fec128abb 100755 --- a/.dev-tools/beta-test-blocker.sh +++ b/.dev-tools/beta-test-blocker.sh @@ -30,40 +30,6 @@ cyan=$(tput setaf 6) white=$(tput setaf 7) defaultcolor=$(tput setaf default) -# ******************************************* -# Set Location of our Curl Test Results Files -# ******************************************* - -#echo "${bold}${green}------------------------------------------------" -#echo "${bold}${green}Disable any User Whitelisting and set to Default" -#echo "${bold}${green}------------------------------------------------" -#printf "\n\n" - -#sudo rm /etc/nginx/conf.d/*.conf -#sudo rm /etc/nginx/bots.d/*.conf -#ls -la /etc/nginx/conf.d/ -#ls -la /etc/nginx/bots.d/ - -#printf "\n" -#echo "${bold}${magenta}-------------------------" -#echo "${bold}${magenta}Execute update-ngxblocker" -#echo "${bold}${magenta}-------------------------" -#printf "\n" -#cd /usr/sbin -#sudo bash ./update-ngxblocker -n - -#echo "${bold}${green}---------------" -#echo "${bold}${green}Reloading Nginx" -#echo "${bold}${green}---------------" -#printf "\n\n" -#sudo nginx -t && sudo nginx -s reload - -#echo "${bold}${yellow}-----------------------------------------------------------------------" -#echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis" -#echo "${bold}${yellow}-----------------------------------------------------------------------" -#printf "\n\n" -#sleep 10s - echo "${bold}${green}--------------" echo "${bold}${green}Tests Starting" echo "${bold}${green}--------------" diff --git a/conf.d/botblocker-nginx-settings.conf b/conf.d/botblocker-nginx-settings.conf index ba536c503..883bc7688 100644 --- a/conf.d/botblocker-nginx-settings.conf +++ b/conf.d/botblocker-nginx-settings.conf @@ -13,8 +13,10 @@ # Version 1.1 # ! new directives also to be added to include_filelist.txt ! # -server_names_hash_bucket_size 128; +server_names_hash_bucket_size 256; server_names_hash_max_size 4096; +variables_hash_max_size 4096; +variables_hash_bucket_size 4096; limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s; limit_conn_zone $binary_remote_addr zone=addr:50m;