Apache2.4.x wampserver local php server how to access and enable extranet.htaccess
- 2020-05-13 04:05:01
- OfStack
After the upgrade of Apache from 2.2 to Apache2.4.x, the configuration file httpd.conf has been greatly changed. Previously, deny from all has been changed to Allow from all to achieve exet access. Now, Require all denied and Require local should be Require all granted.
If htaccess does not work, remove the comment (#) before LoadModule rewrite_module modules/ mod_rewrite.so.
Here's a look at the changes to Apache 2.4 :(official English note)
All requests were rejected
2.2 configuration on
Order deny,allow
Deny from all
Configuration on 2.4
Require all denied
All requests are allowed
2.2 configuration on
Order allow,deny
Allow from all
Configuration on 2.4
Require all granted
All hosts in the domain can access example, and access to all other external hosts is denied
2.2 configuration on
Order Deny,Allow
Deny from all
Allow from example.org
Configuration on 2.4
Require host example.org
To access the external network, Require local should be Require all granted.
Frequently used:
Require all denied
Require all granted
Require host xxx.com
Require ip 192.168.1 192.168.2
Require local
For example
Only IP: 192.168.0.1 access is allowed
Require all granted
Require ip 192.168.0.1
Only IP: 192.168.0.1 access is disabled
Require all granted
Require not ip 192.168.0.1
Allow all access
Require all granted
Deny all access
Require all denied
The default is Require local only allows local access.
There are still a lot of changes, you can go to the official instructions to see 1, but only in English. Software is fickle, it is recommended that you read the official update before upgrading, so as not to be caught by surprise.