mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-03 19:20:16 +00:00
Debug Nginx Build Tests
This commit is contained in:
parent
46761975f4
commit
bd94cecb0e
6 changed files with 18 additions and 21 deletions
|
@ -235,6 +235,7 @@ printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "###
|
||||||
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/bots.d/
|
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/bots.d/
|
||||||
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/conf.d/
|
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/conf.d/
|
||||||
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/default.vhost
|
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/default.vhost
|
||||||
|
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/nginx.conf
|
||||||
|
|
||||||
# *****************************************************************************************
|
# *****************************************************************************************
|
||||||
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
||||||
|
|
|
@ -258,6 +258,7 @@ printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "###
|
||||||
sudo cp /usr/local/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/bots.d/
|
sudo cp /usr/local/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/bots.d/
|
||||||
sudo cp /usr/local/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/conf.d/
|
sudo cp /usr/local/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/conf.d/
|
||||||
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/default.vhost
|
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/default.vhost
|
||||||
|
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/nginx.conf
|
||||||
|
|
||||||
# *****************************************************************************************
|
# *****************************************************************************************
|
||||||
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
||||||
|
|
|
@ -267,6 +267,7 @@ sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/
|
||||||
sudo cp /etc/nginx/mybots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/bots.d/
|
sudo cp /etc/nginx/mybots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/bots.d/
|
||||||
sudo cp /etc/nginx/myconf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/conf.d/
|
sudo cp /etc/nginx/myconf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/conf.d/
|
||||||
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/default.vhost
|
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/default.vhost
|
||||||
|
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/nginx.conf
|
||||||
|
|
||||||
# *****************************************************************************************
|
# *****************************************************************************************
|
||||||
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
||||||
|
|
|
@ -301,6 +301,7 @@ sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/
|
||||||
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/bots.d/
|
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/bots.d/
|
||||||
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/conf.d/
|
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/conf.d/
|
||||||
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/default.vhost
|
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/default.vhost
|
||||||
|
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/nginx.conf
|
||||||
ls -la /etc/nginx/sites-available/
|
ls -la /etc/nginx/sites-available/
|
||||||
ls -la /var/www/
|
ls -la /var/www/
|
||||||
sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/
|
sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/
|
||||||
|
|
|
@ -68,7 +68,7 @@ printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "###
|
||||||
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/bots.d/
|
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/bots.d/
|
||||||
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/conf.d/
|
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/conf.d/
|
||||||
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/default.vhost
|
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/default.vhost
|
||||||
|
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/nginx.conf
|
||||||
|
|
||||||
# **********************
|
# **********************
|
||||||
# Exit With Error Number
|
# Exit With Error Number
|
||||||
|
|
|
@ -50,6 +50,8 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest1
|
||||||
|
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# Function Curl Test 2 - Check for Bad Bot "Nutch"
|
# Function Curl Test 2 - Check for Bad Bot "Nutch"
|
||||||
|
@ -67,6 +69,8 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest2
|
||||||
|
|
||||||
|
|
||||||
# ******************************************************************
|
# ******************************************************************
|
||||||
# Function Curl Test 3 - Check for Bad Referrer "100dollars-seo.com"
|
# Function Curl Test 3 - Check for Bad Referrer "100dollars-seo.com"
|
||||||
|
@ -84,6 +88,8 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest3
|
||||||
|
|
||||||
|
|
||||||
# ******************************************************
|
# ******************************************************
|
||||||
# Function Curl Test 4 - Check for Bad Referrer "zx6.ru"
|
# Function Curl Test 4 - Check for Bad Referrer "zx6.ru"
|
||||||
|
@ -101,6 +107,7 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest4
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
# Function Curl Test 5 - Check for Good Bot "GoogleBot"
|
# Function Curl Test 5 - Check for Good Bot "GoogleBot"
|
||||||
|
@ -118,6 +125,7 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest5
|
||||||
|
|
||||||
# ***************************************************
|
# ***************************************************
|
||||||
# Function Curl Test 6 - Check for Good Bot "BingBot"
|
# Function Curl Test 6 - Check for Good Bot "BingBot"
|
||||||
|
@ -135,6 +143,7 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest6
|
||||||
|
|
||||||
# ***********************************************************
|
# ***********************************************************
|
||||||
# Function Curl Test 7 - Check for Good Referrer "google.com"
|
# Function Curl Test 7 - Check for Good Referrer "google.com"
|
||||||
|
@ -152,6 +161,7 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest7
|
||||||
|
|
||||||
# ***********************************************************
|
# ***********************************************************
|
||||||
# Function Curl Test 8 - Check for Good Referrer "bing.com"
|
# Function Curl Test 8 - Check for Good Referrer "bing.com"
|
||||||
|
@ -170,6 +180,7 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest8
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# Function Curl Test 9 - Check for Bad Bot "Nutch"
|
# Function Curl Test 9 - Check for Bad Bot "Nutch"
|
||||||
|
@ -187,6 +198,7 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest9
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# Function Curl Test 10 - Check for Bad Bot "Nutch"
|
# Function Curl Test 10 - Check for Bad Bot "Nutch"
|
||||||
|
@ -204,31 +216,12 @@ else
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
run_curltest10
|
||||||
|
|
||||||
# *********************************
|
# *********************************
|
||||||
# Trigger our curl functions to run
|
# Trigger our curl functions to run
|
||||||
# *********************************
|
# *********************************
|
||||||
|
|
||||||
echo "Test 1"
|
|
||||||
run_curltest1
|
|
||||||
echo "Test 2"
|
|
||||||
run_curltest2
|
|
||||||
echo "Test 3"
|
|
||||||
run_curltest3
|
|
||||||
echo "Test 4"
|
|
||||||
run_curltest4
|
|
||||||
echo "Test 5"
|
|
||||||
run_curltest5
|
|
||||||
echo "Test 6"
|
|
||||||
run_curltest6
|
|
||||||
echo "Test 6"
|
|
||||||
run_curltest7
|
|
||||||
echo "Test 8"
|
|
||||||
run_curltest8
|
|
||||||
echo "Test 9"
|
|
||||||
run_curltest9
|
|
||||||
echo "Test 10"
|
|
||||||
run_curltest10
|
|
||||||
|
|
||||||
echo "Tests Completed"
|
echo "Tests Completed"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue