• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

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