Update README REF: #276

This commit is contained in:
Mitchell Krog 2019-06-29 13:27:48 +02:00
parent d6d576d8ed
commit 726145b53c
No known key found for this signature in database
GPG key ID: C243C388553EDE5D
2 changed files with 11 additions and 6 deletions

View file

@ -81,7 +81,8 @@ sudo rm -rfv /etc/nginx/mybots.d/
sudo rm -rfv /etc/nginx/myconf.d/ sudo rm -rfv /etc/nginx/myconf.d/
sudo rm /etc/nginx/conf.d/*.conf sudo rm /etc/nginx/conf.d/*.conf
sudo rm /etc/nginx/bots.d/*.conf sudo rm /etc/nginx/bots.d/*.conf
sudo rm /etc/nginx/sites-available/default sudo rm /etc/nginx/sites-available/*
sudo rm /etc/nginx/sites-enabled/*
sudo rm /etc/nginx/nginx.conf sudo rm /etc/nginx/nginx.conf
ls -la /etc/nginx/ ls -la /etc/nginx/
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test1_conf_backup_nginxconf/nginx13.conf /etc/nginx/nginx.conf sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test1_conf_backup_nginxconf/nginx13.conf /etc/nginx/nginx.conf
@ -188,7 +189,7 @@ printf "\n"
echo "${bold}${yellow}----------------------------------------------------" echo "${bold}${yellow}----------------------------------------------------"
echo "${bold}${yellow}Copy older globalblacklist.conf file to force update" echo "${bold}${yellow}Copy older globalblacklist.conf file to force update"
echo "${bold}${yellow}----------------------------------------------------" echo "${bold}${yellow}----------------------------------------------------"
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/globalblacklist-dummy.conf /etc/nginx/myconf.d/globalblacklist.conf sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/globalblacklist-dummy.conf /etc/nginx/conf.d/globalblacklist.conf
} }
forceUpdateTest2 () { forceUpdateTest2 () {
@ -216,7 +217,7 @@ echo "${bold}${yellow}----------------------------------------------------------
echo "${bold}${yellow}Make sure we test with latest generated globalblacklist.conf" echo "${bold}${yellow}Make sure we test with latest generated globalblacklist.conf"
echo "${bold}${yellow}------------------------------------------------------------" echo "${bold}${yellow}------------------------------------------------------------"
printf "\n" printf "\n"
sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist.conf /etc/nginx/myconf.d/globalblacklist.conf sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist.conf /etc/nginx/conf.d/globalblacklist.conf
} }
backupConfFiles () { backupConfFiles () {
@ -233,7 +234,6 @@ sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/test4_conf_files/ng
installNginxMainstream installNginxMainstream
cleanupNginx1
checkDirectories checkDirectories
activateVHost activateVHost
getinstallngxblocker getinstallngxblocker

View file

@ -363,18 +363,23 @@ The Nginx Ultimate Bot Blocker is now WORKING and PROTECTING your web sites !!!
<img src="https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/.assets/nginx-ultimate-bad-bot-blocker-testing-instructions.jpg"/> <img src="https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/.assets/nginx-ultimate-bad-bot-blocker-testing-instructions.jpg"/>
**NOTE to Cloudflare Users !!!** ### NOTE to Cloudflare Users !!!
If you are a Cloudflare user who is using the Cloudflare CDN / Cacheing System you will see the following behavior when testing. If you are a Cloudflare user who is using the Cloudflare CDN / Cacheing System you will see the following behavior when testing.
The First test of a Bad User Agent will give you: The First test of a Bad User Agent will give you:
- curl: (56) TCP connection reset by peer - curl: (56) TCP connection reset by peer
The Second test will give you: The Second test will give you:
- curl: 520 Origin Error - curl: 520 Origin Error
This is by design. The CDN is doing its work, meaning, the first response from your server said to the bot, "go away" by issuing it `444` or `443` responses. This is by design. The CDN is doing its work, meaning, the first response from your server said to the bot, "go away" by issuing it `444` or `443` responses.
Cloudflare cache's that response and hence the second test gets served a `520 Origin Error` origin error message. Cloudflare cache's that response and hence the second test gets served a `520 Origin Error` origin error message.
While testing the blocker, disable the CDN / cacheing system and once you are happy with your tests, re-enable the CDN/Cache on your live environment as you do want the bots to get that response from Cloudflare. Most other CDN systems will probably show the same behavior so always disable a CDN during testing to rule out anything that will interfere with your testing. Always make sure to re-enable the CDN when done testing !!
While testing the blocker, disable the CDN / cacheing system and once you are happy with your tests, re-enable the CDN/Cache on your live environment as you do want the bots to get that response from Cloudflare.
Most other CDN systems will probably show the same behavior so always disable a CDN during testing to rule out anything that will interfere with your testing. Always make sure to re-enable the CDN when done testing !!
************************************************ ************************************************
<img src="https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/.assets/step-11.png"/> <img src="https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/.assets/step-11.png"/>