

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 内置说明书属性
<a name="attributes-recipes"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
大多数这些属性仅在 Linux 堆栈上可用。

大多数内置配方有一个或多个[属性文件](workingcookbook-installingcustom-components-attributes.md)，用于定义各种设置。您可以在自定义配方中访问这些设置，并使用自定义 JSON 覆盖它们。您通常需要访问或覆盖用于控制 OpsWorks Stacks 支持的各种服务器技术配置的属性。本部分汇总了这些属性。完整的属性文件以及相关的配方和模板可在 [https://github.com/aws/opsworks-cookbooks](https://github.com/aws/opsworks-cookbooks.git) .git 上找到。

**注意**  
所有内置配方属性均为 `default` 类型。

**Topics**
+ [apache2 属性](attributes-recipes-apache.md)
+ [deploy 属性](attributes-recipes-deploy.md)
+ [haproxy 属性](attributes-recipes-haproxy.md)
+ [memcached 属性](attributes-recipes-mem.md)
+ [mysql 属性](attributes-recipes-mysql.md)
+ [nginx 属性](attributes-recipes-nginx.md)
+ [opsworks\$1berkshelf 属性](attributes-recipes-berkshelf.md)
+ [opsworks\$1java 属性](attributes-recipes-java.md)
+ [passenger\$1apache2 属性](attributes-recipes-passenger.md)
+ [ruby 属性](attributes-recipes-ruby.md)
+ [unicorn 属性](attributes-recipes-unicorn.md)

# apache2 属性
<a name="attributes-recipes-apache"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[apache2 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/apache2/attributes/apache.rb)指定 [Apache HTTP 服务器](http://httpd.apache.org/)配置。有关更多信息，请参阅 [Apache 核心功能](http://httpd.apache.org/docs/current/mod/core.html)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [binary ](#attributes-recipes-apache-bin) | [contact ](#attributes-recipes-apache-contact) | [deflate\$1types](#attributes-recipes-apache-deflate) | 
| [dir ](#attributes-recipes-apache-dir) | [document\$1root ](#attributes-recipes-apache-doc-root) | [组 ](#attributes-recipes-apache-group) | 
| [hide\$1info\$1headers ](#attributes-recipes-apache-hide) | [icondir ](#attributes-recipes-apache-icondir) | [init\$1script ](#attributes-recipes-apache-init-script) | 
| [keepalive ](#attributes-recipes-apache-keep) | [keepaliverequests ](#attributes-recipes-apache-keep-requests) | [keepalivetimeout ](#attributes-recipes-apache-keep-timeout) | 
| [lib\$1dir ](#attributes-recipes-apache-lib-dir) | [libexecdir ](#attributes-recipes-apache-libexecdir) | [listen\$1ports ](#attributes-recipes-apache-ports) | 
| [log\$1dir ](#attributes-recipes-apache-log-dir) | [logrotate 属性](#attributes-recipes-apache-log) | [pid\$1file ](#attributes-recipes-apache-pidfile) | 
| [prefork 属性](#attributes-recipes-apache-prefork) | [serversignature ](#attributes-recipes-apache-sig) | [servertokens ](#attributes-recipes-apache-tokens) | 
| [timeout ](#attributes-recipes-apache-timeout) | [traceenable ](#attributes-recipes-apache-trace) | [用户 ](#attributes-recipes-apache-user) | 
| [版本](#attributes-recipes-apache-version) | [worker 属性](#attributes-recipes-apache-worker) |  | 

**binary **  <a name="attributes-recipes-apache-bin"></a>
Apache 二进制文件的位置 (字符串)。默认值为 `'/usr/sbin/httpd'`。  

```
node[:apache][:binary]
```

**contact **  <a name="attributes-recipes-apache-contact"></a>
电子邮件联系人 (字符串)。默认值为虚拟地址 `'ops@example.com'`。  

```
node[:apache][:contact]
```

**deflate\$1types**  <a name="attributes-recipes-apache-deflate"></a>
指示 `mod_deflate` 对指定 Mime 类型启用压缩，前提是这些类型受浏览器支持 (字符串列表)。默认值如下所示：  

```
['application/javascript',
 'application/json',
 'application/x-javascript',
 'application/xhtml+xml',
 'application/xml',
 'application/xml+rss',
 'text/css',
 'text/html',
 'text/javascript',
 'text/plain',
 'text/xml']
```
压缩可能会带来安全风险。要完全禁用压缩，请按如下方式设置此属性：  

```
node[:apache][:deflate_types] = []
```

```
node[:apache][:deflate_types]
```

**dir **  <a name="attributes-recipes-apache-dir"></a>
服务器的根目录 (字符串)。默认值如下所示：  
+ Amazon Linux 和 Red Hat Enterprise Linux (RHEL)：`'/etc/httpd'`
+ Ubuntu: `'/etc/apache2'`

```
node[:apache][:dir]
```

**document\$1root **  <a name="attributes-recipes-apache-doc-root"></a>
文档根目录 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/var/www/html'`
+ Ubuntu: `'/var/www'`

```
node[:apache][:document_root]
```

**组 **  <a name="attributes-recipes-apache-group"></a>
组名称 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'apache'`
+ Ubuntu: `'www-data'`

```
node[:apache][:group]
```

**hide\$1info\$1headers **  <a name="attributes-recipes-apache-hide"></a>
是否忽略 HTTP 标头中的版本和模块信息 (`'true'`/`'false'`) (字符串)。默认值为 `'true'`。  

```
node[:apache][:hide_info_headers]
```

**icondir **  <a name="attributes-recipes-apache-icondir"></a>
图标目录 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/var/www/icons/'`
+ Ubuntu: `'/usr/share/apache2/icons'`

```
node[:apache][:icondir]
```

**init\$1script **  <a name="attributes-recipes-apache-init-script"></a>
初始化脚本 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/etc/init.d/httpd'`
+ Ubuntu: `'/etc/init.d/apache2'`

```
node[:apache][:init_script]
```

**keepalive **  <a name="attributes-recipes-apache-keep"></a>
是否启用保持活动连接 (字符串)。可能的值为 `'On'` 和 `'Off'` (字符串)。默认值为 `'Off'`。  

```
node[:apache][:keepalive]
```

**keepaliverequests **  <a name="attributes-recipes-apache-keep-requests"></a>
Apache 将同时处理的最大保持活动请求数 (数字)。默认值为 `100`。  

```
node[:apache][:keepaliverequests]
```

**keepalivetimeout **  <a name="attributes-recipes-apache-keep-timeout"></a>
Apache 在关闭连接前等待请求的时间 (数字)。默认值为 `3`。  

```
node[:apache][:keepalivetimeout]
```

**lib\$1dir **  <a name="attributes-recipes-apache-lib-dir"></a>
包含对象代码库的目录 (字符串)。默认值如下所示：  
+ Amazon Linux (x86)：`'/usr/lib/httpd'`
+ Amazon Linux (x64) 和 RHEL：`'/usr/lib64/httpd'`
+ Ubuntu: `'/usr/lib/apache2'`

```
node[:apache][:lib_dir]
```

**libexecdir **  <a name="attributes-recipes-apache-libexecdir"></a>
包含程序可执行文件的目录 (字符串)。默认值如下所示：  
+ Amazon Linux (x86)：`'/usr/lib/httpd/modules'`
+ Amazon Linux (x64) 和 RHEL：`'/usr/lib64/httpd/modules'`
+ Ubuntu: `'/usr/lib/apache2/modules'`

```
node[:apache][:libexecdir]
```

**listen\$1ports **  <a name="attributes-recipes-apache-ports"></a>
服务器侦听的端口的列表 (字符串列表)。默认值为 `[ '80','443' ]`。  

```
node[:apache][:listen_ports]
```

**log\$1dir **  <a name="attributes-recipes-apache-log-dir"></a>
日志目录 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/var/log/httpd'`
+ Ubuntu: `'/var/log/apache2'`

```
node[:apache][:log_dir]
```

**logrotate 属性**  <a name="attributes-recipes-apache-log"></a>
这些属性指定如何轮换日志文件。    
**delaycompress **  <a name="attributes-recipes-apache-log-delay"></a>
是否延迟压缩关闭的日志文件，直到下一个轮换周期开始 (`'true'`/`'false'`) (字符串)。默认值为 `'true'`。  

```
node[:apache][:logrotate][:delaycompress]
```  
**组 **  <a name="attributes-recipes-apache-log-group"></a>
日志文件所在的组 (字符串)。默认值为 `'adm'`。  

```
node[:apache][:logrotate][:group]
```  
**mode **  <a name="attributes-recipes-apache-log-mode"></a>
日志文件的模式 (字符串)。默认值为 `'640'`。  

```
node[:apache][:logrotate][:mode]
```  
**owner **  <a name="attributes-recipes-apache-log-owner"></a>
日志文件的所有者 (字符串)。默认值为 `'root'`。  

```
node[:apache][:logrotate][:owner]
```  
**rotate **  <a name="attributes-recipes-apache-log-rotate"></a>
删除关闭的日志文件之前的轮换周期数 (字符串)。默认值为 `'30'`。  

```
node[:apache][:logrotate][:rotate]
```  
**计划 **  <a name="attributes-recipes-apache-log-schedule"></a>
轮换计划 (字符串)。可能值如下所示：  
+ `'daily'`
+ `'weekly'`
+ `'monthly'`
默认值为 `'daily'`。  

```
node[:apache][:logrotate][:schedule]
```

**pid\$1file **  <a name="attributes-recipes-apache-pidfile"></a>
包含守护程序进程 ID 的文件 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/var/run/httpd/httpd.pid'`
+ Ubuntu: `'/var/run/apache2.pid'`

```
node[:apache][:pid_file]
```

**prefork 属性**  <a name="attributes-recipes-apache-prefork"></a>
这些属性指定预派生配置。    
**maxclients **  <a name="attributes-recipes-apache-prefork-maxclients"></a>
将提供的最大并行请求数 (数字)。默认值为 `400`。  
此属性仅适用于运行 Amazon Linux 或 RHEL 的实例。如果您的实例运行的是 Ubuntu 14.04 LTS，请使用 [maxrequestworkers](#attributes-recipes-apache-prefork-maxrequestworkers)。

```
node[:apache][:prefork][:maxclients]
```  
**maxrequestsperchild **  <a name="attributes-recipes-apache-prefork-maxrequests"></a>
子服务器进程处理的最大请求数 (数字)。默认值为 `10000`。  

```
node[:apache][:prefork][:maxrequestsperchild]
```  
**maxrequestworkers**  <a name="attributes-recipes-apache-prefork-maxrequestworkers"></a>
将提供的最大并行请求数 (数字)。默认值为 `400`。  
此属性仅适用于运行 Ubuntu 14.04 LTS 的实例。如果您的实例运行的是 Amazon Linux 或 RHEL，请使用 [maxclients ](#attributes-recipes-apache-prefork-maxclients)。

```
node[:apache][:prefork][:maxrequestworkers]
```  
**maxspareservers **  <a name="attributes-recipes-apache-prefork-maxspare"></a>
最大空闲子服务器进程数 (数字)。默认值为 `32`。  

```
node[:apache][:prefork][:maxspareservers]
```  
**minspareservers **  <a name="attributes-recipes-apache-prefork-minspare"></a>
最小空闲子服务器进程数 (数字)。默认值为 `16`。  

```
node[:apache][:prefork][:minspareservers]
```  
**serverlimit **  <a name="attributes-recipes-apache-prefork-limit"></a>
可配置的最大进程数 (数字)。默认值为 `400`。  

```
node[:apache][:prefork][:serverlimit]
```  
**startservers **  <a name="attributes-recipes-apache-prefork-start"></a>
在启动时创建的子服务器进程数 (数字)。默认值为 `16`。  

```
node[:apache][:prefork][:startservers]
```

**serversignature **  <a name="attributes-recipes-apache-sig"></a>
指定是否为服务器生成的文档配置尾部页脚以及如何配置 (字符串)。可能的值为 `'On'`、`'Off'` 和 `'Email'`。默认值为 `'Off'`。  

```
node[:apache][:serversignature]
```

**servertokens **  <a name="attributes-recipes-apache-tokens"></a>
指定响应标头应包含哪种类型的服务器版本信息 (字符串)：  
+ `'Full'`：完整信息。例如，服务器：Apache/2.4.2 (Unix) PHP/4.2.2 /1.2 MyMod 
+ `'Prod'`：产品名称。例如，Server: Apache
+ `'Major'`：主要版本。例如，Server: Apache/2
+ `'Minor'`：主要版本和次要版本。例如，Server: Apache/2.4
+ `'Min'`：最低版本。例如，Server: Apache/2.4.2
+ `'OS'`：带操作系统的版本。例如，Server: Apache/2.4.2 (Unix) 
默认值为 `'Prod'`。  

```
node[:apache][:servertokens]
```

**timeout **  <a name="attributes-recipes-apache-timeout"></a>
Apache 等待的时间 I/O （数字）。默认值为 `120`。  

```
node[:apache][:timeout]
```

**traceenable **  <a name="attributes-recipes-apache-trace"></a>
是否启用 `TRACE` 请求 (字符串)。可能的值为 `'On'` 和 `'Off'`。默认值为 `'Off'`。  

```
node[:apache][:traceenable]
```

**用户 **  <a name="attributes-recipes-apache-user"></a>
用户名称 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'apache'`
+ Ubuntu: `'www-data'`

```
node[:apache][:user]
```

**版本**  <a name="attributes-recipes-apache-version"></a>
Apache 版本 (字符串)。默认值如下所示：  
+ Amazon Linux: `2.2`
+ Ubuntu 14.04 LTS: `2.4`
+ RHEL: `2.4`

```
node[:apache][:version]
```

**worker 属性**  <a name="attributes-recipes-apache-worker"></a>
这些属性指定工作进程配置。    
**startservers **  <a name="attributes-recipes-apache-worker-start"></a>
在启动时创建的子服务器进程数 (数字)。默认值为 `4`。  

```
node[:apache][:worker][:startservers]
```  
**maxclients **  <a name="attributes-recipes-apache-worker-maxclients"></a>
将提供的最大并行请求数 (数字)。默认值为 `1024`。  

```
node[:apache][:worker][:maxclients]
```  
**maxsparethreads **  <a name="attributes-recipes-apache-worker-maxspare"></a>
最大空闲线程数 (数字)。默认值为 `192`。  

```
node[:apache][:worker][:maxsparethreads]
```  
**minsparethreads **  <a name="attributes-recipes-apache-worker-minspare"></a>
最小空闲线程数 (数字)。默认值为 `64`。  

```
node[:apache][:worker][:minsparethreads]
```  
**threadsperchild **  <a name="attributes-recipes-apache-worker-threads"></a>
每个子进程的线程数 (数字)。默认值为 `64`。  

```
node[:apache][:worker][:threadsperchild]
```  
**maxrequestsperchild **  <a name="attributes-recipes-apache-worker-maxreq"></a>
子服务器进程处理的最大请求数 (数字)。默认值为 `10000`。  

```
node[:apache][:worker][:maxrequestsperchild]
```

# deploy 属性
<a name="attributes-recipes-deploy"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

[内置部署说明书的 `deploy.rb` 属性文件](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/deploy/attributes/deploy.rb)在 `opsworks` 命名空间中定义了以下属性。有关部署目录的更多信息，请参阅[Deploy 配方](create-custom-deploy.md)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。

**deploy\$1keep\$1releases **  <a name="attributes-recipes-deploy-global-keep-releases"></a>
 OpsWorks Stacks 将存储的应用程序部署数量的全局设置（数字）。默认值是 5。该值可控制您能够回滚应用程序的次数。  

```
node[:opsworks][:deploy_keep_releases]
```

**组 **  
(仅限 Linux) 应用程序部署目录的 `group` 设置 (字符串)。该默认值取决于实例的操作系统：  
+ 对于 Ubuntu 实例，默认值为 `www-data`。
+ 对于属于使用 Nginx 和 Unicorn 的 Rails App Server 层的成员 Amazon Linux 或 RHEL 实例，默认值为 `nginx`。
+ 对于所有其他 Amazon Linux 或 RHEL 实例，默认值为 `apache`。

```
node[:opsworks][:deploy_user][:group]
```

**用户 **  
(仅限 Linux) 应用程序部署目录的 `user` 设置 (字符串)。默认值为 `deploy`。  

```
node[:opsworks][:deploy_user][:user]
```

# haproxy 属性
<a name="attributes-recipes-haproxy"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

这些[`haproxy`属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/haproxy/attributes/default.rb)指定[HAProxy 服务器](http://haproxy.1wt.eu/)配置。有关更多信息，请参阅[HAProxy文档](http://cbonte.github.io/haproxy-dconv/configuration-1.5.html)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [balance ](#attributes-recipes-haproxy-balance) | [check\$1interval ](#attributes-recipes-haproxy-interval) | [client\$1timeout ](#attributes-recipes-haproxy-client-timeout) | 
| [connect\$1timeout ](#attributes-recipes-haproxy-connect-timeout) | [default\$1max\$1connections ](#attributes-recipes-haproxy-default-max) | [global\$1max\$1connections ](#attributes-recipes-haproxy-global-max) | 
| [health\$1check\$1method ](#attributes-recipes-haproxy-health-method) | [health\$1check\$1url ](#attributes-recipes-haproxy-health-url) | [queue\$1timeout ](#attributes-recipes-haproxy-queue-timeout) | 
| [http\$1request\$1timeout ](#attributes-recipes-haproxy-http-timeout) | [maxcon\$1factor\$1nodejs\$1app ](#attributes-recipes-haproxy-nodejs-app) | [maxcon\$1factor\$1nodejs\$1app\$1ssl ](#attributes-recipes-haproxy-nodejs-ssl) | 
| [maxcon\$1factor\$1php\$1app ](#attributes-recipes-haproxy-php-app) | [maxcon\$1factor\$1php\$1app\$1ssl ](#attributes-recipes-haproxy-php-ssl) | [maxcon\$1factor\$1rails\$1app ](#attributes-recipes-haproxy-rails-app) | 
| [maxcon\$1factor\$1rails\$1app\$1ssl ](#attributes-recipes-haproxy-rails-ssl) | [maxcon\$1factor\$1static ](#attributes-recipes-haproxy-static-app) | [maxcon\$1factor\$1static\$1ssl ](#attributes-recipes-haproxy-static-ssl) | 
| [重试 ](#attributes-recipes-haproxy-retries) | [server\$1timeout ](#attributes-recipes-haproxy-server-timeout) | [stats\$1url ](#attributes-recipes-haproxy-stats-url) | 
| [stats\$1user ](#attributes-recipes-haproxy-user) |  |  | 

**balance **  <a name="attributes-recipes-haproxy-balance"></a>
负载均衡器用来选择服务器的算法 (字符串)。默认值为 `'roundrobin'`。其他选项是：  
+ 'static-rr'
+ 'leastconn'
+ 'source'
+ 'uri'
+ 'url\$1param'
+ 'hdr(name)'
+ 'rdp-cookie'
+ 'rdp-cookie(name)'
有关这些参数的更多信息，请参阅 [balance](http://cbonte.github.io/haproxy-dconv/configuration-1.5.html)。  

```
node[:haproxy][:balance]
```

**check\$1interval **  <a name="attributes-recipes-haproxy-interval"></a>
运行状况检查时间间隔 (字符串)。默认值为 `'10s'`。  

```
node[:haproxy][:check_interval]
```

**client\$1timeout **  <a name="attributes-recipes-haproxy-client-timeout"></a>
客户端可以处于非活动状态的最长时间 (字符串)。默认值为 `'60s'`。  

```
node[:haproxy][:client_timeout]
```

**connect\$1timeout **  <a name="attributes-recipes-haproxy-connect-timeout"></a>
等待服务器连接尝试成功的最长时间（字符串）。 HAProxy 默认值为 `'10s'`。  

```
node[:haproxy][:connect_timeout]
```

**default\$1max\$1connections **  <a name="attributes-recipes-haproxy-default-max"></a>
默认的最大连接数 (字符串)。默认值为 `'80000'`。  

```
node[:haproxy][:default_max_connections]
```

**global\$1max\$1connections **  <a name="attributes-recipes-haproxy-global-max"></a>
最大连接数 (字符串)。默认值为 `'80000'`。  

```
node[:haproxy][:global_max_connections]
```

**health\$1check\$1method **  <a name="attributes-recipes-haproxy-health-method"></a>
运行状况检查方法 (字符串)。默认值为 `'OPTIONS'`。  

```
node[:haproxy][:health_check_method]
```

**health\$1check\$1url **  <a name="attributes-recipes-haproxy-health-url"></a>
用于检查服务器运行状况的 URL 路径 (字符串)。默认值为 `'/'`。  

```
node[:haproxy][:health_check_url ]
```

**queue\$1timeout **  <a name="attributes-recipes-haproxy-queue-timeout"></a>
等待免费连接的最长时间 (字符串)。默认值为 `'120s'`。  

```
node[:haproxy][:queue_timeout]
```

**http\$1request\$1timeout **  <a name="attributes-recipes-haproxy-http-timeout"></a>
等待完成 HTTP 请求的最长时间（字符串）。 HAProxy 默认值为 `'30s'`。  

```
node[:haproxy][:http_request_timeout]
```

**重试 **  <a name="attributes-recipes-haproxy-retries"></a>
服务器连接失败后的重试次数 (字符串)。默认值为 `'3'`。  

```
node[:haproxy][:retries]
```

**server\$1timeout **  <a name="attributes-recipes-haproxy-server-timeout"></a>
客户端可以处于非活动状态的最长时间 (字符串)。默认值为 `'60s'`。  

```
node[:haproxy][:server_timeout]
```

**stats\$1url **  <a name="attributes-recipes-haproxy-stats-url"></a>
统计信息页面的 URL 路径 (字符串)。默认值为 `'/haproxy?stats'`。  

```
node[:haproxy][:stats_url]
```

**stats\$1user **  <a name="attributes-recipes-haproxy-user"></a>
统计信息页面用户名称 (字符串)。默认值为 `'opsworks'`。  

```
node[:haproxy][:stats_user]
```

这些`maxcon`属性表示负载因子乘数，用于计算 HAProxy 允许[后端](attributes-json-opsworks-instance.md#attributes-json-opsworks-instance-backends)的最大连接数。例如，假设您在一个`backend`值为 4 的小实例上有一个 Rails 应用程序服务器，这意味着 OpsWorks Stacks 将为该实例配置四个 Rails 进程。如果使用默认`maxcon_factor_rails_app`值 7，则 HAProxy 将处理与 Rails 服务器的 28 (4\$17) 个连接。

**maxcon\$1factor\$1nodejs\$1app **  <a name="attributes-recipes-haproxy-nodejs-app"></a>
Node.js 应用程序服务器的 maxcon 因子 (数字)。默认值为 `10`。  

```
node[:haproxy][:maxcon_factor_nodejs_app]
```

**maxcon\$1factor\$1nodejs\$1app\$1ssl **  <a name="attributes-recipes-haproxy-nodejs-ssl"></a>
使用 SSL 的 Node.js 应用程序服务器的 maxcon 因子 (数字)。默认值为 `10`。  

```
node[:haproxy][:maxcon_factor_nodejs_app_ssl]
```

**maxcon\$1factor\$1php\$1app **  <a name="attributes-recipes-haproxy-php-app"></a>
PHP 应用程序服务器的 maxcon 因子 (数字)。默认值为 `10`。  

```
node[:haproxy][:maxcon_factor_php_app]
```

**maxcon\$1factor\$1php\$1app\$1ssl **  <a name="attributes-recipes-haproxy-php-ssl"></a>
使用 SSL 的 PHP 应用程序服务器的 maxcon 因子 (数字)。默认值为 `10`。  

```
node[:haproxy][:maxcon_factor_php_app_ssl]
```

**maxcon\$1factor\$1rails\$1app **  <a name="attributes-recipes-haproxy-rails-app"></a>
Rails 应用程序服务器的 maxcon 因子 (数字)。默认值为 `7`。  

```
node[:haproxy][:maxcon_factor_rails_app]
```

**maxcon\$1factor\$1rails\$1app\$1ssl **  <a name="attributes-recipes-haproxy-rails-ssl"></a>
使用 SSL 的 Rails 应用程序服务器的 maxcon 因子 (数字)。默认值为 `7`。  

```
node[:haproxy][:maxcon_factor_rails_app_ssl]
```

**maxcon\$1factor\$1static **  <a name="attributes-recipes-haproxy-static-app"></a>
静态 Web 服务器的 maxcon 因子 (数字)。默认值为 `15`。  

```
node[:haproxy][:maxcon_factor_static]
```

**maxcon\$1factor\$1static\$1ssl **  <a name="attributes-recipes-haproxy-static-ssl"></a>
使用 SSL 的静态 Web 服务器的 maxcon 因子 (数字)。默认值为 `15`。  

```
node[:haproxy][:maxcon_factor_static_ssl]
```

# memcached 属性
<a name="attributes-recipes-mem"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`memcached` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/memcached/attributes/default.rb)指定 [Memcached](http://memcached.org/) 服务器配置。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [memory ](#attributes-recipes-mem-memory) | [max\$1connections ](#attributes-recipes-mem-max) | [pid\$1file ](#attributes-recipes-mem-pid) | 
| [端口 ](#attributes-recipes-mem-port) | [start\$1command ](#attributes-recipes-mem-start) | [stop\$1command ](#attributes-recipes-mem-stop) | 
| [用户 ](#attributes-recipes-mem-user) |  |  | 

**memory **  <a name="attributes-recipes-mem-memory"></a>
要使用的最大内存 (MB) (数字)。默认值为 `512`。  

```
node[:memcached][:memory]
```

**max\$1connections **  <a name="attributes-recipes-mem-max"></a>
最大连接数 (字符串)。默认值为 `'4096'`。  

```
node[:memcached][:max_connections]
```

**pid\$1file **  <a name="attributes-recipes-mem-pid"></a>
包含守护程序进程 ID 的文件 (字符串)。默认值为 `'var/run/memcached.pid'`。  

```
node[:memcached][:pid_file]
```

**端口 **  <a name="attributes-recipes-mem-port"></a>
要侦听的端口 (数字)。默认值为 `11211`。  

```
node[:memcached][:port]
```

**start\$1command **  <a name="attributes-recipes-mem-start"></a>
开始命令 (字符串)。默认值为 `'/etc/init.d/memcached start'`。  

```
node[:memcached][:start_command]
```

**stop\$1command **  <a name="attributes-recipes-mem-stop"></a>
停止命令 (字符串)。默认值为 `'/etc/init.d/memcached stop'`。  

```
node[:memcached][:stop_command]
```

**用户 **  <a name="attributes-recipes-mem-user"></a>
用户 (字符串)。默认值为 `'nobody'`。  

```
node[:memcached][:user]
```

# mysql 属性
<a name="attributes-recipes-mysql"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`mysql` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/mysql/attributes/server.rb)指定 [MySQL](http://www.mysql.com/) 主配置。有关更多信息，请参阅[服务器系统变量](http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [basedir ](#attributes-recipes-mysql-basedir) | [bind\$1address ](#attributes-recipes-mysql-bind) | [客户端 ](#attributes-recipes-mysql-clients) | 
| [conf\$1dir ](#attributes-recipes-mysql-conf) | [confd\$1dir ](#attributes-recipes-mysql-confd) | [datadir ](#attributes-recipes-mysql-datadir) | 
| [grants\$1path ](#attributes-recipes-mysql-grants) | [mysql\$1bin ](#attributes-recipes-mysql-bin) | [mysqladmin\$1bin ](#attributes-recipes-mysql-admin-bin) | 
| [pid\$1file ](#attributes-recipes-mysql-pid) | [端口 ](#attributes-recipes-mysql-port) | [root\$1group ](#attributes-recipes-mysql-group) | 
| [server\$1root\$1password ](#attributes-recipes-mysql-pwd) | [球座 ](#attributes-recipes-mysql-socket) | [tunable 属性](#attributes-recipes-mysql-tunable) | 

**basedir **  <a name="attributes-recipes-mysql-basedir"></a>
基目录 (字符串)。默认值为 `'/usr'`。  

```
node[:mysql][:basedir]
```

**bind\$1address **  <a name="attributes-recipes-mysql-bind"></a>
MySQL 侦听的地址 (字符串)。默认值为 `'0.0.0.0'`。  

```
node[:mysql][:bind_address]
```

**客户端 **  <a name="attributes-recipes-mysql-clients"></a>
客户端列表 (字符串列表)。  

```
node[:mysql][:clients]
```

**conf\$1dir **  <a name="attributes-recipes-mysql-conf"></a>
包含配置文件的目录 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/etc'`
+ Ubuntu: `'/etc/mysql'`

```
node[:mysql][:conf_dir]
```

**confd\$1dir **  <a name="attributes-recipes-mysql-confd"></a>
包含额外配置文件的目录 (字符串)。默认值为 `'/etc/mysql/conf.d'`。  

```
node[:mysql][:confd_dir]
```

**datadir **  <a name="attributes-recipes-mysql-datadir"></a>
数据目录 (字符串)。默认值为 `'/var/lib/mysql'`。  

```
node[:mysql][:datadir]
```

**grants\$1path **  <a name="attributes-recipes-mysql-grants"></a>
授权表位置 (字符串)。默认值为 `'/etc/mysql_grants.sql'`。  

```
node[:mysql][:grants_path]
```

**mysql\$1bin **  <a name="attributes-recipes-mysql-bin"></a>
mysql 二进制文件位置 (字符串)。默认值为 `'/usr/bin/mysql'`。  

```
node[:mysql][:mysql_bin]
```

**mysqladmin\$1bin **  <a name="attributes-recipes-mysql-admin-bin"></a>
mysqladmin 位置 (字符串)。默认值为 `'/usr/bin/mysqladmin'`。  

```
node[:mysql][:mysqladmin_bin]
```

**pid\$1file **  <a name="attributes-recipes-mysql-pid"></a>
包含守护程序进程 ID 的文件 (字符串)。默认值为 `'/var/run/mysqld/mysqld.pid'`。  

```
node[:mysql][:pid_file]
```

**端口 **  <a name="attributes-recipes-mysql-port"></a>
服务器侦听的端口 (数字)。默认值为 `3306`。  

```
node[:mysql][:port]
```

**root\$1group **  <a name="attributes-recipes-mysql-group"></a>
根组 (字符串)。默认值为 `'root'`。  

```
node[:mysql][:root_group]
```

**server\$1root\$1password **  <a name="attributes-recipes-mysql-pwd"></a>
服务器的根密码 (字符串)。默认值将随机生成。  

```
node[:mysql][:server_root_password]
```

**球座 **  <a name="attributes-recipes-mysql-socket"></a>
套接字文件的位置 (字符串)。默认值为 `'/var/lib/mysql/mysql.sock'`。默认值如下所示：  
+ Amazon Linux 和 RHEL: `'/var/lib/mysql/mysql.sock'`
+ Ubuntu: `'/var/run/mysqld/mysqld.sock'`

```
node[:mysql][:socket]
```

**tunable 属性**  <a name="attributes-recipes-mysql-tunable"></a>
tunable 属性用于优化性能。    
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/opsworks/latest/userguide/attributes-recipes-mysql.html)  
**back\$1log **  <a name="attributes-recipes-mysql-tunable-back"></a>
最大未完成请求数 (字符串)。默认值为 `'128'`。  

```
node[:mysql][:tunable][:back_log]
```  
**innodb\$1additional\$1mem\$1pool\$1size **  <a name="attributes-recipes-mysql-tunable-mem"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) 用于存储内部数据结构的池的大小 (字符串)。默认值为 `'20M'`。  

```
node[:mysql][:tunable][:innodb_additional_mem_pool_size]
```  
**innodb\$1buffer\$1pool\$1size **  <a name="attributes-recipes-mysql-tunable-buffer"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) 缓冲池的大小 (字符串)。属性值由 OpsWorks Stacks 设置并取决于实例类型，但您可以使用自定义 JSON 或自定义属性文件来[覆盖](workingcookbook-attributes.md)该值。  

```
node[:mysql][:tunable][:innodb_buffer_pool_size]
```  
**innodb\$1flush\$1log\$1at\$1trx\$1commit **  <a name="attributes-recipes-mysql-tunable-flush"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) 刷新日志缓冲区的频率 (字符串)。默认值为 `'2'`。有关更多信息，请参阅 [innodb\$1flush\$1log\$1at\$1trx\$1commit](http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit)。  

```
node[:mysql][:tunable][:innodb_flush_log_at_trx_commit]
```  
**innodb\$1lock\$1wait\$1timeout **  <a name="attributes-recipes-mysql-tunable-lock"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) 事务等待行锁的最长时间 (秒) (字符串)。默认值为 `'50'`。  

```
node[:mysql][:tunable][:innodb_lock_wait_timeout]
```  
**key\$1buffer **  <a name="attributes-recipes-mysql-tunable-key"></a>
索引缓冲区大小 (字符串)。默认值为 `'250M'`。  

```
node[:mysql][:tunable][:key_buffer]
```  
**log\$1slow\$1queries **  <a name="attributes-recipes-mysql-tunable-slow"></a>
慢速查询日志文件的位置 (字符串)。默认值为 `'/var/log/mysql/mysql-slow.log'`。  

```
node[:mysql][:tunable][:log_slow_queries]
```  
**long\$1query\$1time **  <a name="attributes-recipes-mysql-tunable-long"></a>
将查询指定为长时间运行查询所需的时间 (秒) (字符串)。默认值为 `'1'`。  

```
node[:mysql][:tunable][:long_query_time]
```  
**max\$1allowed\$1packet **  <a name="attributes-recipes-mysql-tunable-packet"></a>
允许的最大数据包大小 (字符串)。默认值为 `'32M'`。  

```
node[:mysql][:tunable][:max_allowed_packet]
```  
**max\$1connections **  <a name="attributes-recipes-mysql-tunable-connections"></a>
最大并发客户端连接数 (字符串)。默认值为 `'2048'`。  

```
node[:mysql][:tunable][:max_connections]
```  
**max\$1heap\$1table\$1size **  <a name="attributes-recipes-mysql-tunable-heap"></a>
用户创建的 `MEMORY` 表的最大大小 (字符串)。默认值为 `'32M'`。  

```
node[:mysql][:tunable][:max_heap_table_size]
```  
**net\$1read\$1timeout **  <a name="attributes-recipes-mysql-tunable-net-read"></a>
等待来自连接的更多数据的时长 (秒) (字符串)。默认值为 `'30'`。  

```
node[:mysql][:tunable][:net_read_timeout]
```  
**net\$1write\$1timeout **  <a name="attributes-recipes-mysql-tunable-net-write"></a>
等待数据块写入连接的时长 (秒) (字符串)。默认值为 `'30'`。  

```
node[:mysql][:tunable][:net_write_timeout]
```  
**query\$1cache\$1limit **  <a name="attributes-recipes-mysql-tunable-cache-limit"></a>
单个缓存查询的最大大小 (字符串)。默认值为 `'2M'`。  

```
node[:mysql][:tunable][:query_cache_limit]
```  
**query\$1cache\$1size **  <a name="attributes-recipes-mysql-tunable-cache-size"></a>
查询缓存大小 (字符串)。默认值为 `'128M'`。  

```
node[:mysql][:tunable][:query_cache_size]
```  
**query\$1cache\$1type **  <a name="attributes-recipes-mysql-tunable-cache-type"></a>
查询缓存类型 (字符串)。可能的值如下所示：  
+ `'0'`：不缓存或检索缓存数据。
+ `'1'`：缓存不以 `SELECT SQL_NO_CACHE` 开头的语句。
+ `'2'`：缓存以 `SELECT SQL_CACHE` 开头的语句。
默认值为 `'1'`。  

```
node[:mysql][:tunable][:query_cache_type]
```  
**thread\$1cache\$1size **  <a name="attributes-recipes-mysql-tunable-thread-cache"></a>
缓存以便重复使用的客户端线程数 (字符串)。默认值为 `'8'`。  

```
node[:mysql][:tunable][:thread_cache_size]
```  
**thread\$1stack **  <a name="attributes-recipes-mysql-tunable-thread-stack"></a>
每个线程的堆栈大小 (字符串)。默认值为 `'192K'`。  

```
node[:mysql][:tunable][:thread_stack]
```  
**wait\$1timeout **  <a name="attributes-recipes-mysql-tunable-wait"></a>
等待非交互式连接的时长 (秒)。默认值为 `'180'` (字符串)。  

```
node[:mysql][:tunable][:wait_timeout]
```  
**table\$1cache **  <a name="attributes-recipes-mysql-tunable-table"></a>
打开的表的数量 (字符串)。默认值为 `'2048'`。  

```
node[:mysql][:tunable][:table_cache]
```

# nginx 属性
<a name="attributes-recipes-nginx"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 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)。


****  

|  |  |  | 
| --- |--- |--- |
| [binary ](#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) | [用户 ](#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) |  | 

**binary **  <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]
```

**用户 **  <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>
工作进程数 (数字)。默认值为 `10`。  

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

**worker\$1connections **  <a name="attributes-recipes-nginx-worker-connections"></a>
最大工作线程连接数 (数字)。默认值为 `1024`。最大客户端数设置为 `worker_processes * worker_connections`。  

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

# opsworks\$1berkshelf 属性
<a name="attributes-recipes-berkshelf"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`opsworks_berkshelf` 属性](https://github.com/aws/opsworks-cookbooks/blob/master-chef-11.10/opsworks_berkshelf/attributes/default.rb)指定 Berkshelf 配置。有关更多信息，请参阅 [Berkshelf](http://berkshelf.com/)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。

**debug**  <a name="attributes-recipes-berkshelf-debug"></a>
是否要在 Chef 日志中包含 Berkshelf 调试信息 (布尔值)。默认值为 `false`。  

```
node['opsworks_berkshelf]['debug']
```

# opsworks\$1java 属性
<a name="attributes-recipes-java"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`opsworks_java` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/opsworks_java/attributes/default.rb)指定 [Tomcat](http://tomcat.apache.org/) 服务器配置。有关更多信息，请参阅 [Apache Tomcat 配置参考](http://tomcat.apache.org/tomcat-5.5-doc/config/)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [datasources ](#attributes-recipes-java-datasources) | [java\$1app\$1server\$1version ](#attributes-recipes-java-server-version) | [java\$1shared\$1lib\$1dir ](#attributes-recipes-java-shared-lib) | 
| [jvm\$1pkg 属性 ](#attributes-recipes-java-pkg) | [custom\$1pkg\$1location\$1url\$1debian ](#attributes-recipes-java-pkg-debian) | [java\$1home\$1basedir ](#attributes-recipes-java-pkg-basedir) | 
| [custom\$1pkg\$1location\$1url\$1rhel ](#attributes-recipes-java-pkg-rhel) | [use\$1custom\$1pkg\$1location ](#attributes-recipes-java-pkg-use) | [jvm\$1options ](#attributes-recipes-java-jvm-options) | 
| [jvm\$1version ](#attributes-recipes-java-jvm-version) | [tomcat 属性](#attributes-recipes-java-tomcat) |  | 

**datasources **  <a name="attributes-recipes-java-datasources"></a>
用于定义 JNDI 资源名称的一组属性 (字符串)。有关如何使用此属性的更多信息，请参阅 [部署 JSP 应用程序附带后端数据库](layers-java-deploy.md#layers-java-deploy-jsp-db)。默认值为空的哈希，可以填充应用程序短名称与 JNDI 名称之间的自定义映射。有关更多信息，请参阅 [部署 JSP 应用程序附带后端数据库](layers-java-deploy.md#layers-java-deploy-jsp-db)。  

```
node['opsworks_java']['datasources']
```

**java\$1app\$1server\$1version **  <a name="attributes-recipes-java-server-version"></a>
Java 应用程序服务器版本 (数字)。默认值为 `7`。您可覆盖此属性以指定版本 6。如果您安装了非默认 JDK，此属性将被忽略。  

```
node['opsworks_java']['java_app_server_version']
```

**java\$1shared\$1lib\$1dir **  <a name="attributes-recipes-java-shared-lib"></a>
Java 共享库的目录 (字符串)。默认值为 `/usr/share/java`。  

```
node['opsworks_java']['java_shared_lib_dir']
```

**jvm\$1pkg 属性 **  <a name="attributes-recipes-java-pkg"></a>
一组属性，您可以覆盖该属性以安装非默认 JDK。    
**use\$1custom\$1pkg\$1location **  <a name="attributes-recipes-java-pkg-use"></a>
是否要安装自定义 JDK，以替代 OpenJDK (布尔值)。默认值为 `false`。  

```
node['opsworks_java']['jvm_pkg']['use_custom_pkg_location']
```  
**custom\$1pkg\$1location\$1url\$1debian **  <a name="attributes-recipes-java-pkg-debian"></a>
要在 Ubuntu 实例上安装的 JDK 软件包的位置 (字符串)。默认值为 `'http://aws.amazon.com/'`，这只是初始化值，没有适当的意义。如果您想要安装非默认 JDK，则必须覆盖此属性，并将其设置为适当的 URL。  

```
node['opsworks_java']['jvm_pkg']['custom_pkg_location_url_debian']
```  
**custom\$1pkg\$1location\$1url\$1rhel **  <a name="attributes-recipes-java-pkg-rhel"></a>
要在 Amazon Linux 和 RHEL 实例上安装的 JDK 软件包的位置 (字符串)。默认值为 `'http://aws.amazon.com/'`，这只是初始化值，没有适当的意义。如果您想要安装非默认 JDK，则必须覆盖此属性，并将其设置为适当的 URL。  

```
node['opsworks_java']['jvm_pkg']['custom_pkg_location_url_rhel']
```  
**java\$1home\$1basedir **  <a name="attributes-recipes-java-pkg-basedir"></a>
JDK 软件包会被提取到的目录 (字符串)。默认值为 `/usr/local`。您不需要为 RPM 软件包指定此设置；它们包括完整的目录结构。  

```
node['opsworks_java']['jvm_pkg']['java_home_basedir']
```

**jvm\$1options **  <a name="attributes-recipes-java-jvm-options"></a>
JVM 命令行选项，这些选项允许您指定一些设置，例如堆大小 (字符串)。常见的选项集为 `-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC`。默认值为无选项。  

```
node['opsworks_java']['jvm_options']
```

**jvm\$1version **  <a name="attributes-recipes-java-jvm-version"></a>
OpenJDK 版本 (数字)。默认值为 `7`。您可覆盖此属性以指定 OpenJDK 版本 6。如果您安装了非默认 JDK，此属性将被忽略。  

```
node['opsworks_java']['jvm_version']
```

**tomcat 属性**  <a name="attributes-recipes-java-tomcat"></a>
一组属性，您可以覆盖此属性以安装默认的 Tomcat 配置。    
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/opsworks/latest/userguide/attributes-recipes-java.html)  
**ajp\$1port **  <a name="attributes-recipes-java-ajp-port"></a>
AJP 端口 (数字)。默认值为 `8009`。  

```
node['opsworks_java']['tomcat]['ajp_port']
```  
**apache\$1tomcat\$1bind\$1mod **  <a name="attributes-recipes-java-bind-mod"></a>
代理模块 (字符串)。默认值为 `proxy_http`。您可覆盖此属性以指定 AJP 代理模块 `proxy_ajp`。  

```
node['opsworks_java']['tomcat]['apache_tomcat_bind_mod']
```  
**apache\$1tomcat\$1bind\$1path **  <a name="attributes-recipes-java-bind-path"></a>
Apache-Tomcat 绑定路径 (字符串)。默认值为 `/`。您不应覆盖此属性；更改绑定路径可能会导致应用程序停止工作。  

```
node['opsworks_java']['tomcat]['apache_tomcat_bind_path']
```  
**auto\$1deploy **  <a name="attributes-recipes-java-deploy"></a>
是否自动部署 (布尔值)。默认值为 `true`。  

```
node['opsworks_java']['tomcat]['auto_deploy']
```  
**connection\$1timeout **  <a name="attributes-recipes-java-timeout"></a>
连接超时 (毫秒) (数字)。默认值为 `20000` (20 秒)。  

```
node['opsworks_java']['tomcat]['connection_timeout']
```  
**mysql\$1connector\$1jar **  <a name="attributes-recipes-java-connector"></a>
MySQL 连接器库的 JAR 文件 (字符串)。默认值为 `mysql-connector-java.jar`。  

```
node['opsworks_java']['tomcat]['mysql_connector_jar']
```  
**端口 **  <a name="attributes-recipes-java-port"></a>
标准端口 (数字)。默认值为 `8080`。  

```
node['opsworks_java']['tomcat]['port']
```  
**secure\$1port **  <a name="attributes-recipes-java-secure-port"></a>
安全端口 (数字)。默认值为 `8443`。  

```
node['opsworks_java']['tomcat]['secure_port']
```  
**shutdown\$1port **  <a name="attributes-recipes-java-shutdown-port"></a>
 关闭端口 (数字)。默认值为 `8005`。  

```
node['opsworks_java']['tomcat]['shutdown_port']
```  
**threadpool\$1max\$1threads **  <a name="attributes-recipes-java-threadpool-max"></a>
线程池中的最大线程数 (数字)。默认值为 `150`。  

```
node['opsworks_java']['tomcat]['threadpool_max_threads']
```  
**threadpool\$1min\$1spare\$1threads **  <a name="attributes-recipes-java-threadpool-min"></a>
线程池中的最少备用线程数 (数字)。默认值为 `4`。  

```
node['opsworks_java']['tomcat]['threadpool_min_spare_threads']
```  
**unpack\$1wars **  <a name="attributes-recipes-java-unpack"></a>
是否解压缩 WAR 文件 (布尔值)。默认值为 `true`。  

```
node['opsworks_java']['tomcat]['unpack_wars']
```  
**uri\$1encoding **  <a name="attributes-recipes-java-encoding"></a>
URI 编码 (字符串)。默认值为 `UTF-8`。  

```
node['opsworks_java']['tomcat]['uri_encoding']
```  
**use\$1ssl\$1connector **  <a name="attributes-recipes-java-ssl"></a>
是否使用 SSL 连接器 (布尔值)。默认值为 `false`。  

```
node['opsworks_java']['tomcat]['use_ssl_connector']
```  
**use\$1threadpool **  <a name="attributes-recipes-java-threadpool"></a>
是否使用线程池 (布尔值)。默认值为 `false`。  

```
node['opsworks_java']['tomcat]['use_threadpool']
```  
**userdatabase\$1pathname **  <a name="attributes-recipes-java-userdb"></a>
用户数据库路径名称 (字符串)。默认值为 `conf/tomcat-users.xml`。  

```
node['opsworks_java']['tomcat]['userdatabase_pathname']
```

# passenger\$1apache2 属性
<a name="attributes-recipes-passenger"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`passenger_apache2` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/passenger_apache2/attributes/passenger.rb)指定 [Phusion Passenger](https://www.phusionpassenger.com/) 配置。有关更多信息，请参阅 [Phusion Passenger 用户指南，Apache 版本](http://www.modrails.com/documentation/Users%20guide%20Apache.html)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [friendly\$1error\$1pages](#attributes-recipes-passenger-friendly-error-pages) | [gem\$1bin ](#attributes-recipes-passenger-gem-bin) | [gems\$1path](#attributes-recipes-passenger-gems-path) | 
| [high\$1performance\$1mode ](#attributes-recipes-passenger-perf) | [root\$1path ](#attributes-recipes-passenger-root) | [max\$1instances\$1per\$1app ](#attributes-recipes-passenger-instances) | 
| [max\$1pool\$1size ](#attributes-recipes-passenger-max-pool) | [max\$1requests](#attributes-recipes-passenger-max-requests) | [module\$1path ](#attributes-recipes-passenger-mod_path) | 
| [pool\$1idle\$1time ](#attributes-recipes-passenger-pool-idle) | [rails\$1app\$1spawner\$1idle\$1time ](#attributes-recipes-passenger-rails-app) | [rails\$1framework\$1spawner\$1idle\$1time ](#attributes-recipes-passenger-rails-framework) | 
| [rails\$1spawn\$1method ](#attributes-recipes-passenger-rails-spawn) | [ruby\$1bin ](#attributes-recipes-passenger-ruby-bin) | [ruby\$1wrapper\$1bin ](#attributes-recipes-passenger-ruby-wrapper) | 
| [stat\$1throttle\$1rate ](#attributes-recipes-passenger-throttle) | [版本](#attributes-recipes-passenger-version) |  | 

**friendly\$1error\$1pages**  <a name="attributes-recipes-passenger-friendly-error-pages"></a>
如果应用程序无法启动，是否显示友好的错误页面 (字符串)。此属性可设置为“on”或“off”；默认值为“off”。  

```
node[:passenger][:friendly_error_pages]
```

**gem\$1bin **  <a name="attributes-recipes-passenger-gem-bin"></a>
Gem 二进制文件的位置 (字符串)。默认值为 `'/usr/local/bin/gem'`。  

```
node[:passenger][:gem_bin]
```

**gems\$1path**  <a name="attributes-recipes-passenger-gems-path"></a>
Gem 路径 (字符串)。默认值取决于 Ruby 版本。例如：  
+ Ruby 版本 1.8：`'/usr/local/lib/ruby/gems/1.8/gems'`
+ Ruby 版本 1.9：`'/usr/local/lib/ruby/gems/1.9.1/gems'`

```
node[:passenger][:gems_path]
```

**high\$1performance\$1mode **  <a name="attributes-recipes-passenger-perf"></a>
是否使用 Passenger 的高性能模式 (字符串)。可能的值为 `'on'` 和 `'off'`。默认值为 `'off'`。  

```
node[:passenger][:high_performance_mode ]
```

**root\$1path **  <a name="attributes-recipes-passenger-root"></a>
Passenger 根目录 (字符串)。默认值取决于 Ruby 和 Passenger 版本。在 Chef 语法中，该值为 `"#{node[:passenger][:gems_path]}/passenger-#{passenger[:version]}"`。  

```
node[:passenger][:root_path]
```

**max\$1instances\$1per\$1app **  <a name="attributes-recipes-passenger-instances"></a>
每个应用程序的最大应用程序进程数 (数字)。默认值为 `0`。有关更多信息，请参阅 [PassengerMaxInstancesPerApp](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxinstancesperapp_lt_integer_gt)。  

```
node[:passenger][:max_instances_per_app]
```

**max\$1pool\$1size **  <a name="attributes-recipes-passenger-max-pool"></a>
最大应用程序处理器数 (数字)。默认值为 `8`。有关更多信息，请参阅 [PassengerMaxPoolSize](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt)。  

```
node[:passenger][:max_pool_size]
```

**max\$1requests**  <a name="attributes-recipes-passenger-max-requests"></a>
最大请求数 (数字)。默认值为 `0`。  

```
node[:passenger][:max_requests]
```

**module\$1path **  <a name="attributes-recipes-passenger-mod_path"></a>
模块路径 (字符串)。默认值如下所示：  
+ Amazon Linux 和 RHEL: `"#{node['apache']['libexecdir']}/mod_passenger.so"`
+ Ubuntu: `"#{passenger[:root\$1path]}/ext/apache2/mod_passenger.so"`

```
node[:passenger][:module_path]
```

**pool\$1idle\$1time **  <a name="attributes-recipes-passenger-pool-idle"></a>
应用程序进程可以保持空闲状态的最长时间 (秒) (数字)。默认值为 `14400` (4 小时)。有关更多信息，请参阅 [PassengerPoolIdleTime](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime)。  

```
node[:passenger][:pool_idle_time]
```

**rails\$1app\$1spawner\$1idle\$1time **  <a name="attributes-recipes-passenger-rails-app"></a>
Rails 应用程序生成器的最长空闲时间 (数字)。如果此属性设置为零，则应用程序生成器不会超时。默认值为 `0`。有关更多信息，请参阅[生成方法说明](http://www.modrails.com/documentation/Users%20guide%20Apache.html#spawning_methods_explained)。  

```
node[:passenger][:rails_app_spawner_idle_time]
```

**rails\$1framework\$1spawner\$1idle\$1time **  <a name="attributes-recipes-passenger-rails-framework"></a>
Rails 框架生成器的最长空闲时间 (数字)。如果此属性设置为零，则框架生成器不会超时。默认值为 `0`。有关更多信息，请参阅[生成方法说明](http://www.modrails.com/documentation/Users%20guide%20Apache.html#spawning_methods_explained)。  

```
node[:passenger][:rails_framework_spawner_idle_time]
```

**rails\$1spawn\$1method **  <a name="attributes-recipes-passenger-rails-spawn"></a>
Rails 生成方法 (字符串)。默认值为 `'smart-lv2'`。有关更多信息，请参阅[生成方法说明](http://www.modrails.com/documentation/Users%20guide%20Apache.html#spawning_methods_explained)。  

```
node[:passenger][:rails_spawn_method]
```

**ruby\$1bin **  <a name="attributes-recipes-passenger-ruby-bin"></a>
Ruby 二进制文件的位置 (字符串)。默认值为 `'/usr/local/bin/ruby'`。  

```
node[:passenger][:ruby_bin]
```

**ruby\$1wrapper\$1bin **  <a name="attributes-recipes-passenger-ruby-wrapper"></a>
Ruby 包装程序脚本的位置 (字符串)。默认值为 `'/usr/local/bin/ruby_gc_wrapper.sh'`。  

```
node[:passenger][:ruby_wrapper_bin]
```

**stat\$1throttle\$1rate **  <a name="attributes-recipes-passenger-throttle"></a>
Passenger 执行文件系统检查的速率 (数字)。默认值为 `5`，这意味着检查最多每 5 秒执行一次。有关更多信息，请参阅 [PassengerStatThrottleRate ](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerstatthrottlerate_lt_integer_gt)。  

```
node[:passenger][:stat_throttle_rate]
```

**版本**  <a name="attributes-recipes-passenger-version"></a>
版本 (字符串)。默认值为 `'3.0.9'`。  

```
node[:passenger][:version]
```

# ruby 属性
<a name="attributes-recipes-ruby"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`ruby` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/ruby/attributes/ruby.rb)指定应用程序使用的 Ruby 版本。请注意，在 Ruby 2.1 中引入语义版本控制会改变该属性的用法。有关如何指定版本的更多信息 (包括示例)，请参阅 [Ruby 版本](workingcookbook-ruby.md)。有关 OpsWorks Stacks 如何确定 Ruby 版本的完整详细信息，请参阅内置属性文件 [r](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/ruby/attributes/ruby.rb) uby.rb。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。

**full\$1version**  <a name="attributes-recipes-ruby-full"></a>
完整的版本号 (字符串)。您不应覆盖此属性，而应使用 [[:opsworks][:ruby\$1version]](attributes-json-opsworks-other.md#attributes-json-opsworks-ruby-version) 和相应的修补版本属性来指定版本。  

```
[:ruby][:full_version]
```

**major\$1version**  <a name="attributes-recipes-ruby-major"></a>
主要版本号 (字符串)。您不应覆盖此属性，而应使用 [[:opsworks][:ruby\$1version]](attributes-json-opsworks-other.md#attributes-json-opsworks-ruby-version) 来指定主要版本。  

```
[:ruby][:major_version]
```

**minor\$1version**  <a name="attributes-recipes-ruby-minor"></a>
次要版本号 (字符串)。您不应覆盖此属性，而应使用 [[:opsworks][:ruby\$1version]](attributes-json-opsworks-other.md#attributes-json-opsworks-ruby-version) 来指定次要版本。  

```
[:ruby][:minor_version]
```

**patch**  <a name="attributes-recipes-ruby-patch"></a>
修补程序级别 (字符串)。此属性对 Ruby 版本 2.0.0 及更低版本有效。对于更高版本的 Ruby，请使用 `patch_version` 属性。  

```
[:ruby][:patch]
```
修补程序版本号必须以 `p` 为前缀。例如，您可以使用以下自定义 JSON 来指定修补程序级别 484。  

```
{
  "ruby":{"patch":"p484"}
}
```

**patch\$1version**  <a name="attributes-recipes-ruby-patch-version"></a>
修补程序版本号 (字符串)。此属性对 Ruby 版本 2.1 及更高版本有效。对于更低版本的 Ruby，请使用 `patch` 属性。  

```
[:ruby][:patch_version]
```

**pkgrelease**  <a name="attributes-recipes-ruby-pkgrelease"></a>
软件包版本号 (字符串)。  

```
[:ruby][:pkgrelease]
```

# unicorn 属性
<a name="attributes-recipes-unicorn"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`unicorn` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/unicorn/attributes/default.rb)指定 [Unicorn](http://unicorn.bogomips.org/) 配置。有关更多信息，请参阅 [Unicorn::Configurator](http://unicorn.bogomips.org/Unicorn/Configurator.html)。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [accept\$1filter](#attributes-recipes-unicorn-accept) | [backlog](#attributes-recipes-unicorn-backlog) | [delay](#attributes-recipes-unicorn-delay) | 
| [tcp\$1nodelay](#attributes-recipes-unicorn-nodelay) | [tcp\$1nopush](#attributes-recipes-unicorn-nopush) | [preload\$1app](#attributes-recipes-unicorn-preload) | 
| [timeout](#attributes-recipes-unicorn-timeout) | [tries](#attributes-recipes-unicorn-tries) | [版本](#attributes-recipes-unicorn-version) | 
| [worker\$1processes](#attributes-recipes-unicorn-worker) |  |  | 

**accept\$1filter**  <a name="attributes-recipes-unicorn-accept"></a>
接受筛选条件，`'httpready'` 或 `'dataready'` (字符串)。默认值为 `'httpready'`。  

```
node[:unicorn][:accept_filter]
```

**backlog**  <a name="attributes-recipes-unicorn-backlog"></a>
队列可容纳的最大请求数 (数字)。默认值为 `1024`。  

```
node[:unicorn][:backlog]
```

**delay**  <a name="attributes-recipes-unicorn-delay"></a>
等待重新尝试绑定套接字的时长 (秒) (数字)。默认值为 `0.5`。  

```
node[:unicorn][:delay]
```

**preload\$1app**  <a name="attributes-recipes-unicorn-preload"></a>
在派生工作进程之前，是否要预加载应用程序 (布尔值)。默认值为 `true`。  

```
node[:unicorn][:preload_app]
```

**tcp\$1nodelay**  <a name="attributes-recipes-unicorn-nodelay"></a>
是否要对 TCP 套接字禁用 Nagle 算法 (布尔值)。默认值为 `true`。  

```
node[:unicorn][:tcp_nodelay]
```

**tcp\$1nopush**  <a name="attributes-recipes-unicorn-nopush"></a>
是否启用 TCP\$1CORK (布尔值)。默认值为 `false`。  

```
node[:unicorn][:tcp_nopush]
```

**timeout**  <a name="attributes-recipes-unicorn-timeout"></a>
允许工作线程用于每个请求的最长时间 (秒) (数字)。超出超时值的工作线程都将终止。默认值为 `60`。  

```
node[:unicorn][:timeout]
```

**tries**  <a name="attributes-recipes-unicorn-tries"></a>
重新尝试绑定到套接字的最大次数 (数字)。默认值为 `5`。  

```
node[:unicorn][:tries]
```

**版本**  <a name="attributes-recipes-unicorn-version"></a>
Unicorn 版本 (字符串)。默认值为 `'4.7.0'`。  

```
node[:unicorn][:version]
```

**worker\$1processes**  <a name="attributes-recipes-unicorn-worker"></a>
工作进程数 (数字)。如果存在默认值，则为 `max_pool_size`，否则为 `4`。  

```
node[:unicorn][:worker_processes]
```