Re: How to restrict page access to certain IPs using Apache httpd 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

Anyone able to help please?

Regards, Kwok

On Wed, 14 Oct 2020 at 4:37 pm, Anders Wong <kwokchung@xxxxxxxxx> wrote:
Hi HTTP apache community,

    I have a Location and Directory directive configured within VirtualHost and I would like to restrict only 10.75.x.x IPs to access the URL "http://..../ords".

   The access restriction is not working in <Location> directive as any client IPs still can access the URL after the setting. However, the same "Require ip x.x " setting is working well in <Directory> directive.

  I can confirm that I have both modules (authz_core / authz_host) loaded

[root@xxx]# httpd -f /etc/httpd/conf/httpd.conf -M | grep authz
 authz_core_module (shared)
 authz_dbd_module (shared)
 authz_dbm_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_owner_module (shared)
 authz_user_module (shared)

see blow:
<VirtualHost>
    <Location "/ords">
      Require ip 10.75
     .... truncated....
    </Location>
</VirtualHost>

<Directory "/var/www/html/htdocs/myserver">
       Options Indexes FollowSymLinks
        AllowOverride None
        Require ip 10.75
</Directory>

Can someone please help out and guide me? Thanks

Regards,
Kwok

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux