The access control configuration changed in 2.4, and old configurations aren't compatible without some changes. See here.
If your old config was Allow from all
(no IP addresses blocked from accessing the service), then Require all granted
is the new functional equivilent.
I am not familiar with Cent OS default directory structure, but you will want to follow something like this:
<Directory />
Require all denied
AllowOverride None
Options None
</Directory>
<Directory /PATH ON SERVER TO YOUR DOCUMENT ROOT>
Require all granted
AllowOverride All
Options FollowSymLinks
</Directory>
To use the Apache 2.4 directives, you will need to load mod_authz_core
LoadModule authz_core_module modules/mod_authz_core.so
If you don't have any other old (i.e. Order, Allow, Deny, and Satisfy) access control directives, comment out the access_compat module:
#LoadModule access_compat_module modules/mod_access_compat.so
If you do have other instances of the old 2.2 access control, update them if at all possible to use the Apache 2.4 Require directive, or similar Apache 2.4 authentication directives. It is not a good idea to mix the old and the new. As noted in the documentation, "unpredictable" results can occur.
Best Answer
It's actually MUCH simpler in Apache2.4!
Let's say that you want PHPMyAdmin to be accessible ONLY on your internal network. You could do something like this
AllowOverride None: Tells Apache that .htaccess files are not allowed to override this rule
Require ip 192.168.1.0/24 tells Apache that you MUST be on the internal network in order to access this directory. (the
/24
is called CIDR notation and evaluates to the subnet mask 255.255.255.0. More on that here)That's all there is to it!
(Natrually you will need to replace the IP with one that matches your internal network)