1

We have directives of Require and Allow which can be used in httpd.conf.

Won't Require ip address work like Allow from address ; Deny from all?

As we can see in this docs, Allow, Deny, and Order directives, provided by mod_access_compat, are deprecated and will go away in a future version. You should avoid using them, and avoid outdated tutorials recommending their use.

Why do we still need Allow?

2
  • woa! what are you talking about here? config?
    – ETL
    Mar 5, 2014 at 16:33
  • As we can see in httpd.apache.org/docs/2.4/mod/mod_access_compat.html#allow. The Allow, Deny, and Order directives, provided by mod_access_compat, are deprecated and will go away in a future version. You should avoid using them, and avoid outdated tutorials recommending their use.
    – dspjm
    Mar 5, 2014 at 16:43

1 Answer 1

1

If you're using Apache httpd 2.2, then you'll use allow and deny (order/satisfy too). If you're using Apache httpd 2.4, then you'll use Require.

In fact, mod_authz_host was rewritten betwen 2.2 and 2.4, and old behavior of Deny/Allow is now deprecated. It's still implemented with mod_access_compat, but what I've seen is this module being most of the time not enabled.

The new mod_authz_host is here to simplify access control. You can see some example here : http://httpd.apache.org/docs/2.4/upgrading.html#run-time

2.2 configuration:

Order Deny,Allow
Deny from all
Allow from example.org

2.4 configuration:

Require host example.org

Allow/Deny/Satisfy/Order should not be used anymore, and it's generally easy to convert them to Require.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .