mpm_common.html.ja.utf8   [plain text]


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              This file is generated from xml source: DO NOT EDIT
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      -->
<title>mpm_common - Apache HTTP サーバ</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
<body>
<div id="page-header">
<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
<p class="apache">Apache HTTP サーバ バージョン 2.2</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.2</a> &gt; <a href="./">モジュール</a></div>
<div id="page-content">
<div id="preamble"><h1>Apache MPM 共通ディレクティブ</h1>
<div class="toplang">
<p><span>翻訳済み言語: </span><a href="../de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
<a href="../en/mod/mpm_common.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../ja/mod/mpm_common.html" title="Japanese">&nbsp;ja&nbsp;</a> |
<a href="../tr/mod/mpm_common.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
</div>
<div class="outofdate">この日本語訳はすでに古くなっている
            可能性があります。
            最近更新された内容を見るには英語版をご覧下さい。
        </div>
<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>二つ以上のマルチプロセッシングモジュール (MPM)
で実装されているディレクティブのコレクション</td></tr>
<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>MPM</td></tr></table>
</div>
<div id="quickview"><h3 class="directives">ディレクティブ</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#acceptmutex">AcceptMutex</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#chrootdir">ChrootDir</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#coredumpdirectory">CoreDumpDirectory</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#enableexceptionhook">EnableExceptionHook</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#gracefulshutdowntimeout">GracefulShutdownTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#group">Group</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#listen">Listen</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#listenbacklog">ListenBackLog</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#lockfile">LockFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxclients">MaxClients</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxmemfree">MaxMemFree</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxrequestsperchild">MaxRequestsPerChild</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxsparethreads">MaxSpareThreads</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#minsparethreads">MinSpareThreads</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#pidfile">PidFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#receivebuffersize">ReceiveBufferSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#scoreboardfile">ScoreBoardFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#sendbuffersize">SendBufferSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serverlimit">ServerLimit</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#startservers">StartServers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#startthreads">StartThreads</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#threadlimit">ThreadLimit</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#threadsperchild">ThreadsPerChild</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#threadstacksize">ThreadStackSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#user">User</a></li>
</ul>
</div>

<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AcceptMutex" id="AcceptMutex">AcceptMutex</a> <a name="acceptmutex" id="acceptmutex">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>複数の子プロセスがネットワークソケットでリクエストを
accept しようとしているときに、Apache がそれらの子プロセスを直列化するために
使う方法</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AcceptMutex default|<var>method</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AcceptMutex default</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="directive">AcceptMutex</code> ディレクティブは、
    ネットワークソケットのリクエストを accept しようとしている複数の子プロセスを
    Apache が直列化するために使う方法を設定します。
    Apache 2.0 以前は、このメソッドはコンパイル時にのみ選択できました。
    最適な方法は、アーキテクチャやプラットホームに大きく依存します。
    詳細に関しては、<a href="../misc/perf-tuning.html">性能のチューニング</a>
    ドキュメントをご覧下さい。</p>

    <p>このディレクティブが <code>Default</code>
    に設定されていれば、コンパイル時に選択されたデフォルト値が使われます。
    他の使用可能なメソッドの一覧は下にあります。
    全てのメソッドが全てのプラットホームで使用可能であるわけではない、
    ということに注意してください。
    使用可能でないメソッドが指定された場合は、
    使用可能なメソッドの一覧を含んだメッセージが
    エラーログに出力されます。</p>

    <dl>
      <dt><code>flock</code></dt>
      <dd><code class="directive"><a href="#lockfile">LockFile</a></code>
      ディレクティブで定義したファイルのロックに、
      <code>flock(2)</code> システムコールを使います。</dd>

      <dt><code>fcntl</code></dt>
      <dd><code class="directive"><a href="#lockfile">LockFile</a></code>
      ディレクティブで定義したファイルのロックに、
      <code>fcntl(2)</code> システムコールを使います。</dd>

      <dt><code>posixsem</code></dt>
      <dd>排他処理の実装に POSIX 互換セマフォを使用します</dd>

      <dt><code>pthread</code></dt>
      <dd>POSIX Threads (PThreads) 規格で実装されている
      POSIX 排他処理を使います。</dd>

      <dt><code>sysvsem</code></dt>
      <dd>排他処理の実装に SySV 形式のセマフォを使います。</dd>
    </dl>

    <p>コンパイル時にシステムのデフォルトに選ばれたものが何かを見たい場合は、
    <code class="directive"><a href="../mod/core.html#loglevel">LogLevel</a></code> を <code>debug</code>
    に設定するとよいでしょう。デフォルトの <code class="directive">AcceptMutex</code>
    が <code class="directive"><a href="../mod/core.html#errorlog">ErrorLog</a></code> に書き込まれます。</p>

  <div class="warning"><h3>警告</h3>
     <p>ほとんどのシステムにおいては、<code>pthread</code> オプションが
     選ばれていると、子プロセスが <code>AcceptCntl</code> mutex を
     保持しているときに異常終了した場合、サーバはリクエストへの応答を
     停止してしまいます。これが発生した場合は、サーバを復旧させるためには
     手動で再起動させる必要があります。</p>

     <p>Solaris は例外で、Apache も使用している、子プロセスが mutex を
     保持して異常終了した後に mutex を復旧させるための機構を提供をしています。</p>
     <p>御使用のシステムが <code>pthread_mutexattr_setrobust_np()</code> 関数を
     実装している場合は、<code>pthread</code> オプションを安全に使用できる
     可能性があります。</p>
  </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ChrootDir" id="ChrootDir">ChrootDir</a> <a name="chrootdir" id="chrootdir">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Directory for apache to run chroot(8) after startup.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ChrootDir <var>/path/to/directory</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/event.html">event</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache 2.2.10 and later</td></tr>
</table><p>このディレクティブの解説文書は
            まだ翻訳されていません。英語版をご覧ください。
            </p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="CoreDumpDirectory" id="CoreDumpDirectory">CoreDumpDirectory</a> <a name="coredumpdirectory" id="coredumpdirectory">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Apache がコアダンプする前に移動を試みるディレクトリ
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CoreDumpDirectory <var>directory</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>デフォルトの設定は説明文を読んでください</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>Apache がコアダンプする前に移動を試みるディレクトリを制御します。
    デフォルト値は <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>
    ディレクトリですが、このディレクトリはサーバの実行されているユーザ権限で
    書き込み可能であるべきではないので、通常はコアダンプは書き込まれません。
    デバッグのためにコアダンプが必要であれば、
    このディレクティブを使って他の位置にコアダンプを書き出すようにできます。</p>

    <div class="note"><h3>Linux でのコアダンプ</h3>
      <p>Apache が root として起動されて、別のユーザの権限に以降した場合は
      Linux のカーネルはディレクトリがプロセスの権限で書き込み可能な場合でさえも
      コアダンプを<em>無効</em>にします。Apache (2.0.46 以降) は
      Linux 2.4 以降ではコアダンプを行なうように再指定しますが、それは
      <code class="directive">CoreDumpDirectory</code> を明示的に設定したときに
      限ります。</p>
    </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="EnableExceptionHook" id="EnableExceptionHook">EnableExceptionHook</a> <a name="enableexceptionhook" id="enableexceptionhook">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クラッシュの後に例外ハンドラを実行するフックを有効にする</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>EnableExceptionHook On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>EnableExceptionHook Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.0.49 以降</td></tr>
</table>
    <p>安全上の理由から、<code>--enable-exception-hook</code> configure
    オプションを有効にした場合にのみ、このディレクティブを利用できます。
    外部モジュールをプラグインして、子がクラッシュした後に何か実行できるような
    フックを有効にします。</p>
    
    <p>このような外部モジュールは、既に二つ存在していて、
    <code>mod_whatkilledus</code> と <code>mod_backtrace</code>
    がこのフックを活用します。これらの詳細については Jeff Trawick 
    さんの <a href="http://www.apache.org/~trawick/exception_hook.html">EnableExceptionHook site</a> を参照してください。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="GracefulShutdownTimeout" id="GracefulShutdownTimeout">GracefulShutdownTimeout</a> <a name="gracefulshutdowntimeout" id="gracefulshutdowntimeout">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>穏やかな停止をかけた後、終了するまで待つ時間</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>GracefulShutDownTimeout <var>seconds</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>GracefulShutDownTimeout 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code>, <code class="module"><a href="../mod/event.html">event</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.2 以降</td></tr>
</table>
    <p><code class="directive">GracefulShutdownTimeout</code> には
    サーバーが "graceful-stop" シグナルを受け取ってから現在の
    リクエストの処理を最大で何秒間続けるかを指定します。</p>

    <p>この値をゼロに設定すると、処理中として残っているリクエストが
    全て完了するまでサーバーは終了しません。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Group" id="Group">Group</a> <a name="group" id="group">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リクエストに応答する際に所属するグループ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Group <var>unix-group</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>Group #-1</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 以降で、グローバル設定でのみ有効です。</td></tr>
</table>
    <p><code class="directive">Group</code> ディレクティブで、
    リクエストに応答する際に所属しておくグループを設定します。
    このディレクティブを使用するためには、
    サーバは最初に <code>root</code> 権限で起動されている必要があります。
    非 root ユーザでサーバを起動した場合は、指定したグループに変化できずに、
    結果的に起動したユーザの属するグループで実行されることになります。
    <var>unix-group</var> は次のうちのいずれかです:</p>

    <dl>
      <dt>グループ名</dt>
      <dd>グループを名前で参照します</dd>

      <dt><code>#</code> に続いてグループ番号</dt>
      <dd>グループを番号で参照します。</dd>
    </dl>

    <div class="example"><h3>例</h3><p><code>
      Group www-group
    </code></p></div>

    <p>サーバを実行するために特定の新しいグループを設定することを
    お薦めします。<code>nobody</code> を使用する管理者もいますが、
    可能であったり望ましい訳では必ずしもありません。</p>

    <div class="warning"><h3>セキュリティ</h3>
      <p>正確にどんなことをやっているのか、その危険性を知らないで、
      <code class="directive">Group</code> (や <code class="directive"><a href="#user">User</a></code>) を
      <code>root</code> に 設定しないでください。</p>
    </div>

    <p>特記事項: このディレクティブを
    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
    で使用することはサポートされなくなりました。Apache 2.0 で
    <code class="program"><a href="../programs/suexec.html">suexec</a></code> を設定したい場合は、
    <code class="directive"><a href="../mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code>
    を使用してください。</p>

    <div class="note"><h3>注意</h3>
      <p><code class="directive">Group</code> ディレクティブは
      <code class="module"><a href="../mod/beos.html">beos</a></code> と <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> MPM
      にも存在しますが、実質的に無効で、互換性のためだけに存在します。</p>
    </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Listen" id="Listen">Listen</a> <a name="listen" id="listen">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバが listen するIP アドレスとポート番号</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</var>]</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code>, <code class="module"><a href="../mod/event.html">event</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 から必須ディレクティブ。<var>protocol</var>
引数は 2.1.5 で追加。</td></tr>
</table>
    <p><code class="directive">Listen</code> ディレクティブは Apache
    が特定の IP アドレスやポート番号だけを listen するように指定します。
    デフォルトでは全ての IP インターフェースのリクエストに応答します。
    <code class="directive">Listen</code> ディレクティブは
    現在は必須のディレクティブとなりました。
    もし設定ファイルになければ、サーバは起動に失敗します。
    これは以前のバージョンの Apache から変更のあった部分です。</p>

    <p><code class="directive">Listen</code> ディレクティブでは、特定のポートあるいは
    アドレスとポートの組み合わせから入ってくるリクエストに対して
    応答するように指定します。
    もしポート番号だけが指定された場合は、サーバは全インターフェースの
    指定されたポート番号に対して listen します。
    IP アドレスがポートとともに指定された場合は、
    サーバは指定されたポートとインターフェースに対して listen 
    します。</p>

    <p>複数のアドレスとポートに対して listen するように、
    複数の <code class="directive">Listen</code> ディレクティブを使うこともできます。
    サーバは列挙されたアドレスとポート全てからのリクエストに対して
    応答します。</p>

    <p>例えば、サーバが 80 番ポートと 8000 番ポートの両方の
    コネクションを受け入れる場合は、次のようにします。</p>

    <div class="example"><p><code>
       Listen 80<br />
       Listen 8000
    </code></p></div>

    <p>二つの特定のインターフェースとポート番号からのコネクションを
    受け入れるようにするには、次のようにします。</p>

    <div class="example"><p><code>
       Listen 192.170.2.1:80<br />
       Listen 192.170.2.5:8000
    </code></p></div>

    <p>IPv6 アドレスは角括弧で囲まなければなりません。
    例えば次の例のようにです。</p>

    <div class="example"><p><code>
      Listen [2001:db8::a00:20ff:fea7:ccea]:80
    </code></p></div>

    <p><var>protocol</var> オプション引数は通常の設定では必要ありません。
       無指定の場合、443 番ポートには <code>https</code> が、他のポートには
       <code>http</code> がデフォルト値として使用されます。
       protocol 指定は、どのモジュールがリクエストを処理するかを決定し、
       <code class="directive"><a href="../mod/core.html#acceptfilter">AcceptFilter</a></code> 
       によるプロトコル特有の最適化を行うようにします。</p>

    <p>非標準なポートで運用している際にのみ protocol 指定が必要になります。
       たとえば <code>https</code> なサイトを 8443 番ポートで運用している場合 :</p>

    <div class="example"><p><code>
      Listen 192.170.2.1:8443 https
    </code></p></div>

    <div class="note"><h3>エラー条件</h3>
      同一 IP アドレスとポートの組に、複数の <code class="directive">Listen</code> 
      ディレクティブを指定してしまうと、<code>Address already in use</code> 
      というエラーメッセージを受けることになります。
    </div>


<h3>参照</h3>
<ul>
<li><a href="../dns-caveats.html">DNS の問題</a></li>
<li><a href="../bind.html">Apache
が使用するアドレスとポートの設定</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ListenBackLog" id="ListenBackLog">ListenBackLog</a> <a name="listenbacklog" id="listenbacklog">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>保留状態のコネクションのキューの最大長</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ListenBacklog <var>backlog</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ListenBacklog 511</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>保留状態のコネクションのキューの最大長です。
    一般的には調整する必要はありませんし、調整は望ましくありません。
    しかし、TCP SYN フラッドアタックの状況下におかれる場合に、
    増やした方が望ましいシステムもあります。
    <code>listen(2)</code> システムコールのバックログパラメータを
    ご覧下さい。</p>

    <p>この値は OS により、小さな数に抑えられます。
    値は OS 毎に異なっています。また多くの OS では、
    バックログとして指定されている値ちょうどまで使っているわけではなく、
    設定されている値に基づいて (通常は設定値よりも大きな値を)
    使っていることに注意してください。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LockFile" id="LockFile">LockFile</a> <a name="lockfile" id="lockfile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>受付を直列化するためのロックファイルの位置</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LockFile <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LockFile logs/accept.lock</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="directive"><a href="#acceptmutex">AcceptMutex</a></code>
    が <code>fcntl</code> や <code>flock</code>
    に設定されて使用されている場合に、使用されるロックファイルへのパスを
    <code class="directive">LockFile</code> ディレクティブで設定します。
    このディレクティブは通常はそのままにしておきます。
    主に <code>logs</code> ディレクトリが NFS
    でマウントされている場合などに値を変えます。
    なぜなら<strong>ロックファイルはローカルディスクに
    保存されなければならない</strong>からです。
    メインサーバプロセスの PID がファイル名に自動的に付加されます。</p>

    <div class="warning"><h3>セキュリティ</h3>
      <p><code>/var/tmp</code>
      といった、誰でも書き込めるディレクトリにファイルを
      <em>置かない</em>方がよいです。なぜなら、サーバが起動時に作成する
      ロックファイルの作成自体を妨害することによって、
      誰でもサービス拒否アタックを引き起こすことができるからです。</p>
    </div>

<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#acceptmutex">AcceptMutex</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxClients" id="MaxClients">MaxClients</a> <a name="maxclients" id="maxclients">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リクエストに応答するために作成される
子プロセスの最大個数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxClients <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用法をご覧下さい。</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="directive">MaxClients</code> ディレクティブは、
    応答することのできる同時リクエスト数を設定します。
    <code class="directive">MaxClients</code> 制限数を越えるコネクションは通常、
    <code class="directive"><a href="#listenbacklog">ListenBacklog</a></code>
    ディレクティブで設定した数までキューに入ります。
    他のリクエストの最後まで達して子プロセスが空くと、
    次のコネクションに応答します。</p>

    <p>スレッドを用いないサーバ (<em>すなわち</em> <code class="module"><a href="../mod/prefork.html">prefork</a></code>)
    では、<code class="directive">MaxClients</code>
    は、リクエストに応答するために起動される
    子プロセスの最大数となります。
    デフォルト値は <code>256</code> で、これを増加させたい場合は、
    <code class="directive"><a href="#serverlimit">ServerLimit</a></code>
    の値も増加させる必要があります。</p>

    <p>スレッドを用いるサーバや、ハイブリッドサーバ (<em>すなわち</em>
    <code class="module"><a href="../mod/beos.html">beos</a></code> <code class="module"><a href="../mod/worker.html">worker</a></code>)
    では、<code class="directive">MaxClients</code> 
    は、クライアントに応答できるスレッドの総数を制限します。
    <code class="module"><a href="../mod/beos.html">beos</a></code> でのデフォルト値は <code>50</code> です。
    ハイブリッド MPM でのデフォルト値は <code>16</code>
    <code class="directive"><a href="#serverlimit">ServerLimit</a></code>
    の <code>25</code> 倍 (<code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>) です。
    <code class="directive">MaxClients</code>
    を 16 プロセス以上必要な値まで増加させたい場合は、
    <code class="directive"><a href="#serverlimit">ServerLimit</a></code>
    も増加させる必要があります。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxMemFree" id="MaxMemFree">MaxMemFree</a> <a name="maxmemfree" id="maxmemfree">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>free()</code> が呼ばれない限り、
主メモリアロケータが保持し続けられるメモリの最大量</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxMemFree <var>KBytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxMemFree 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code></td></tr>
</table>
    <p><code class="directive">MaxMemFree</code> ディレクティブは
    <code>free()</code> が呼ばれない限り、
    主アロケータが保持できる空のメモリの最大値をキロバイト単位で設定します。
    設定されていないか、零に設定されているときは、無制限になります。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxRequestsPerChild" id="MaxRequestsPerChild">MaxRequestsPerChild</a> <a name="maxrequestsperchild" id="maxrequestsperchild">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>個々の子サーバが稼働中に扱うリクエスト数の上限</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxRequestsPerChild <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxRequestsPerChild 10000</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="directive">MaxRequestsPerChild</code> ディレクティブは、
    個々の子サーバプロセスが扱うことのできるリクエストの制限数を
    設定します。<code class="directive">MaxRequestsPerChild</code>
    個のリクエストの後に、子プロセスは終了します。
    <code class="directive">MaxRequestsPerChild</code> が <code>0</code>
    に設定されている場合は、プロセスは期限切れにより終了することはありません。</p>

    <div class="note"><h3>その他のデフォルト値</h3>
      <p><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code> と <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>
      でのデフォルト値は <code>0</code> です。</p>
    </div>

    <p><code class="directive">MaxRequestsPerChild</code>
    を非ゼロに制限することには、二つの利点があります:</p>

    <ul>
      <li>(偶発的な) メモリーリークが起こった場合に
      プロセスが消費するメモリの総量を制限できる</li>

      <li>プロセスに有限のライフタイムを設定することで、
      サーバ負荷が下がった時にプロセス数を少なくすることができる</li>
    </ul>

    <div class="note"><h3>注</h3>
      <p><code class="directive"><a href="../mod/core.html#keepalive">KeepAlive</a></code> リクエストの場合は、
      一つ目のリクエストだけがこの制限に該当します。
      実効的には、一つの子プロセスあたりの<em>コネクション</em>数を
      制限するように挙動が変化します。</p>
    </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxSpareThreads" id="MaxSpareThreads">MaxSpareThreads</a> <a name="maxsparethreads" id="maxsparethreads">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>アイドルスレッドの最大数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxSpareThreads <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用法をご覧下さい。</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>アイドルなスレッドの最大数です。異なる MPM ではそれぞれ、
    このディレクティブは異なる取り扱われ方をされます。</p>

    <p><code class="module"><a href="../mod/worker.html">worker</a></code> では、
    デフォルトは <code>MaxSpareThreads 250</code> です。
    この MPM はアイドルスレッド数をサーバ全体で監視します。
    サーバでアイドルスレッド数が多すぎる場合は、
    この数字よりも少ない数になるまで子プロセスを終了します。</p>

    <p><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code> では、
    デフォルトは <code>MaxSpareThreads 100</code> です。
    この MPM はシングルプロセスで実行されますので、
    スペアスレッド数もサーバ全体で勘定します。</p>

    <p><code class="module"><a href="../mod/beos.html">beos</a></code> と <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> は
    <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code> と似た挙動をします。
    <code class="module"><a href="../mod/beos.html">beos</a></code> でのデフォルト値は <code>MaxSpareThreads 50</code>
    です。<code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> でのデフォルト値は <code>10</code>
    です。</p>

    <div class="note"><h3>制限事項</h3>
      <p><code class="directive">MaxSpareThreads</code> の取る値には制限があります。
      Apache は次の規則に従って自動的に補正します。</p>
      <ul>

        <li><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code> は
        <code class="directive"><a href="#minsparethreads">MinSpareThreads</a></code>
        よりも大きい必要があります。</li>

        <li>
        <code class="module"><a href="../mod/worker.html">worker</a></code> では、
        <code class="directive"><a href="#minsparethreads">MinSpareThreads</a></code> と
        <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
        で決まる総和と等しいか大きい必要があります。</li>
      </ul>
    </div>

<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#minsparethreads">MinSpareThreads</a></code></li>
<li><code class="directive"><a href="#startservers">StartServers</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MinSpareThreads" id="MinSpareThreads">MinSpareThreads</a> <a name="minsparethreads" id="minsparethreads">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リクエストに応答することのできる
アイドルスレッド数の最小数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MinSpareThreads <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法をご覧下さい。</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>リクエストに応答するスレッド数の最小値です。
    異なる MPM ではそれぞれ、
    このディレクティブは異なる取り扱われ方をします。</p>

    <p><code class="module"><a href="../mod/worker.html">worker</a></code> では、
    デフォルトは <code>MinSpareThreads 75</code> で、
    アイドルスレッド数をサーバ全体で監視します。
    もしサーバに十分な数のアイドルスレッドがなければ、
    アイドルスレッド数がこの数よりも大きくなるまで
    新しい子プロセスが生成されます。</p>

    <p><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code> では、
    デフォルトは <code>MinSpareThreads 10</code> で、
    シングルプロセス MPM ですので、サーバ全体で管理されます。</p>

    <p><code class="module"><a href="../mod/beos.html">beos</a></code> と <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> は、
    <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>によく似ています。
    <code class="module"><a href="../mod/beos.html">beos</a></code> でのデフォルトは <code>MinSpareThreads 1</code>
    です。<code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> でのデフォルトは
    <code>5</code> です。</p>

<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#maxsparethreads">MaxSpareThreads</a></code></li>
<li><code class="directive"><a href="#startservers">StartServers</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="PidFile" id="PidFile">PidFile</a> <a name="pidfile" id="pidfile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>デーモンのプロセス ID
をサーバが記録するためのファイル</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>PidFile <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>PidFile logs/httpd.pid</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="directive">PidFile</code> ディレクティブで、
    デーモンのプロセス ID をサーバが記録するファイルを設定します。
    ファイル名が絶対パスでない場合は、
    <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>
    からの相対的なものとして扱われます。</p>

    <div class="example"><h3>例</h3><p><code>
    PidFile /var/run/apache.pid
    </code></p></div>

    <p>サーバが <code class="directive"><a href="../mod/core.html#errorlog">ErrorLog</a></code>
    や <code class="directive"><a href="../mod/mod_log_config.html#transferlog">TransferLog</a></code>
    を閉じて開き直したり、設定ファイルを
    再読込したりさせるために、サーバにシグナルを送ることができると
    便利なことがあります。
    これは SIGHUP (kill -1) シグナルを <code class="directive">PidFile</code>
    に書かれているプロセス ID に送ることでできます。</p>

    <p><code class="directive">PidFile</code> には、ログファイルの設置位置や
    <a href="../misc/security_tips.html#serverroot">セキュリティ</a>
    と全く同じ注意点があります。</p>

    <div class="note"><h3>注意</h3>
      <p>Apache 2 では、
      <code class="program"><a href="../programs/apachectl.html">apachectl</a></code>
      スクリプトのみを使用してサーバの (再) 起動や停止を
      行なうことを推奨しています。</p>
    </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ReceiveBufferSize" id="ReceiveBufferSize">ReceiveBufferSize</a> <a name="receivebuffersize" id="receivebuffersize">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>TCP 受信バッファサイズ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ReceiveBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ReceiveBufferSize 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>サーバは TCP 受信バッファサイズを指定されたバイト数に設定します。</p>

    <p><code>0</code>にした場合、OS のデフォルト値が使用されます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ScoreBoardFile" id="ScoreBoardFile">ScoreBoardFile</a> <a name="scoreboardfile" id="scoreboardfile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>子プロセスと連携するためのデータを保存する
ファイルの位置</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ScoreBoardFile <var>file-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ScoreBoardFile logs/apache_status</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>Apache は親プロセスと子プロセス間の通信にスコアボードを用います。
    この通信機能にファイルを必要とするアーキテクチャもあります。
    ファイルが指定されていなければ、Apache はまずメモリ上
    (匿名共有メモリ) にスコアボードを作ろうとし、それが失敗すると
    ディスク上にファイル (ファイルベースの共有メモリ) を作ろうとします。
    このディレクティブを指定すると、Apache
    は必ずディスクにファイルを生成します。</p>

    <div class="example"><h3>例</h3><p><code>
      ScoreBoardFile /var/run/apache_status
    </code></p></div>

    <p>ファイルベースの共有メモリは、サードパーティー製のアプリケーションで
    スコアボードに直接アクセスする必要がある場合に役に立ちます。</p>

    <p><code class="directive">ScoreBoardFile</code> を使う場合、
    RAM ディスク上に置くとスピードが向上するでしょう。
    しかし、ログファイルの設置位置や
    <a href="../misc/security_tips.html">セキュリティ</a>
    と同様の注意点があるので、注意してください。</p>

<h3>参照</h3>
<ul>
<li><a href="../stopping.html">Apache の停止と再起動</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="SendBufferSize" id="SendBufferSize">SendBufferSize</a> <a name="sendbuffersize" id="sendbuffersize">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>TCP バッファサイズ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>SendBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SendBufferSize 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>サーバは TCP 送信バッファサイズを指定されたバイト数に設定します。
    高速で高レイテンシな環境で
    (<em>例</em> 100ms 程度、大陸横断高速通信路など)
    古い一般的な OS のデフォルト値を増やすのに非常に便利です。</p>

    <p><code>0</code>にした場合、OS のデフォルト値が使用されます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ServerLimit" id="ServerLimit">ServerLimit</a> <a name="serverlimit" id="serverlimit">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>設定可能なサーバプロセス数の上限</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerLimit <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用法を参照</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="module"><a href="../mod/prefork.html">prefork</a></code> MPM の場合は、このディレクティブは
    Apache プロセス稼働中における
    <code class="directive"><a href="#maxclients">MaxClients</a></code>
    に設定可能な上限値を設定することになります
    (訳注: prefork の場合は同時クライアント数 = サーバプロセス数なので) 。
    <code class="module"><a href="../mod/worker.html">worker</a></code> MPM の場合には、このディレクティブは
    <code class="directive"><a href="#threadlimit">ThreadLimit</a></code>
    ディレクティブと組み合わせて、
    Apache プロセス稼働中における
    <code class="directive"><a href="#maxclients">MaxClients</a></code>
    に設定可能な上限値を設定することになります。
    再起動中にこのディレクティブを変更しても無視されますが、
    <code class="directive"><a href="#maxclients">MaxClients</a></code>
    は再起動中に修正することができます。</p>

    <p>このディレクティブを使用する際は特に注意してください。
    <code class="directive">ServerLimit</code> が必要以上に大きな値に
    設定された場合は、余計な未使用共有メモリが割り当てられます。
    <code class="directive">ServerLimit</code> と
    <code class="directive"><a href="#maxclients">MaxClients</a></code>
    がシステムの扱える範囲を越えた設定値になっていると、
    Apache は起動しないか、起動しても不安定になるでしょう。</p>

    <p><code class="module"><a href="../mod/prefork.html">prefork</a></code> MPM では、
    <code class="directive"><a href="#maxclients">MaxClients</a></code>
    を 256 (デフォルト) よりも大きな値に設定する必要がある時にだけ使用してください。
    希望の <code class="directive"><a href="#maxclients">MaxClients</a></code>
    数とくらべて、必要以上に大きな値を指定することは避けてください。</p>

    <p><code class="module"><a href="../mod/worker.html">worker</a></code> MPM では、
    <code class="directive"><a href="#maxclients">MaxClients</a></code> と
    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
    の設定で 16 サーバプロセス (デフォルト) 
    以上必要になる場合にのみ使用してください。希望の
    <code class="directive"><a href="#maxclients ">MaxClients </a></code> と
    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
    とくらべて、必要となるサーバプロセス数以上に大きな値を
    設定することは避けてください。</p>

    <div class="note"><h3>注意</h3>
      <p><code>ServerLimit 20000</code> という制限付きでコンパイルされています
      (<code class="module"><a href="../mod/prefork.html">prefork</a></code> MPM では <code>200000</code>) 。
      これはスペルミスによって誤って酷い状況になるのを、
      回避するための処置です。</p>
    </div>

<h3>参照</h3>
<ul>
<li><a href="../stopping.html">Apache の停止と再起動</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="StartServers" id="StartServers">StartServers</a> <a name="startservers" id="startservers">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>起動時に生成される子サーバプロセスの数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>StartServers <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p><code class="directive">StartServers</code> ディレクティブは、
    起動時に生成される子サーバプロセスの数を設定します。
    プロセス数は負荷に応じて動的に制御されますので、
    通常はこの値を調整する理由はあまりないでしょう。</p>

    <p>デフォルト値は MPM ごとに異なります。
    <code class="module"><a href="../mod/worker.html">worker</a></code> は <code>StartServers 3</code> です。
    <code class="module"><a href="../mod/prefork.html">prefork</a></code> は <code>5</code> で、
    <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> は <code>2</code> です。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="StartThreads" id="StartThreads">StartThreads</a> <a name="startthreads" id="startthreads">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>起動時に生成されるスレッドの数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>StartThreads <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code></td></tr>
</table>
    <p>起動時に生成されるスレッドの数です。
    スレッド数は負荷に応じて動的に制御されますので、
    通常はこの値を調整する理由はあまりないでしょう。</p>

    <p><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code> でのデフォルトは
    <code>StartThreads 50</code> で、
    この場合プロセスは一つしかないので、
    起動時にリクエストに応答するスレッドの総数となります。</p>

    <p><code class="module"><a href="../mod/beos.html">beos</a></code> でのデフォルトは <code>StartThreads
    10</code> です。
    また、起動時に生成されるスレッドの総数にも反映されます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ThreadLimit" id="ThreadLimit">ThreadLimit</a> <a name="threadlimit" id="threadlimit">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>設定可能な子プロセス毎のスレッド数の上限を
設定します</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ThreadLimit <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.41 とそれ以降の <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code> 
で利用可能</td></tr>
</table>
    <p>このディレクティブは
    Apache プロセス稼働中における
    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
    に設定可能な上限値を設定します。再起動時にこのディレクティブの値を
    変更しても無視されますが、
    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
    は再起動中に、このディレクティブで指定された上限値まで
    変更することができます。</p>

    <p>このディレクティブを使用する際は特に注意してください。
    <code class="directive">ThreadLimit</code> が
    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
    よりもずっと大きな値に設定された場合は、
    余計な未使用共有メモリが割り当てられてしまいます。
    <code class="directive">ThreadLimit</code> が
    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
    の両方がシステムの扱える範囲を超えている場合は、
    Apache は起動しないか、起動したとしても不安定になるでしょう。
    このディレクティブの値は今使用している Apache の <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code> の予想上限値を
    超えた値には設定しないでください。
    </p>

    <p><code class="directive">ThreadLimit</code> のデフォルト値は
    <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code> のときは <code>1920</code> で、
    他の場合は <code>64</code> です。</p>

    <div class="note"><h3>注意</h3>
      <p><code>ThreadLimit 20000</code> (<code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>
      の場合は <code>ThreadLimit 15000</code> )
      という制限付きでコンパイルされています。
      これはスペルミスによって誤って酷い状況になるのを、
      回避するための処置です。</p>
    </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ThreadsPerChild" id="ThreadsPerChild">ThreadsPerChild</a> <a name="threadsperchild" id="threadsperchild">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>子プロセスそれぞれに生成されるスレッド数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ThreadsPerChild <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
    <p>このディレクティブは、それぞれの子プロセスで生成される
    スレッド数を設定します。
    子プロセスは開始時にこれらのスレッドを生成して、
    その後は生成しません。<code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code> のような、
    子プロセスが一つしかないような MPM を利用しているのであれば、
    この値はサーバの負荷全体を十分取り扱える程度に、
    大きくなければなりません。<code class="module"><a href="../mod/worker.html">worker</a></code> のような、
    子プロセスが複数あるような MPM を利用しているのであれば、
    サーバの通常負荷を十分扱える程度に、
    <em>スレッド総数</em>が多くなければなりません。</p>

    <p><code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>での <code class="directive">ThreadsPerChild</code>
    のデフォルト値は <code>64</code> で、他の場合は
    <code>25</code> です。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ThreadStackSize" id="ThreadStackSize">ThreadStackSize</a> <a name="threadstacksize" id="threadstacksize">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントのコネクションを受け持つスレッドが使用する
スタックのバイト数</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ThreadStackSize <var>size</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>NetWare では 65536。他の OS では違った値</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.1 以降</td></tr>
</table>
    <p>クライアントコネクションを受け持ち、コネクション処理に必要なモジュールの
    呼び出しを行なっているスレッドの、(自動変数用の) スタックサイズは
    <code class="directive">ThreadStackSize</code> ディレクティブで指定します。
    大抵の場合 OS の指定しているスタックサイズのデフォルト値は
    適切なものですが、調整が必要になる場合もあります:</p>

    <ul>
      <li>スレッドスタックサイズのデフォルト値が比較的小さく設定されている
      プラットホーム (例えば HP-UX) では、自動変数用の領域で大きな容量を
      使用するサードパーティ製モジュールのために Apache がクラッシュする
      場合もあります。そのモジュールは他のプラットホームでは
      スタックサイズが大きいために、快調に動作するかもしれません。
      このタイプのクラッシュは、<code class="directive">ThreadStackSize</code>
      で OS のデフォルト値より大きな値を指定することで解決します。
      サードパーティ製モジュールでこの処置が必要であると記載されている
      場合か、Apache の出力するメッセージでスレッドスタックサイズが
      小さすぎると指摘されている場合にのみ、この調整をしてください。</li>

      <li>デフォルトスレッドスタックサイズが、Web サーバ用途に必要な量よりも
      明らかに大きすぎる場合、<code class="directive">ThreadStackSize</code> 
      を OS のデフォルト値よりも小さな値にすることで、子プロセスあたりの
      スレッド数をより多く持たせられるようになります。
      このタイプの調整は、テスト環境でウェブサーバを完全に
      テストできる場合に限って行なうべきです。
      まれに多数のスタックが要求されるリクエストを受けることがあるかも
      しれないからです。
      Web サーバの設定を変更すると、現在の <code class="directive">ThreadStackSize</code> 
      の設定が取り消される場合があります。</li>
    </ul>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="User" id="User">User</a> <a name="user" id="user">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リクエストに応答する際に用いるユーザ ID</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>User <var>unix-userid</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>User #-1</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 以降で、グローバル設定でのみ有効です。
</td></tr>
</table>
    <p><code class="directive">User</code> ディレクティブは
    サーバがリクエストに応答する際に用いるユーザ ID を設定します。
    このディレクティブを使用するためには、スタンドアロン型の
    サーバは最初に <code>root</code> 権限で起動されている必要があります。
    非 root ユーザでサーバを起動した場合は、
    権限の低いユーザへと変わることができず、
    結局元のユーザのプロセスとして実行され続けます。
    <code>root</code> で起動した場合に親プロセスが root
    として実行されているのは正常な動作です。
    <var>Unix-userid</var> は次のどれかです。</p>

    <dl>
      <dt>ユーザ名</dt>
      <dd>ユーザを名前で参照します。</dd>

      <dt># に続いてユーザ番号</dt>
      <dd>ユーザを番号で参照します。</dd>
    </dl>

    <p>このユーザは、外部に見せるように意図していないファイルに、
    アクセス可能になってしまうような権限を持つべきではないですし、
    同様に HTTP リクエストに対して応答するように意図していない
    実行コードを、実行できるような権限を持つべきではないです。
    サーバを実行するために特定の新しいユーザとグループを
    設定することをお薦めいたします。
    <code>nobody</code> ユーザを使用する管理者もいますが、
    これが常に望ましいわけではありません。
    なぜなら <code>nobody</code> ユーザは、システムで
    他の役割を担っているかも知れないからです。</p>

    <div class="warning"><h3>セキュリティ</h3>
      <p>正確にどんなことをやっているのか、その危険性を知らないで、
      <code class="directive">User</code> (や <code class="directive"><a href="#group">Group</a></code>) を <code>root</code> に
      設定しないでください。</p>
    </div>

    <p>特記事項: このディレクティブを
    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
    で使用することはサポートされなくなりました。
    <code class="program"><a href="../programs/suexec.html">suexec</a></code> 向けにサーバを設定するのであれば、
    <code class="directive"><a href="../mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code>
    を使用してください。</p>

    <div class="note"><h3>注意</h3>
      <p><code class="directive">User</code> ディレクティブは
      <code class="module"><a href="../mod/beos.html">beos</a></code> と <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> MPM
      にも存在しますが、実質的に無効で、互換性のためだけに存在します。</p>
    </div>

</div>
</div>
<div class="bottomlang">
<p><span>翻訳済み言語: </span><a href="../de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
<a href="../en/mod/mpm_common.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../ja/mod/mpm_common.html" title="Japanese">&nbsp;ja&nbsp;</a> |
<a href="../tr/mod/mpm_common.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
</div><div id="footer">
<p class="apache">Copyright 2012 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
</body></html>