아파치 설정파일에 대하여
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 3,163 조회
- 0 추천
- 목록
본문
아파치 설정파일에 대하여
아파치의 가장 핵심적인 설정파일(httpd.conf)의 설정방법들과 부가적인 아파치 설정파일인 다음 파일들의 설정방법에 대해서 알아볼 것이다.
필자는 아파치의 설정파일들에 대한 설명을 필자가 할 수 있는 최대한의 노력을 다해서 열심히 설명하고있다.
아파치웹서버를 잘 다룬다는 의미의 종착역은 결국 아파치설정파일들은 가장 효율적으로 설정하는 것이기 때문이다.
따라서 필자는 가능한 자세히 그리고 가능한 많은 실제예를 들어서 설정파일들에 대해 설명하고있다.
그래서 아파치 설정파일의 설명에 대한 분량이 좀 많다. 하지만 끝까지 놓치지 말고 모두 여러분들의 것으로 만들기를 진심으로 바란다.
/usr/local/apache/conf/httpd.conf
/usr/local/apache/conf/extra/httpd-mpm.conf
/usr/local/apache/conf/extra/httpd-multilang-errordoc.conf
/usr/local/apache/conf/extra/httpd-autoindex.conf
/usr/local/apache/conf/extra/httpd-languages.conf
/usr/local/apache/conf/extra/httpd-userdir.conf
/usr/local/apache/conf/extra/httpd-info.conf
/usr/local/apache/conf/extra/httpd-vhosts.conf
/usr/local/apache/conf/extra/httpd-manual.conf
/usr/local/apache/conf/extra/httpd-dav.conf
/usr/local/apache/conf/extra/httpd-default.conf
/usr/local/apache/conf/extra/httpd-ssl.conf
“설정파일”이라는 의미에 대해서 언급하도록 하겠다.
우리는 쉽게 그냥 설정파일이라고 많이들 얘기한다. 눈감고 약 1분정도만 “설정파일이 뭘까?”라고 생각해보기 바란다.
“아파치 설정파일”이라는 의미를 곰곰히 생각해 보면 “언제든 변경할 수 있다.”라는 의미가 된다.
그리고 변경한다라는 의미는 “아파치의 기능과 성능이 달라진다.”라는 의미가 된다.
따라서 아파치 설정파일인 httpd.conf 파일의 수많은 지시자들을 설정하고 변경함으로써 우리는 “아파치의 성능과 안정성, 그리고 보안을 구현할 수 있다.”라는 결론을 얻을 수 있다.
물론 여러분들도 너무 잘알고 있으리라 생각한다.
리눅스에는 수많은 설정파일들이 있다.
그런 설정파일들을 끝없이 연구하고 의미를 해석하여 실제 적용함으로써 우리는 리눅스라는 서버를 최상의 상태로 운용할 수 있게 된다.
따라서 이번에 설명하고있는 아파치 설정파일을 통하여 우리는 아파치웹서버를 최상의 상태로 운용하는 것이 궁극적인 목적이라고 할 수 있다.
앞서 잠깐 설명하였듯이 아파치 설정파일은 1개가 아니다.
즉 httpd.conf파일을 비롯하여 /usr/local/apache/conf/extra/디렉토리에 용도별로 여러개의 설정파일이 존재한다.
여기서 아파치 설정파일에 대한 히스토리를 잠깐 얘기하기로 하자.
초기 아파치웹서버의 설정파일은 3개였다.
srm.conf, access.conf, httpd.conf가 그것이었다.
물론 용도별로 설정내용이 각각 나뉘어져있었다.
그 이후에 httpd.conf파일로 하나의 설정파일로 합쳐졌다.
꽤 오랫동안 httpd.conf파일 하나로 설정되다가 아파치웹서버가 2.2버전으로 업그레이드되면서 현재에는 다음과 같이 메인 설정파일인 httpd.conf이외에 extra디렉토리에 모두 11개의 용도별 설정파일이 존재하게되었다.
[root@sulinux apache]#ls -l /usr/local/apache/conf/ 합계 88 drwxr-xr-x 2 root root 4096 4월 16 21:24 extra -rw-r--r-- 1 root root 13670 4월 16 23:27 httpd.conf -rw-r--r-- 1 root root 12958 4월 15 01:21 magic -rw-r--r-- 1 root root 31172 4월 15 01:21 mime.types drwxr-xr-x 3 root root 4096 4월 15 01:21 original [root@sulinux apache]# [root@sulinux apache]#ls -l /usr/local/apache/conf/extra/ 합계 56 -rw-r--r-- 1 root root 2843 4월 15 01:21 httpd-autoindex.conf -rw-r--r-- 1 root root 1713 4월 15 01:21 httpd-dav.conf -rw-r--r-- 1 root root 2344 4월 15 01:21 httpd-default.conf -rw-r--r-- 1 root root 1103 4월 15 01:21 httpd-info.conf -rw-r--r-- 1 root root 5078 4월 15 01:21 httpd-languages.conf -rw-r--r-- 1 root root 916 4월 15 01:21 httpd-manual.conf -rw-r--r-- 1 root root 3789 4월 15 01:21 httpd-mpm.conf -rw-r--r-- 1 root root 2183 4월 15 01:21 httpd-multilang-errordoc.conf -rw-r--r-- 1 root root 10266 4월 15 01:21 httpd-ssl.conf -rw-r--r-- 1 root root 822 4월 16 21:24 httpd-userdir.conf -rw-r--r-- 1 root root 1491 4월 15 01:21 httpd-vhosts.conf [root@sulinux apache]# |
앞서 간략하게 설명한 내용이기는 하지만 다음 용도별 설정파일들의 내용을 확인하기 바란다.
아파치웹서버의 주설정파일로서ServerRoot나 ServerName, DocumentRoot와 같은 메인설정들을 정의하고있다.
그리고 파일의 마지막부분에는 extra디렉토리에 존재하는 11개의 설정파일들을 개별적으로 include하여 선택적으로 로딩할 수 있도록 되어있다.
개별적으로 로딩하는 11개의 용도별 설정파일들을 include하는 내용을 보면 다음과 같다. 참고로 아래 한글주석은 필자가 붙여놓은 것이다.
# Server-pool management (MPM specific) # 아파치웹서버의 MPM specific에 대한 설정파일 #Include conf/extra/httpd-mpm.conf
# Multi-language error messages # 콘텐츠협상을 통한 에러문서(Error Document) 설정파일 #Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings # 디렉토리의 내용을 어떻게 로딩할 것인가에 관한 아파치설정파일 #Include conf/extra/httpd-autoindex.conf
# Language settings # 다른 언어들을 어떻게 표현할 것인가에 대한 아파치 설정파일 #Include conf/extra/httpd-languages.conf
# User home directories # 사용자 홈디렉토리에 관한 설정파일 #Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration # 아파치실행모니터링과 실행상태정보를 설정하는 아파치설정파일 #Include conf/extra/httpd-info.conf
# Virtual hosts # 아파치 가상호스트에 대한 설정파일 #Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual # 아파치웹서버의 매뉴얼제공에 대한 설정파일 #Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV) # WebDAV에 관한 아파치 설정파일 #Include conf/extra/httpd-dav.conf
# Various default settings # 아파치웹서버의 기본설정사항들이 설정되어있는 설정파일 #Include conf/extra/httpd-default.conf
# Secure (SSL/TLS) connections # SSL지원을 위한 아파치 설정파일 #Include conf/extra/httpd-ssl.conf
|
위의 내용을 보는 바와같이 필요한 개별 설정파일의 설정부분에서 주석(#)을 제거하면 적용 되도록 설정되어있다.
관련자료
-
이전
-
다음