• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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