• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff 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