아파치 웹 서버 설정은,
/etc/apache2/ 디렉터리에 여러 개의 파일로 분리되어 있다.
[ /etc/apache2/apache2.conf (아파치 웹 서버의 주 설정 파일) ]
apache2.conf
---- ports.conf
---- mods-enabled
---- ---- ---- ---- .load
---- ---- ---- ---- .conf
---- conf-enabled
---- ---- ---- ---- .conf
---- sites-enabled
---- ---- ---- ---- .conf
ServerRoot "/etc/apache2"
-> 웹 서버의 설정 파일, 로그 파일 등이 저장되는 최상위 디렉터리
Listen 80 ->
웹 서버의 포트 번호 (ports.conf 에 있음)
include conf.modules.d/*.conf
-> 설정 파일에 포함될 파일의 경로, 파일 이름이 들어 있다.
User ${APACHE_RUN_USER}
-> 웹 서비스를 작동하는 사용자. envvars 파일에 www-data로 설정되어 있다.
Group ${APACHE_RUN_GROUP}
-> 웹 서비스를 작동하는 그룹. envvars 파일에 www-data로 설정되어 있다.
MaxKeepAliveRequests 100
-> 처리할 수 있는 최대 요청 수
<Directory /var/www/>
Option Indexes FollowSymLinks
AllowOverride All
Require all granted
-> 웹 서버는 디렉터리 단위로 설정한다(접근 권한을 다르게 할 수 있다).
'Option Indexes FollowSymLinks'는 현재 디렉터리에서
DirectoryIndex에 지정된 파일이 없다면, 파일 목록을 대신 출력하라는 뜻이다.