
私は以下のようにApache 2.4を実行しています。
$ sudo apache2ctl -v
Server version: Apache/2.4.10 (Debian)
Server built: Jul 23 2014 13:15:48
明らかに設定する必要がある3つの異なるプロファイルがあります。
/etc/apache2$ ls *.conf
apache2.conf ports.conf
そして
/etc/apache2/conf.d$ ls *.conf
httpd.conf
明らかに、これら3つのファイルは次のように動作します。
apache2.conf
:- それグローバル構成ファイル。
ports.conf
: - これは、Webサービスのために受信してバインドするIPアドレスとポートをApacheに明確に伝えます。
httpd.conf
:- これはユーザー設定に関連しています。私はこれについてよくわかりません。
今、2つの質問があります。
ㅏ。これら3つのファイルの私の理解は正しいですか?誰かがそれをよりよく説明することができれば良いでしょう。
b.httpd.conf が /etc/apache2/conf.d/httpd.conf にあり、残りの 2 つが /etc/apache2/ にあるのはなぜですか。
答え1
ㅏ。これら3つのファイルの私の理解は正しいですか?誰かがそれをよりよく説明することができれば良いでしょう。
全体的にこれは正しいです。ただし、開いてみると、さらに詳細を読むことができます/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.
の場合には、httpd.conf
これを必要とする他のプログラムとの互換性のためにのみ存在すると思います。これは一般的なApache構成ファイルです。
b.httpd.conf が /etc/apache2/conf.d/httpd.conf にあり、残りの 2 つが /etc/apache2/ にあるのはなぜですか。
これは Debian の基本的なデザインだからです。 Re /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
# `-- *
ノート