"아파치 설정파일 httpd.conf, apache2.conf 위치 확인"의 두 판 사이의 차이

잔글 (Httpd.conf 찾기 문서를 Httpd.conf 위치(으)로 옮김)
(차이 없음)

2012년 6월 10일 (일) 13:48 판

  • httpd.conf 위치 알아내기
  • httpd.conf 폴더

1 방법

[root@localhost ~]# which httpd
/usr/sbin/httpd

→ 실행파일인 httpd는 /usr/sbin에 있다.

[root@localhost ~]# httpd -V
Server version: Apache/2.2.3
Server built:   Oct 20 2011 17:00:12
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -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=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

→ HTTPD_ROOT는 /etc/httpd 이고, SERVER_CONFIG_FILE은 conf/httpd.conf 이므로 조합하면 /etc/httpd/conf/httpd.conf 이다.

[root@localhost ~]# ll /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 35569 Feb 25 16:04 /etc/httpd/conf/httpd.conf
[root@localhost ~]# cat /etc/httpd/conf/httpd.conf | head -4
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}