]> granicus.if.org Git - apache/blob - docs/manual/invoking.xml.ja
xforms
[apache] / docs / manual / invoking.xml.ja
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="./style/manual.ja.xsl"?>
4 <!-- English Revision: 567441:1387612 (outdated) -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <manualpage metafile="invoking.xml.meta">
24
25   <title>Apache の起動</title>
26
27 <summary>
28     <p>Windows 上では、Apache は通常は
29     Windows NT, 2000, XP ではサービスとして、Windows 9x, ME 
30     ではコンソールアプリケーションとして実行されます。
31     詳細に関しては、「<a href="platform/windows.html#winsvc">
32     サービスとして実行する</a>」と「<a 
33     href="platform/windows.html#wincons">
34     コンソールアプリケーションとして実行する</a>」をご覧下さい。</p>
35
36     <p>Unixでは、<program>httpd</program> 
37     プログラムが、バックグラウンドで常にリクエスト処理を行う
38     デーモンとして実行されます。この文書ではどのように
39     <program>httpd</program> を起動するかについて記述しています。</p>
40 </summary>
41
42 <seealso><a href="stopping.html">停止と再起動</a></seealso>
43 <seealso><program>httpd</program></seealso>
44 <seealso><program>apachectl</program></seealso>
45
46 <section id="startup"><title>Apache の起動方法</title>
47
48     <p>もし、設定ファイル中で指定されている
49     <directive module="mpm_common">Listen</directive>
50     がデフォルトの 80 (もしくは 1024 以下の他のポート)
51     である場合は、Apache を起動するためには root
52     権限が必要になりますが、
53     これはこの特権ポートにバインドするためです。
54     起動して、一度ログファイルを開くといった準備のための
55     動作を幾つか実行した後は、クライアントからのリクエストに対する
56     listen と応答を実際に行う<em>子</em>プロセスを起動します。
57     メインの <program>httpd</program> プロセスは root 権限で走り続けますが、
58     子プロセスはもっと低い権限で走ります。
59     これは選択した<a 
60     href="mpm.html">マルチプロセッシングモジュール</a>で制御されます。</p>
61
62     <p>推奨の <program>httpd</program> 実行プログラムの起動方法は、
63     <program>apachectl</program>
64     制御スクリプトを使用する方法です。このスクリプトは、<program>httpd</program> 
65     がオペレーティングシステム上で正常に動作するように必要な環境変数を
66     適切に設定して、<program>httpd</program> バイナリを起動します。
67     <program>apachectl</program> はどんなコマンドライン引数も通過させますので、
68     <program>httpd</program> のどのコマンドラインオプションも
69     <program>apchectl</program> のオプションとして使用できます。
70     また、<program>apchectl</program> スクリプトを直接編集し、
71     スクリプト先頭付近の <code>HTTPD</code> 変数を変更することで、
72     <program>httpd</program> バイナリの正しい位置を指定したり、<em>常に</em>
73     付加させるコマンドライン引数を指定したりすることができます。</p>
74
75     <p><program>httpd</program> が起動されてまず最初にすることは、
76     <a href="configuring.html">設定ファイル</a>
77     <code>httpd.conf</code> の位置を特定して読み込むことです。
78     このファイルの位置はコンパイル時に設定されますが、実行時に
79     <code>-f</code> コマンドラインオプションを使って
80     位置を指定することもできます。例えば次のようにです。</p>
81
82 <example>/usr/local/apache2/bin/apachectl -f
83       /usr/local/apache2/conf/httpd.conf</example>
84
85     <p>スタートアップが万事上手くいったら、サーバはターミナルから
86     切り離されて、コマンドプロンプトが即座に戻ってくるでしょう。
87     これはサーバが起動している状態を示しています。
88     その後はブラウザでサーバに接続して、
89     <directive module="core">DocumentRoot</directive>
90     ディレクトリのテストページを見ることができるでしょう。</p>
91 </section>
92
93 <section id="errors"><title>起動時のエラー</title>
94
95     <p>Apache は、起動時に致命的な問題に遭遇すると、
96     終了する前に、コンソールか
97     <directive module="core">ErrorLog</directive>
98     のどちらかに問題を記述したメッセージを出力します。
99     最もよくあるエラーメッセージは
100     「<code>Unable to bind to Port ...</code>」
101     です。このメッセージは普通は次のどちらかが原因です。</p>
102
103     <ul>
104       <li>root でログインしていない時に、
105       特権ポートでサーバを起動しようとした。</li>
106
107       <li>同じポートに既にバインドされている Apache
108       がもう一つあるときや他のウェブサーバが存在している時に、
109       サーバを開始しようとした。</li>
110     </ul>
111
112     <p>より多くの問題解決の方策の説明は、
113         Apache <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> をご覧下さい。</p>
114 </section>
115
116 <section id="boot"><title>ブート時の起動</title>
117
118     <p>システムがリブートした後でも
119     サーバが実行され続けるようにしたい場合は、
120     <program>apachectl</program>
121     を呼び出すものをシステムスタートアップファイル
122     (通常 <code>rc.local</code> や <code>rc.N</code>
123     内のファイル) に追加しなければなりません。
124     この方法では Apache を root 権限で起動します。
125     これをする前に、セキュリティやアクセス制限が
126     適切に設定されていていることを確認してください。</p>
127
128     <p><program>apachectl</program> スクリプトは通常は、標準的な SysV init 
129     スクリプトとして動作するように設計されています。
130     <code>start</code>, <code>restart</code>, <code>stop</code>
131     といった引数をとって、<program>httpd</program> 
132     への適切なシグナルに変換します。
133     ですから、通常は単に適切な init ディレクトリ内から
134     <program>apachectl</program> へリンクすることができます。しかし、
135     念のためシステムの要求に合致していることを確認してください。</p>
136 </section>
137
138 <section id="info"><title>追加情報</title>
139
140     <p><program>httpd</program> や
141     <program>apachectl</program>、サーバに含まれていたその他補助プログラムの、
142     コマンドラインオプションに関する追加情報は、
143     <a href="programs/">サーバと補助プログラム</a>ページに
144     記載されています。
145     Apache 配布に含まれている全<a href="mod/">モジュール</a>、
146     それによって提供される<a href="mod/directives.html">ディレクティブ</a>
147     のドキュメントもあります。</p>
148 </section>
149
150 </manualpage>