Author Topic: [How To] Apache Ultimate Bad Bot Blocker for CWP  (Read 3627 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
[How To] Apache Ultimate Bad Bot Blocker for CWP
« on: December 27, 2019, 07:18:40 PM »
Hi there, previously I've written a post about this Apache Ultimate Bad Bot Blocker but for some reason I cannot edit/remove that post so I'm starting a new updated one.

1. First, login as root on your CWP server.



2. Make a new directory for the new rules:
Code: [Select]
mkdir -p /usr/local/apache/custom.d
3. Clone git
Code: [Select]
git clone https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker.git
4. Copy Apache rules
Code: [Select]
cd /root/apache-ultimate-bad-bot-blocker/Apache_2.4/custom.d && cp -r * /usr/local/apache/custom.d
5. Replace Apache path
Code: [Select]
sed -i "s|/etc/apache2/custom.d|/usr/local/apache/custom.d|g" /usr/local/apache/custom.d/globalblacklist.conf
6. Remove unnecessary files
Code: [Select]
cd /root && rm -rf /root/apache-ultimate-bad-bot-blocker
7. Add new rule to the Apache configuration file
Code: [Select]
nano /usr/local/apache/conf/httpd.confAfter the line:
Code: [Select]
#ServerName www.example.com:80Add:
Code: [Select]
<Location "/">
# AND-combine with preceding configuration sections 
AuthMerging And
# include black list
Include /usr/local/apache/custom.d/globalblacklist.conf
</Location>



Save file (Ctl+O). Exit (Ctl+X)

8. Restart Apache
Code: [Select]
service httpd restart
9. Testing
Code: [Select]
curl -A "80legs" https://your.domain.name


*** Works for CWP v0.9.8.924 Free & Pro. Have fun. ***