top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

IF directive and IP addresses in apache

+2 votes
299 views

I'm trying to use the new If directive present from Apache 2.4, to configure an htaccess based authentication for a specific Location based to the client IP address. If a client hasn't an IP address related to the internal VLAN, I would set the password access.

What is the correct syntax to have this configuration? I noticed on the documentation that there is the "-ipmatch" condition, but I don't understand well this feature.

posted Nov 14, 2013 by Jai Prakash

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I googled but cant figure it out.

+1 vote

I am getting tired of my web host changing server-wide apache config settings without warning. Then I am pulling my hair out trying to figure out why my website is not quite working as it should.

Is there a way I can use .htaccess or other method to see what the config settings are? Then I could more easily deal with what has been changed.

I realize that what I put in .htaccess will overwrite what they have put in the config, but not knowing what they are doing makes it harder for me to address the changing problems.

0 votes

It seems that I've hit a size limitation when adding unwanted IPs to a "Deny From" line.
Is there any place where this is specified?
Also, if I hit the max length on a "Deny From" line, can I add another "Deny From" line?

(Running CentOS 6, and the following version of Apache: httpd-2.2.15-28.el6.centos.x86_64)

...