

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# nginx 속성
<a name="attributes-recipes-nginx"></a>

**중요**  
이 AWS OpsWorks Stacks 서비스는 2024년 5월 26일에 수명이 종료되었으며 신규 및 기존 고객 모두에서 비활성화되었습니다. 가능한 한 빨리 워크로드를 다른 솔루션으로 마이그레이션하는 것이 좋습니다. 마이그레이션에 대한 질문이 있는 경우 [AWS re:Post](https://repost.aws/) 또는 [AWS Premium Support](https://aws.amazon.com/support)를 통해 AWS Support 팀에 문의하세요.

**참고**  
이러한 속성은 Linux 스택에서만 사용할 수 있습니다.

[`nginx` 속성](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/nginx/attributes/nginx.rb)은 [Nginx](http://wiki.nginx.org/Main) 구성을 지정합니다. 자세한 정보는 [명령 인덱스](http://wiki.nginx.org/DirectiveIndex)를 참조하세요. 내장 속성을 재정의해 사용자 지정 값을 지정하는 방법에 대한 자세한 정보는 [속성 재정의](workingcookbook-attributes.md) 단원을 참조하세요.


****  

|  |  |  | 
| --- |--- |--- |
| [이진수 ](#attributes-recipes-nginx-binary) | [dir ](#attributes-recipes-nginx-dir) | [gzip ](#attributes-recipes-nginx-gzip) | 
| [gzip\$1comp\$1level ](#attributes-recipes-nginx-gzip-comp) | [gzip\$1disable ](#attributes-recipes-nginx-gzip-disable) | [gzip\$1http\$1version ](#attributes-recipes-nginx-gzip-http) | 
| [gzip\$1proxied ](#attributes-recipes-nginx-gzip-proxied) | [gzip\$1static ](#attributes-recipes-nginx-gzip-static) | [gzip\$1types ](#attributes-recipes-nginx-gzip-types) | 
| [gzip\$1vary ](#attributes-recipes-nginx-gzip-vary) | [keepalive ](#attributes-recipes-nginx-keepalive) | [keepalive\$1timeout ](#attributes-recipes-nginx-keepalive-timeout) | 
| [log\$1dir ](#attributes-recipes-nginx-log) | [user ](#attributes-recipes-nginx-user) | [server\$1names\$1hash\$1bucket\$1size](#attributes-recipes-nginx-worker-hash) | 
| [worker\$1processes ](#attributes-recipes-nginx-worker-processes) | [worker\$1connections ](#attributes-recipes-nginx-worker-connections) |  | 

**이진수 **  <a name="attributes-recipes-nginx-binary"></a>
Nginx 이진수의 위치(문자열). 기본값은 `'/usr/sbin/nginx'`입니다.  

```
node[:nginx][:binary]
```

**dir **  <a name="attributes-recipes-nginx-dir"></a>
구성 파일 등의 파일 위치(문자열). 기본값은 `'/etc/nginx'`입니다.  

```
node[:nginx][:dir]
```

**gzip **  <a name="attributes-recipes-nginx-gzip"></a>
gzip 압축이 활성화되어 있는지 여부(문자열). 가능한 값은 `'on'`와 `'off'`입니다. 기본값은 `'on'`입니다.  
압축은 보안 위험을 초래할 수 있습니다. 압축을 완전히 비활성화하려면 이 속성을 다음과 같이 설정하세요.  

```
node[:nginx][:gzip] = 'off'
```

```
node[:nginx][:gzip]
```

**gzip\$1comp\$1level **  <a name="attributes-recipes-nginx-gzip-comp"></a>
1-9까지의 압축 수준(1이 최소 압축)(문자열). 기본값은 `'2'`입니다.  

```
node[:nginx][:gzip_comp_level]
```

**gzip\$1disable **  <a name="attributes-recipes-nginx-gzip-disable"></a>
지정된 사용자 에이전트에 대해 gzip 압축을 비활성화합니다(문자열). 값은 정규 표현식이며 기본값은 `'MSIE [1-6].(?!.*SV1)'`입니다.  

```
node[:nginx][:gzip_disable]
```

**gzip\$1http\$1version **  <a name="attributes-recipes-nginx-gzip-http"></a>
지정된 HTTP 버전에 대해 gzip 압축을 활성화합니다(문자열). 기본값은 `'1.0'`입니다.  

```
node[:nginx][:gzip_http_version]
```

**gzip\$1proxied **  <a name="attributes-recipes-nginx-gzip-proxied"></a>
프록시 요청에 대한 응답을 압축할지 여부 및 압축 방법이며, 다음 값 중 하나를 취할 수 있습니다(문자열).  
+ `'off'`: 프록시된 요청을 압축하지 않습니다
+ `'expired'`: Expire 헤더가 캐싱을 금지하는 경우, 압축합니다
+ `'no-cache'`: Cache-Control 헤더가 "no-cache"로 설정된 경우, 압축합니다
+ `'no-store'`: Cache-Control 헤더가 "no-store"로 설정된 경우, 압축합니다
+ `'private'`: Cache-Control 헤더가 "private"으로 설정된 경우, 압축합니다
+ `'no_last_modified'`: Last-Modified가 설정되지 않은 경우, 압축합니다
+ `'no_etag'`: 요청에 ETag 헤더가 없는 경우, 압축합니다
+ `'auth'`: 요청에 Authorization 헤더가 포함된 경우, 압축합니다
+ `'any'`: 모든 프록시된 요청을 압축합니다 
기본값은 `'any'`입니다.  

```
node[:nginx][:gzip_proxied]
```

**gzip\$1static **  <a name="attributes-recipes-nginx-gzip-static"></a>
gzip 정적 모듈이 활성화되어 있는지 여부(문자열). 가능한 값은 `'on'`와 `'off'`입니다. 기본값은 `'on'`입니다.  

```
node[:nginx][:gzip_static]
```

**gzip\$1types **  <a name="attributes-recipes-nginx-gzip-types"></a>
압축할 MIME 형식의 목록(문자열의 목록). 기본값은 `['text/plain', 'text/html', 'text/css', 'application/x-javascript', 'text/xml', 'application/xml', 'application/xml+rss', 'text/javascript']`입니다.  

```
node[:nginx][:gzip_types]
```

**gzip\$1vary **  <a name="attributes-recipes-nginx-gzip-vary"></a>
`Vary:Accept-Encoding `응답 헤더를 활성화할지 여부(문자열). 가능한 값은 `'on'`와 `'off'`입니다. 기본값은 `'on'`입니다.  

```
node[:nginx][:gzip_vary]
```

**keepalive **  <a name="attributes-recipes-nginx-keepalive"></a>
연결 유지 연결을 활성화할지 여부(문자열). 가능한 값은 `'on'`와 `'off'`입니다. 기본값은 `'on'`입니다.  

```
node[:nginx][:keepalive]
```

**keepalive\$1timeout **  <a name="attributes-recipes-nginx-keepalive-timeout"></a>
연결 유지 연결이 계속 열려 있는 최대 시간(초)(숫자). 기본값은 `65`입니다.  

```
node[:nginx][:keepalive_timeout]
```

**log\$1dir **  <a name="attributes-recipes-nginx-log"></a>
로그 파일의 위치(문자열). 기본값은 `'/var/log/nginx'`입니다.  

```
node[:nginx][:log_dir]
```

**user **  <a name="attributes-recipes-nginx-user"></a>
사용자(문자열). 기본값은 다음과 같습니다.  
+ Amazon Linux 및 RHEL: `'www-data'`
+ Ubuntu: `'nginx'`

```
node[:nginx][:user]
```

**server\$1names\$1hash\$1bucket\$1size**  <a name="attributes-recipes-nginx-worker-hash"></a>
서버 이름의 해시 테이블 버킷 크기로서 `32`, `64` 또는 `128`로 설정할 수 있습니다(숫자). 기본값은 `64`입니다.  

```
node[:nginx][:server_names_hash_bucket_size]
```

**worker\$1processes **  <a name="attributes-recipes-nginx-worker-processes"></a>
worker 프로세스의 수(숫자). 기본값은 `10`입니다.  

```
node[:nginx][:worker_processes]
```

**worker\$1connections **  <a name="attributes-recipes-nginx-worker-connections"></a>
worker 연결의 최대 수(숫자). 기본값은 `1024`입니다. 클라이언트의 최대 수는 `worker_processes * worker_connections`로 설정됩니다.  

```
node[:nginx][:worker_connections]
```