WEB/Nginx

· WEB/Nginx
1. headers-more-nginx-moduleNginx에서 HTTP 헤더를 추가/변경/삭제할 수 있게 해주는 3rd-party 모듈1.1. Default add_header와 비교기능 add_header headers-more기존 헤더 삭제불가능가능(more_clear_headers)기존 헤더 값 수정불가능가능(more_set_headers)특정 조건(Location 등)에서 정상 작동제한 있음정상 동작응답 헤더 제어제한적가능요청 헤더 제어불가능가능(more_set_input_headers)1.2. 설치1. 설치 확인$ nginx -V 2>&1 | grep headers-more# 있을 시 아래와 같은 부분이 확인 됨configure arguments: (생략)... **--add-module=/n..
· WEB/Nginx
1. Nginx 설정${NGINX_HOME}/conf/ 디렉터리 내에서 nginx.conf 혹은 default.conf 파일을 설정한다. WAS에서는 http 혹은 https Listener만 설정되어 있으면 된다.1.1. nginx.conf# http WAS 아이피 및 Port 설정http { include mime.types; upstream was { ip_hash; server ${WAS_SERVER_IP1}:8180 weight=5; server ${WAS_SERVER_IP2}:8180; server backup.com backup; # backup Server 지정 } server { listen 80; location / { proxy_pass ; pro..
· WEB/Nginx
Nginx 설정 파일Nginx 설정 파일은 nginx.conf이며, ${NGINX_HOME}/conf 디렉터리에 존재한다.1. nginx.conf아래는 nginx.conf 파일 예시이다.user web; # nginx 프로세스를 기동 시키는 계정worker_processes 1;error_log logs/error.log debug;pid logs/nginx.pid;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] ..
· WEB/Nginx
개  요Nginx사용 시 File Upload 서비스를 수행하다가 HTTP 413 client intended to send too large body 에러를 확인한 경우 해결하는 방법을 정리하였다.1. 원  인Nginx의 경우 최대 용량을 지정하는 옵션인 client_max_body_size가 있다. 해당 옵션 값의 기본값은 1m이며 HTTP Client의 Content-Length 헤더값이 이보다 클 경우 Nginx는 HTTP 413 Error(Requeset Entity Too Large)를 전송하며 위와 같은 메시지 화면을 보여준다.Nginx 로그에는 아래와 같은 내용이 확인 된다.2024/10/15 05:54:59 [error] 242: *160826 client intended to send ..
JOTAN
'WEB/Nginx' 카테고리의 글 목록