Score:0

Apache ignores Options -Indexes

pk flag

I want to disable Indexes server-wide. I tried the following:

In /etc/var/apache2/conf-available/security.conf:

<Directory />
Options +SymLinksIfOwnerMatch -Indexes -ExecCGI -Includes
AllowOverride None
Require all denied
</Directory>

I know that security.conf is active, other directives in the file are working. But indexes are still shown. Then I edited /etc/apache2/sites-available/000-default.conf:

<VirtualHost *:80>
...
Options -Indexes
...
</VirtualHost>

Doesn't work either. I have reloaded, stopped and started apache multiple times.

Score:1
in flag

Assuming that the question is "Why does -Indexes not work?"

Check all files, you probably have more <Directory ... blocks in other files as well.

Easies to find these might be to grep -r Options /etc/apache* hopefully that finds the offender.

Question about dumping configuration that could help

lampstackxyz avatar
pk flag
Thank you! I found it with grep -r Indexes /etc/apache* in apache2.conf Now my "problem" is: I read everywhere that I shouldn't edit apache2.conf itself, because it will be overwritten by updates. But if I don't edit that line, directives elsewhere don't come into effect. What's a clean solution for that?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.