Apache server with DirectoryIndex error after update

Apache server doesn’t show pages anymore after an update. I see a acces denied message when opening a site on my localhost. I didn’t change any conf files. When inspecting httpd.conf en server-default.conf I found nothing strange visually. Als .htacces did not change. What am I missing? Where to begin?

Message on a webpage (translated)
Access prohibited!

You do not have permission to access the requested folder. There is either no index document or the folder is read protected.

If you believe this server is at fault, please contact the webmaster.
Error 403

Content of apache2 error_log
[Sat May 06 15:06:18.401422 2023] [autoindex:error] [pid 29594] [client 192.168.1.10:60986] AH01276: Cannot serve directory /bern/webserver/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive

Part of httpd.conf with DirectoryIndex
# forbid access to the entire filesystem by default

Options None
AllowOverride None
<IfModule !mod_access_compat.c>
Require all denied


Order deny,allow
Deny from all

use .htaccess files for overriding,

AccessFileName .htaccess

and never show them

<Files ~ “^.ht”>
<IfModule !mod_access_compat.c>
Require all denied


Order allow,deny
Deny from all

List of resources to look for when the client requests a directory

DirectoryIndex index.html index.html.var

‘Main’ server configuration

The directives in this section set up the values used by the ‘main’

server, which responds to any requests that aren’t handled by a

definition. These values also provide defaults for

any containers you may define later in the file.

All of these directives may appear inside containers,

in which case these default settings will be overridden for the

virtual host being defined.

Include /etc/apache2/default-server.conf

Part of server-default.conf with DirectoryIndex
#

Global configuration that will be applicable for all virtual hosts, unless

deleted here, or overriden elswhere.

DocumentRoot “/bern/webserver”

Configure the DocumentRoot

<Directory “/bern/webserver”>
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named explicitly — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# core - Apache HTTP Server Version 2.4
# for more information.
# NOTE: For directories where RewriteRule is used, FollowSymLinks
# or SymLinksIfOwnerMatch needs to be set in Options directive.
Options None
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride None
# Controls who can get stuff from this server.
<IfModule !mod_access_compat.c>
Require all granted


Order allow,deny
Allow from all


What to do to make it work again?

From which version to which version?

Your post is unreadable. It is impossible to understand what is configuration file content and what are your own comments. Post computer text as preformatted text (</> button in editor).

The current version of Apache2 is 2.54.57-1.1. I don’t know what the previous version was. I update at least weekly, so I expect a small step in version number.

I cannot edit previous post. The part of the httpd.conf file contains a lot of multiple hashtags. That translates in the bold text. All content of the file is between code tags. Nothing between the text “Part of httpd.conf with DirectoryIndex” and “What to do to make it work again?” contains my comments.

Beware of the packagers: Apache tinkers with APACHE_MODULES. Every now and then you need to check /etc/sysconfig/apache2.

I checked /etc/sysconfig/apache2
I didn’t find anything strange (as far as I can recognize)
To be sure I checked loaded modules to find mod_autoindex and to not find mod_access_compat. This is the result of loaded modules

# apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_prefork_module (static)
unixd_module (static)
systemd_module (static)
authz_host_module (shared)
actions_module (shared)
alias_module (shared)
authz_groupfile_module (shared)
authn_file_module (shared)
auth_basic_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
env_module (shared)
include_module (shared)
log_config_module (shared)
mime_module (shared)
negotiation_module (shared)
setenvif_module (shared)
status_module (shared)
userdir_module (shared)
asis_module (shared)
headers_module (shared)
imagemap_module (shared)
rewrite_module (shared)
authz_core_module (shared)
socache_shmcb_module (shared)
reqtimeout_module (shared)
authn_core_module (shared)

I reiterate: check for changes of apache sysconfig. For doing so you may run the following command:

erlangen:~ # ll /.snapshots/*/snapshot/etc/sysconfig/apache2
-rw-r--r-- 1 root root 8820 Apr 19 17:35 /.snapshots/2112/snapshot/etc/sysconfig/apache2
...
-rw-r--r-- 1 root root 8820 Apr 19 17:35 /.snapshots/2157/snapshot/etc/sysconfig/apache2
erlangen:~ # 

I reported changes forced by packagers on host erlangen to illustrate where and what to look for. Changes on your system may differ.

Apache2 configuration depends on both its own config files AND sysconfig!