You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Stubblefield <mr...@gmail.com> on 2014/06/03 03:42:20 UTC

[users] ip based access control on 2.4.7

Hello,

I just upgraded to 2.4.7 from 2.2 and I’m having trouble getting ip based access control to work in my .htaccess and config files alike.

Can someone help me with the new syntax for blocking all traffic by default then allowing only certain IP addresses?

From what I can tell, it should be something like the following but it doesn’t work:

<Directory "/path/to/private/directory" >
Require ip 1.2.3.4
</Directory>

I want to:
Block by default to private directory
Pass allowed ip addresses.

I have managed to set it up to block everything or pass everything but no luck blocking everything except my ip.

It is ubuntu 14 if that makes a difference, and the modz_host module is enabled.  I have tried turning access_compat off but it breaks php and my old configuration with deny,allow,etc.. doesn’t work at all.

Baffled.

Thanks,

Jason




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users] ip based access control on 2.4.7

Posted by Peter Kühnlein <pe...@function2form.net>.
Am 03.06.2014 03:42, schrieb Jason Stubblefield:
>  From what I can tell, it should be something like the following but it doesn’t work:
>
> <Directory "/path/to/private/directory" >
> Require ip 1.2.3.4
> </Directory>
Hi Jason,

as far as I understand the manual at 
http://httpd.apache.org/docs/2.4/upgrading.html, it should be something like

<Directory "/path/to/private/directory" >
Require host 1.2.3.4
</Directory>

I haven't tried that though.

Cheers,
Peter

-- 

http://function2form.net
http://peter-kuehnlein.net

"By being impatient, matters are damaged and great works can not be done. If one considers something not to be a matter of time, it will be done surprisingly quickly."
(Hagakure)