Nginx 관련 설정

기본 nginx 로그 포멧은 다음과 같습니다.

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

Module ngx_http_log_module

Alphabetical index of variables

Add the GeoIP2 module to NGINX.

https://github.com/leev/ngx_http_geoip2_module

NPM 설치하기 : 1) Nginx 설치하기

Nginx GeoIP2를 이용하여 불량한 접속국가 막는 방법 | BLOG KINSDAYZ