logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache 2.4 "require not ip" doesn't work as descri
Author
orrd



Joined: 13 Apr 2012
Posts: 2

PostPosted: Fri 13 Apr '12 21:19    Post subject: Apache 2.4 "require not ip" doesn't work as descri Reply with quote

According to the docs at http://httpd.apache.org/docs/2.4/howto/access.html, the way to block an IP address is like this:

Code:
Require not ip 10.252.46.165


But that always generates this server error:

Code:
.htaccess: negative Require directive has no effect in <RequireAny> directive


I'm not using a <RequireAny> directive anywhere in the .htaccess file or even anywhere in my Apache configuration file. Did I miss something or is this a bug? I'm using Apache 2.4.1.

I submitted a bug report to issues.apache.org, but later realized that bug database is pretty much unused (none of the bugs are ever marked as resolved).
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 692

PostPosted: Fri 13 Apr '12 22:15    Post subject: Reply with quote

Try for example:

<Directory xxxxx/>

<RequireAll>
Require all granted
Require not ip 189.59.169.18
</RequireAll>

</Directory>

This blocks a IP here.

Steffen
Back to top
orrd



Joined: 13 Apr 2012
Posts: 2

PostPosted: Sat 14 Apr '12 0:39    Post subject: Reply with quote

Yep, that did it. Thanks.

They really need to make this more clear on the documentation page and reword the error message.
Back to top


Reply to topic   Topic: Apache 2.4 "require not ip" doesn't work as descri View previous topic :: View next topic
Post new topic   Forum Index -> Apache