본문 바로가기
웹기술

ubuntu apache2 디렉토리 이해하기

by IOT장난감 2017. 10. 15.

ubuntu apache2 디렉토리 이해하기


/etc/apache2

설정파일 위치


/etc/apache/apache2.conf

cent os 에서는 httpd.conf를 설정팡일로 했으나 우분투는 apache2.conf를 쓴다.


/etc/apache2/conf-available  :  사용 가능한 구성 파일

/etc/apache2/conf-enabled  :  사용되는 구성파일

/etc/apache2/mods-available :  사용가능 모듈 디렉토리    가령 )   a2enmod  모듈명.conf  하면 해당모듈이  로드된다.

/etc/apache2/mods-enabled :  로드될 모듈

/etc/apache2/sites-available  : 가상호스팅 원본파일 

/etc/apache2/sites-enabled :  실제 로드될 파일

/etc/apache2/envvars   : apache2ctl 환경설정 파일

/etc/apache2/magic : 파일의 MIME TYPE결정,가급적 수정하지말것 

/etc/apache2/ports.conf : 서비스 포트설정 파일


apache2 에서는 이렇게 모듈화 되서 굉장히 편한느낌이다


a2ensite test.conf    <-- virtual host 생성 및 module 설정

a2dissite test.conf    <--  비활성화하기


a2enmod 모듈명   < -- 모듈활성화

a2dismod 모듈명   < -- 비활성


디렉토리 중   a2명령어로  실행~

명칭-available :  소스파일들 !

명칭-enabled :  심볼릭 ! 실제 로드될때 실행된다