Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 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.

Why do we still need Allow?

share|improve this question
    
woa! what are you talking about here? config? –  ETL Mar 5 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 at 16:43

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.