환경- Rocky Linux 9.5- Docker- Node.js- MySQL 1. 리눅스 및 도커 설치 록키 리눅스 설치 리눅스 기초 다지기 사전준비 - VirtualBox Rocky 9 설치개요호스트 기반 가상화 프로그램 중 VirtualBox를 사용하여 실습환경을 구축한다. VirtualBox Download - 링크 Rocky Linux Download - 링크 VirtualBox NetworkVirtualBox는 여러 가상 네트워크 환경을 제공한다.openstack.tistory.com 록키 리눅스 기본 환경구성 [Rocky Linux] 기본 환경구성글쓴이가 해당 블로그 내 Rocky Linux 구축 후 기본적으로 설정하는 환경 설정이다. 기대하는 효과로 글쓴이와 동일한 환경으로 구성하여 ..
nginx log 설정/etc/nginx/nginx.conf error_log 지시문 문법컨텍스트 위치: main, http, mail, stream, server, locationerror_log filepath [level];ex)- error_log /var/log/nginx/error.log;- error_log /var/log/nginx/error.log debug; 로그 레벨에는 debug, info, notice, warn, error, crit, alert, emerg 가 있다. error_log 지시문은 http, mail, stream, server, location 와 같은 컨텍스트 수준에서 설정이 가능하다. 컨텍스트 수준 로그 설정 nginx 의 404 error 를 발생시킨 후..
worker_processes /etc/nginx/nginx.conf worker_processes 지시문 문법컨텍스트 위치: mainworker_processes number | auto;ex)- worker_processes 1;- worker_processes auto; 필자의 구성은 auto 이다.따라서, 리눅스의 CPU 코어 수에 맞게 자동으로 worker_processes 갯수가 생성된다. 단순하게 worker_processes 갯수가 많다고 성능이 향상되는 것은 아니다.하드웨어의 CPU 코어 수에 맞게 설정해줘야 한다. 그 이유는 nginx 는 event drive 방식으로 사용자의 HTTP/HTTPS 요청을 처리하는데,해당 요청을 worker_process 간 효율적으로 분산한다. 따라서,..
지시문(directive): nginx.conf 파일은 지시문으로 제어되는 모듈로 구성되어 있다. 지시문 종류단순 지시문: 공백으로 구분된 이름과 매개변수로 구성되고, 세미콜론으로 끝난다. EX) 블록 지시문: 블록 지시문은 단순 지시문과 구조가 동일하지만, 세미콜론이 아닌 중괄호로 끝난다. 블록 지시문 안에 다른 지시문을 가질 수 있는 경우 컨텍스트라고 한다. EX) events, http, server, location
/etc/nginx/nginx.conf (v1.14.1 기준) | user 지시문(Directives) Syntax : user user_id | group_id 설명: 워커 프로세스(worker process) 실행 권한을 설정할 수 있다. group_id 생략 시, user_id 값과 동일하게 설정된다.디폴트 설정은 nobody 이다. 그러나 우리가 이전 편에서 설치한 NGINX v1.14.1 설정 값은 user nginx; 이다.디폴트가 nobody 으로 설정되어 있지 않았다. NGINX - 01. NGINX 설치 Version(Rocky 8.10, NGINX 1.14.1)NGINX 설치dnf install -y nginx NGINX 버전 확인nginx -v NGINX 자동실행systemct..
NGINX 설치dnf install -y nginx NGINX 버전 확인nginx -v NGINX 자동실행systemctl enable --now nginx 실행확인systemctl status nginx 리스너 확인netstat -lnpt NGINX 설정파일 위치- /etc/nginx/nginx.conf 로그파일 위치- /var/log/nginx 기본 HTML 디렉터리- /usr/share/nginx/html