

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

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

**重要**  
この AWS OpsWorks Stacks サービスは 2024 年 5 月 26 日にサポート終了となり、新規および既存のお客様の両方で無効になっています。できるだけ早くワークロードを他のソリューションに移行することを強くお勧めします。移行についてご質問がある場合は、[AWS re:Post](https://repost.aws/) または[AWS プレミアムサポート](https://aws.amazon.com/support)を通じて 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)」を参照してください。


****  

|  |  |  | 
| --- |--- |--- |
| [バイナリ ](#attributes-recipes-apache-bin) | [問い合わせ ](#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) | 
| [タイムアウト ](#attributes-recipes-apache-timeout) | [traceenable ](#attributes-recipes-apache-trace) | [ユーザー ](#attributes-recipes-apache-user) | 
| [バージョン](#attributes-recipes-apache-version) | [worker 属性](#attributes-recipes-apache-worker) |  | 

**バイナリ **  <a name="attributes-recipes-apache-bin"></a>
Apache バイナリの場所 (文字列)。デフォルト値は `'/usr/sbin/httpd'` です。  

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

**問い合わせ **  <a name="attributes-recipes-apache-contact"></a>
E メールの連絡先 (文字列)。デフォルト値はダミーのアドレス `'ops@example.com'` です。  

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

**deflate\$1types**  <a name="attributes-recipes-apache-deflate"></a>
Mime タイプがブラウザでサポートされている場合は、指定した Mime タイプで圧縮を有効にするために `mod_deflate` を指定します (文字列のリスト)。デフォルト値は次のとおりです。  

```
['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]
```  
**モード **  <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'`: 完全な情報。たとえば、「Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2」のようになります。
+ `'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]
```

**タイムアウト **  <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]
```