• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved Apache 2.2 vs 2.4 access directives

seabiscuit

New Pleskian
Hi,

I can't get the following directives running, which is Apache 2.4:
<RequireAll>
Require all denied
Require ip 111.111.111.111
</RequireAll>

However, I have no problem with the following, which is Apache 2.2:
order deny,allow
deny from all
allow from 111.111.111.111

Why is that? Any workaround? Thanks...
 
I am not perfectly sure what the question is. I assume you are asking what is wrong with the first section? I'd try to omit the "Require all denied", instead build it like
Code:
<IfModule mod_authz_core.c>
Require ip 111.111.111.111
</IfModule>
 
Last edited:
Yes... it did the trick. Thanks.

Looks like the first code block is not equivalent to the second one. I was thinking so...

Can I expand it like this to cover the other possibility of v 2.2?

<IfModule mod_authz_core.c>
Require ip 111.111.111.111
</IfModule>
<IfModule !mod_authz_core.c>
order deny,allow
deny from all
allow from 111.111.111.111
</IfModule>
 
Yes, switch for differen Apache versions like this:
Code:
# Apache 2.2
<IfModule !mod_authz_core.c>
...
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
...
</IfModule>
 
Back
Top