문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
nginx:basic_config [2015/07/16 15:15] kwon37xi [참조문서] |
nginx:basic_config [2021/10/19 22:53] (현재) kwon37xi [Keep Alive] |
||
---|---|---|---|
줄 5: | 줄 5: | ||
====== 서버 정보 숨기기 ====== | ====== 서버 정보 숨기기 ====== | ||
- | 응답으로 오는 Server 헤더에 nginx 정보가 들어간다. 이를 숨기는 것이 좋다. | + | |
+ | * [[https:// | ||
+ | * 버전 번호만 삭제 < | ||
+ | // http, | ||
+ | server_tokens off; | ||
+ | </ | ||
+ | * '' | ||
+ | | ||
+ | </ | ||
+ | ====== timeout ====== | ||
< | < | ||
- | server_tokens off | + | send_timeout 60s; # 요청을 보낸 후 응답을 받기까지 대기 시간. 이 설정상 최소 60초 이내에 응답이 와야한다. |
</ | </ | ||
+ | |||
===== error_page ===== | ===== error_page ===== | ||
줄 23: | 줄 33: | ||
error_page 404 =403 / | error_page 404 =403 / | ||
</ | </ | ||
+ | |||
+ | ===== Error Json ===== | ||
+ | * [[https:// | ||
+ | * '' | ||
+ | * [[https:// | ||
+ | < | ||
+ | error_page 500 /500.json; | ||
+ | location /500.json { | ||
+ | return 500 ' | ||
+ | } | ||
+ | </ | ||
+ | |||
===== header/ | ===== header/ | ||
줄 48: | 줄 70: | ||
</ | </ | ||
* '' | * '' | ||
+ | * [[web: | ||
===== default charset ===== | ===== default charset ===== | ||
- | * 기본 | + | * 서빙하는 파일들에 기본 charset 헤더('' |
< | < | ||
# charset_types 에 charset을 자동으로 붙여줄 mime type들 추가. text/ | # charset_types 에 charset을 자동으로 붙여줄 mime type들 추가. text/ | ||
줄 60: | 줄 83: | ||
* [[http:// | * [[http:// | ||
+ | * [[https:// |