Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] apache 2.4 - deny access to directory
Date: Sun, 29 Nov 2020 10:22:55
Message-Id: 4610202.31r3eYUQgx@lenovo.localdomain
In Reply to: [gentoo-user] apache 2.4 - deny access to directory by thelma@sys-concept.com
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"?

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] apache 2.4 - deny access to directory thelma@×××××××××××.com