문서의 선택한 두 판 사이의 차이를 보여줍니다.
다음 판 | 이전 판 | ||
nginx:log [2013/03/26 18:26] kwon37xi 새로 만듦 |
nginx:log [2020/08/26 15:48] (현재) kwon37xi [특정 GET query parameter masking] |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== nginx log ====== | ====== nginx log ====== | ||
+ | ===== 특정 변수를 로그로 남기기 ===== | ||
nginx 의 변수들을 로그로 남기고 싶으면 '' | nginx 의 변수들을 로그로 남기고 싶으면 '' | ||
줄 8: | 줄 9: | ||
</ | </ | ||
+ | ===== 로그 끄기 ===== | ||
+ | < | ||
+ | location /resources { | ||
+ | access_log off; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== 특정 GET query parameter masking ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | < | ||
+ | log_format filter ' | ||
+ | '" | ||
+ | |||
+ | # Other Configs | ||
+ | |||
+ | server { | ||
+ | #Server Configs | ||
+ | location / { # location 을 구체적으로 명시하는게 나을 듯 보임. | ||
+ | set $temp $request; | ||
+ | if ($temp ~ (.*)password=[^& | ||
+ | set $temp $1password=****$2; | ||
+ | } | ||
+ | |||
+ | access_log / | ||
+ | } | ||
+ | } | ||
+ | </ | ||