nginx(27)
-
Nginx Ubuntu nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf:307
증상stream 모듈이 보이지 않지만, postreSQL을 proxy할 때는 잘 작동함특정 시점에 error 로그에 해당 내용이 남음인증서 갱신할때도 stream관련 문구를 해석하지 못하는 문제 있음확인nginx -V조치: 모듈 재설치모듈을 재설치해도 conf 파일은 덮어치지 않음./configure \기존 적용 내용 ..--with-stream# 하는 김에 dynamic도 추가함--with-stream=dynamicsudo make install확인 및 재시작sudo nginx -tsudo systemctl restart nginx# 확인nginx -V
2025.02.03 -
Fluentd ubuntu에 nginx 정보 elasticsearch 연동하기
plugin 설치fluent-gem install fluent-plugin-elasticsearchfluentd.conf 설정 @type tail # Tag all events from the Nginx access log with 'nginx.access' tag nginx.access # Path to your Nginx access log path /var/log/nginx/access.log # File to record the current reading position so Fluentd knows where to resume pos_file /var/log/td-agent/nginx-access.log.pos @type regexp # This regular exp..
2025.02.02 -
차단 IP 목록
# Deny access for the specific IP address deny 62.84.180.29; deny 195.7.4.153; deny 94.23.203.107; deny 188.165.215.206; deny 142.93.84.58; deny 64.227.15.250; deny 50.116.34.59; deny 95.217.195.123; deny 165.227.30.100; deny 142.93.24.112; deny 167.71.20.83; deny 206.189.218.226; deny 81.167.26.57; ..
2025.02.01 -
Nginx 특정 IP 막기
error.log에 이상한 접속이 있어서 해당 IP의 접근 차단server { listen 80; server_name {도메인}; # Deny access for the specific IP address deny {ip}; allow all; # Other configuration settings root {디렉토리}; index index.html index.htm; # ... additional configuration ...}
2025.02.01 -
Nginx 414 Request-URI Too Large 에러 조치
GET 호출에 대한 길이 제한 조치http { large_client_header_buffers 4 16k;}POST 호출에 대한 길이 제한 조치client_max_body_size 50M; Reverse Proxy 길이 제한 조치proxy_buffer_size 128k;proxy_buffers 4 256k;proxy_busy_buffers_size 256k;nginx 재시작sudo systemctl restart nginx
2025.01.30 -
Nginx 80port를 443port로 redirect 하기
http://test.co.kr로 오는 요청을 https://test.co.kr로 redirect함server { listen 80; listen [::]:80; server_name test.co.kr, temp.co.kr; location / { return 301 https://$host$request_uri; }}만약 temp.co.kr이 여기에 포함되어 있지 않으면, http://temp.co.kr로 호출시, http://test.co.kr이 작함
2025.01.30