[Nginx] Directives, Context 그리고 Configuration
·
DevOps
Nginx는 'nginx.conf' 설정 파일에서 Nginx 서버에 관한 다양한 설정을 정할 수 있다. 파일 안에는 Directives와 Context이 모여 Configuration을 만든다. 계층 순서대로 Directives부터 Configuration까지 알아보도록 하자. DirectivesDirectives는 config 파일 안의 지시어다. 파일의 가장 기본 단위이자 서버가 실행하는 명령어라 생각하면 된다. Directives는 크게 두 가지로 나뉜다.Single DirectivesBlock Directives말 뜻대로 Directives는 한 줄로 구성할 수 있고, 중괄호를 사용해 섹션 혹은 블록처럼 구성할 수 있다. 같은 내용의 설정이 많이 필요한 경우 Directives를 블록으로 구성해..