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

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 2명의 중간 판 29개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{소문자}}
{{소문자}}
;httpd.conf 위치 알아내기, 찾기
==개요==
;아파치 설정파일 httpd.conf, apache2.conf 위치 확인
;httpd.conf 폴더
;httpd.conf 폴더
;/etc/httpd/conf/
* 흔한 설정
:CentOS이면 /etc/httpd/conf/httpd.conf
:우분투이면 /etc/apache2/apache2.conf


==방법 1(egrep)==
==방법: CentOS==
{{참고|httpd|설명=httpd의 위치에 대해서는}}
{{참고|httpd|설명=httpd의 위치에 대해서는}}
;명령어
<syntaxhighlight lang='console'>
<source lang='bash'>
[root@zetawiki ~]# httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
</source>
 
;실행예시
<source lang='dos'>
[root@jmnote ~]# httpd -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
  -D HTTPD_ROOT="/etc/httpd"
  -D HTTPD_ROOT="/etc/httpd"
  -D SERVER_CONFIG_FILE="conf/httpd.conf"
  -D SERVER_CONFIG_FILE="conf/httpd.conf"
</source>
</syntaxhighlight>
:→ 두 행을 조합하면 /etc/httpd/conf/httpd.conf
:→ 두 행을 조합하면 /etc/httpd/conf/httpd.conf
<syntaxhighlight lang='console'>
[root@zetawiki ~]# ll /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 34540 Aug 26 17:12 /etc/httpd/conf/httpd.conf
</syntaxhighlight>


==방법 2(raw)==
==방법: 우분투==
;명령어
<syntaxhighlight lang='console'>
<source lang='bash'>
root@zetawiki02:~# apache2 -V | egrep "(HTTPD\_ROOT|SERVER\_CONFIG\_FILE)"
httpd -V
  -D HTTPD_ROOT="/etc/apache2"
</source>
  -D SERVER_CONFIG_FILE="apache2.conf"
 
</syntaxhighlight>
;실행예시
:두 행을 조합하면 /etc/apache2/apache2.conf
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# httpd -V
root@zetawiki02:~# ll /etc/apache2/apache2.conf
Server version: Apache/2.2.3
-rw-r--r-- 1 root root 8346 Feb 7  2012 /etc/apache2/apache2.conf
Server built:  Oct 20 2011 17:00:12
</syntaxhighlight>
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='dos'>
[root@jmnote ~]# ll /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 35569 Feb 25 16:04 /etc/httpd/conf/httpd.conf
[root@jmnote ~]# 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.
</source>


==같이 보기==
==같이 보기==
*[[php.ini]]
*[[아파치 설정파일]]
*[[httpd.conf 기본값]]
*[[httpd.conf]]
*[[개인서명 SSL 인증서 설치]]
*[[apache2.conf]]
*[[DOCUMENT_ROOT]]
*[[httpd의 위치]]


[[분류: 아파치]]
[[분류: 아파치]]
[[분류: /etc/httpd/conf]]
[[분류: /etc/apache2]]
[[분류: .conf]]
[[분류: .conf]]
[[분류: /etc/httpd/conf]]

2021년 9월 24일 (금) 23:17 기준 최신판

1 개요[ | ]

아파치 설정파일 httpd.conf, apache2.conf 위치 확인
httpd.conf 폴더
  • 흔한 설정
CentOS이면 /etc/httpd/conf/httpd.conf
우분투이면 /etc/apache2/apache2.conf

2 방법: 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
[root@zetawiki ~]# ll /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 34540 Aug 26 17:12 /etc/httpd/conf/httpd.conf

3 방법: 우분투[ | ]

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
root@zetawiki02:~# ll /etc/apache2/apache2.conf
-rw-r--r-- 1 root root 8346 Feb  7  2012 /etc/apache2/apache2.conf

4 같이 보기[ | ]

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