GTMAN

Member
Mar 5, 2013
8
0
1
cPanel Access Level
Root Administrator
I believe mod_authz_host is a default module in EasyApache. I'm trying to deny access to ip's in my htaccess file but it's not working. How do I confirm that mod_authz_host is compiled and active?

Cheers

Glenn Tate
Toronto
 

cPanelJamyn

Social Engineer
Staff member
Jan 29, 2009
105
2
143
Hi,

Here's a quick check:

# httpd -M|grep authz_host
authz_host_module (static)
And an example .htaccess entry:

<IfModule mod_authz_host.c>
Require ip 1.2.3.4
</IfModule>
Which version of Apache are you using? Can you post an example of something that isn't working for you?
 

GTMAN

Member
Mar 5, 2013
8
0
1
cPanel Access Level
Root Administrator
Server Version: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_bwlimited/1.4

[email protected] [~]# httpd -M|grep authz_host
authz_host_module (static)
Syntax OK
[email protected] [~]#

I'm trying this in my htaccess to limit access to only the USA and Canada (truncated of course).

#COUNTRY_BLOCK_START
<Limit GET HEAD POST>
order deny,allow
allow from 4.17.143.0/28
 

cPanelJamyn

Social Engineer
Staff member
Jan 29, 2009
105
2
143
It might be worth filing a support case on this (see my signature for a link), as it certainly looks like the module is loaded, and the syntax looks ok. I'm guessing the directive is being overridden (or possibly ignored) due to an overlapping config somewhere, but I wouldn't know for sure without looking into it.