How to block Tor from accessing my website?
by n00b_noob from LinuxQuestions.org on (#5FAP9)
Hello,
I'm using CentOS 8 with Apache Web Server and I want to block Tor IP addresses. I downloaded a list of Tor IP addresses and put it as a "tor-ip.conf" file under the "/etc/httpd/conf.d/" directory. Then edited my Virtual Host configuration file as below:
Code:<Directory "/var/www/wp">
Options -Indexes
AllowOverride All
Require all granted
Include conf.d/tor-ip.conf
</Directory>The "tor-ip.conf" file content is:
Code:<RequireAll>
Require all granted
Require not ip "IP"
Require not ip "IP"
Require not ip "IP"
...
</RequireAll>When I checked my Apache configuration, then it shows me below error:
Code:# apachectl configtest
[Sun Mar 14 19:54:58.045971 2021] [so:warn] [pid 808417:tid 123272634673472] AH01574: module deflate_module is already loaded, skipping
AH00526: Syntax error on line 1 of /etc/httpd/conf.d/tor-ip.conf:
<RequireAll not allowed hereI looked at https://httpd.apache.org/docs/2.4/howto/access.html and the syntax is correct!!!
Thank you.


I'm using CentOS 8 with Apache Web Server and I want to block Tor IP addresses. I downloaded a list of Tor IP addresses and put it as a "tor-ip.conf" file under the "/etc/httpd/conf.d/" directory. Then edited my Virtual Host configuration file as below:
Code:<Directory "/var/www/wp">
Options -Indexes
AllowOverride All
Require all granted
Include conf.d/tor-ip.conf
</Directory>The "tor-ip.conf" file content is:
Code:<RequireAll>
Require all granted
Require not ip "IP"
Require not ip "IP"
Require not ip "IP"
...
</RequireAll>When I checked my Apache configuration, then it shows me below error:
Code:# apachectl configtest
[Sun Mar 14 19:54:58.045971 2021] [so:warn] [pid 808417:tid 123272634673472] AH01574: module deflate_module is already loaded, skipping
AH00526: Syntax error on line 1 of /etc/httpd/conf.d/tor-ip.conf:
<RequireAll not allowed hereI looked at https://httpd.apache.org/docs/2.4/howto/access.html and the syntax is correct!!!
Thank you.