Gentoo Archives: gentoo-user

From: thelma@×××××××××××.com
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Apache 2.4 can not access server subdirectory
Date: Fri, 30 Oct 2020 16:27:10
Message-Id: 6207f399-6082-515a-af50-45161fb77257@sys-concept.com
In Reply to: Re: [gentoo-user] Apache 2.4 can not access server subdirectory by Michael
1 On 10/30/2020 04:31 AM, Michael wrote:
2 [snip]
3 >>
4 >> This is from apache.conf
5 >>
6 >> <Directory />
7 >> Options FollowSymLinks
8 >> AllowOverride None
9 >> Require all denied
10 >> </Directory>
11 >>
12 >> <Directory /usr/share>
13 >> AllowOverride None
14 >> Require all granted
15 >> </Directory>
16 >>
17 >> <Directory /var/www/>
18 >> Options FollowSymLinks
19 >> AllowOverride All
20 >> Require all granted
21 >> </Directory>
22 >>
23 >> I just search all server .htaccess files for "AllowOverride" but none is
24 >> active in these files.
25 >> grep -Rnw '/var/www/html/catalog/' -e 'AllowOverride'
26 >
27 > You wouldn't find "AllowOverride" within an .htaccess file. This is a
28 > directive placed in the main /etc/apache2 configuration files to determine if
29 > directives contained in local filesystem .htaccess files will be processed or
30 > not. An 'AllowOverride None' will ignore .htaccess directives and make the
31 > server speedier in responding to requests. TBH .htaccess are typically used
32 > locally, when you are not allowed to make changes to the main apache
33 > configuration files. Note, if you changed the name of ".htaccess" with the
34 > 'AccessFileName' directive, you may end up missing it.
35 >
36 > Another thing to check is any changes to the default 'DirectoryIndex' types,
37 > for the particular subdirectory. If you have removed index.html or
38 > index.html.var in this directive then apache won't serve index files when a
39 > directory like admin/ is requested.
40 >
41 > Finally, you could increase the log verbosity to debug level and see if more
42 > information is revealed as to the cause of this problem.
43
44 I have a bigger problem.
45 The apache 2.4 doesn't read configuration files.
46 In apache2.conf I have:
47
48 # Include the virtual host configurations:
49 IncludeOptional sites-enabled/*.conf
50
51 So it should read read every *config file in sites-enabled/
52 In that directory I have:
53
54 ll sites-enabled/
55 lrwxrwxrwx 1 root root 35 Oct 27 21:15 000-default.conf ->
56 ../sites-available/000-default.conf
57 -rw-r--r-- 1 root root 3420 Oct 29 18:03 vhosts.conf
58
59 vhosts.conf - define my web-site, but I commented everything out in that
60 file (it is empty) and restarted apache:
61 /etc/init.d/apache2 restart
62
63 And I can still display my web page.
64 How is it possible???

Replies

Subject Author
Re: [gentoo-user] Apache 2.4 can not access server subdirectory Michael <confabulate@××××××××.com>