1 |
On Sunday, 29 November 2020 07:30:16 GMT thelma@×××××××××××.com wrote: |
2 |
> I'm trying to deny access to all except specific IP address in a |
3 |
> directory, just testing it. |
4 |
> |
5 |
> In modules.d/00_default_settings.conf |
6 |
> |
7 |
> <Directory "/var/www/localhost/htdocs"> |
8 |
> Options MultiViews |
9 |
> AllowOverride All |
10 |
> Require all granted |
11 |
> </Directory> |
12 |
> |
13 |
> in admin/.htaccess |
14 |
> |
15 |
> <RequireAll> |
16 |
> Require all denied |
17 |
> Require ip 10.0.0.100 |
18 |
> </RequireAll> |
19 |
> |
20 |
> My IP is 10.0.0.112 and I can still access the server /admin directory |
21 |
> |
22 |
> What am I missing? |
23 |
|
24 |
In apache 2.4 the access control syntax has changed. The RequireAll directive |
25 |
means *all* authorisation directives within it must succeed. |
26 |
|
27 |
https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireall |
28 |
|
29 |
What happens if you just remove the first line, "Require all denied"? |