a. Is my understanding of the three files correct ? If somebody could better explain it would be nice.
Em geral, está correto. Mas você pode ler mais detalhes, se você abrir /etc/apache2/apache2.conf
:
# * apache2.conf is the main configuration file (this file). It puts the pieces
# together by including all remaining configuration files when starting up the
# web server.
#
# ....
#
# * ports.conf is always included from the main configuration file. It is
# supposed to determine listening ports for incoming connections, and which
# of these ports are used for name based virtual hosts.
Com httpd.conf
, acho que ele existia apenas para compatibilidade com outros programas que exigem isso. É apenas um arquivo de configuração normal com o apache.
b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf while the other two are in /etc/apache2/ ?
Porque é design padrão no Debian. Novamente a partir de /etc/apache2/apache2.conf
:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.
# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
# /etc/apache2/
# |-- apache2.conf
# | '-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | '-- *.conf
# |-- conf.d
# | '-- *
# '-- sites-enabled
# '-- *
Nota