<1>我們可以通過 locate httpd.conf 命令來查詢該檔案;
<2># httpd -v
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/conf/httpd.conf:1641
AH00112: Warning: DocumentRoot [/dev/null] does not exist
Server version: Apache/2.4.25 (cPanel)
Server built:   May 15 2017 16:32:53
Server’s Module Magic Number: 20120211:67
Server loaded:  APR 1.5.2, APR-UTIL 1.5.2
Compiled using: APR 1.5.2, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
threaded:     no
forked:     yes (variable process count)
Server compiled with….
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT=”/etc/apache2″
-D SUEXEC_BIN=”/usr/sbin/suexec”
-D DEFAULT_PIDLOG=”/var/run/apache2/httpd.pid”
-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”
-D DEFAULT_ERRORLOG=”logs/error_log”
-D AP_TYPES_CONFIG_FILE=”conf/mime.types”
-D SERVER_CONFIG_FILE=”conf/httpd.conf”
通過 httpd -V 同樣我們可以更清晰的看到 httpd.conf 檔案的路徑