サーバの基点ディレクトリ(ServerRoot)

広告

「ServerRoot」はApacheがインストールされているディレクトリを表します。

ServerRoot ディレクトリ

それでは「httpd.conf」ファイルで「ServerRoot」で検索してみてください。20行目付近に次の記述が見つかります。

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "C:/pg/Apache/Apache2.2"

デフォルトでは「(インストールしたディレクトリ)/Apache2.2」になっていると思います。変更する場合は新しいディレクトリを指定して下さい(最後に"/"は付けないように注意して下さい)。

Apacheの各種設定の中で、絶対パスではなく相対パスで記述されている場合はこのServerRootで指定したディレクトリからの相対パスとなります。例えば「ErrorLog」の設定箇所を見てください。

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error.log"

このように相対パスで記述されている場合は、「ServerRoot」の値が「C:/pg/Apache/Apache2.2」ですので「C:/pg/Apache/Apache2.2/logs/error.log」が実際に指し示すファイルとなります。

( Written by Tatsuo Ikura )