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

2번째 줄: 2번째 줄:
;httpd.conf 위치 알아내기, 찾기
;httpd.conf 위치 알아내기, 찾기
;httpd.conf 폴더
;httpd.conf 폴더
;/etc/httpd/conf/
;/etc/httpd/conf/httpd.conf


==방법 1(egrep)==
==방법: httpd (CentOS)==
{{참고|httpd|설명=httpd의 위치에 대해서는}}
{{참고|httpd|설명=httpd의 위치에 대해서는}}
;명령어
<source lang='bash'>
httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
</source>
;실행예시
<source lang='cli'>
<source lang='cli'>
[root@zetawiki ~]# httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
[root@zetawiki ~]# httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
19번째 줄: 13번째 줄:
:→ 두 행을 조합하면 /etc/httpd/conf/httpd.conf
:→ 두 행을 조합하면 /etc/httpd/conf/httpd.conf


==방법 2(raw)==
==방법: apache2 (우분투)==
;명령어
<source lang='bash'>
httpd -V
</source>
 
;실행예시
<source lang='cli'>
[root@zetawiki ~]# 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"
</source>
→ HTTPD_ROOT는 /etc/httpd 이고, SERVER_CONFIG_FILE은 conf/httpd.conf 이므로 조합하면 /etc/httpd/conf/httpd.conf 이다.
 
==파일 보기==
<source lang='cli'>
[root@zetawiki ~]# ll /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 35569 Feb 25 16:04 /etc/httpd/conf/httpd.conf
</source>
<source lang='cli'>
<source lang='cli'>
[root@zetawiki ~]# cat /etc/httpd/conf/httpd.conf | head -4
root@zetawiki02:~# apache2 -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
#
-D HTTPD_ROOT="/etc/apache2"
# This is the main Apache server configuration file. It contains the
  -D SERVER_CONFIG_FILE="apache2.conf"
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
</source>
</source>
:→ 두 행을 조합하면 /etc/apache2/apache2.conf


==같이 보기==
==같이 보기==

2015년 9월 22일 (화) 15:43 판

httpd.conf 위치 알아내기, 찾기
httpd.conf 폴더
/etc/httpd/conf/httpd.conf

1 방법: httpd (CentOS)

[root@zetawiki ~]# httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
 -D HTTPD_ROOT="/etc/httpd"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
→ 두 행을 조합하면 /etc/httpd/conf/httpd.conf

2 방법: apache2 (우분투)

root@zetawiki02:~# apache2 -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
 -D HTTPD_ROOT="/etc/apache2"
 -D SERVER_CONFIG_FILE="apache2.conf"
→ 두 행을 조합하면 /etc/apache2/apache2.conf

3 같이 보기