- 러시아의 프로그래머가 Apache를 코딩하다 문제점을 발견하여 이를 극복하기 위해 만든 웹 서버 프로그램
- 아직까진 Apache에게 점유율이 많이 밀리는 편이나, 신규 서비스 중심으로 점유율 상승에 가속이 붙는 중이라고 함
- Apache가 요청 당 쓰레드, 프로세스 기반으로 돌아갔다면 nginx는 비동기 Event 기반의 구조로 동작한다
- 요청이 들어오면 어떤 동작을 해야하는지만 알려주고 다른 요청을 처리하는 방식
- 그래서 메모리를 사용하는 Apache와는 다르게 모든 IO들을 Event Listener로 미루기 때문에 흐름이 끊기지 않고 응답이 빠르게 진행된다고 함
실행
- nginx는 데몬으로 실행하기 때문에 init.d로도 실행할 수 있다
# systemctl restart nginx
# systemctl status nginx
# systemctl stop nginx
설정 관련
주요 설정 (nginx.conf)