summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod/mod_so.html.ja.utf8
blob: ab9e2d1f0f1b7698b6f876e7d11f1fb00088d4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?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>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<!--
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              This file is generated from xml source: DO NOT EDIT
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      -->
<title>mod_so - Apache HTTP サーバ バージョン 2.4</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 rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
<script src="../style/scripts/prettify.min.js" type="text/javascript">
</script>

<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="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
<img alt="" src="../images/feather.png" /></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.4</a> &gt; <a href="./">モジュール</a></div>
<div id="page-content">
<div id="preamble"><h1>Apache モジュール mod_so</h1>
<div class="toplang">
<p><span>翻訳済み言語: </span><a href="../en/mod/mod_so.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/mod/mod_so.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
<a href="../ja/mod/mod_so.html" title="Japanese">&nbsp;ja&nbsp;</a> |
<a href="../ko/mod/mod_so.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/mod/mod_so.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>起動時や再起動時に実行コードとモジュールをサーバにロードする
</td></tr>
<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>so_module</td></tr>
<tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_so.c</td></tr>
<tr><th><a href="module-dict.html#Compatibility">互換性:</a></th><td>このモジュールは Window では (常に含まれている) Base
モジュールです</td></tr></table>
<h3>概要</h3>


    <p>いくつかのオペレーティングシステムでは、サーバの再コンパイルをする代わりに、
    このモジュールを使用して
    <a href="../dso.html">動的共有オブジェクト</a>
    (DSO) 機構により、実行時に Apache HTTP Server にモジュールを読み込ませることが
    できます。</p>

    <p>Unix 上では、読み込まれるコードは通常は共有オブジェクトファイル
    (普通 <code>.so</code> という拡張子が付いています) からです。
    Windows 上ではこのモジュールの拡張子は <code>.so</code> か <code>.dll</code>
    です。</p>

    <div class="warning"><h3>警告</h3>
    <p>Apache HTTP Server のあるメジャーバージョン向けにビルドされたモジュールは一般に
    他のメジャーバージョンでは動きません。(例えば 1.3 と 2.0、 2.0 と 2.2)
    またメジャーバージョン間ではAPIの変更がしばしば発生し、そのため新しい
    メジャーバージョン向けにモジュールの修正が必要になることがあります。</p>
    </div>
</div>
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3>トピック</h3>
<ul id="topics">
<li><img alt="" src="../images/down.gif" /> Windows 用のロード可能なモジュールを作成する</li>
</ul><h3 class="directives">ディレクティブ</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#loadfile">LoadFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#loadmodule">LoadModule</a></li>
</ul>
<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&amp;list_id=144532&amp;product=Apache%20httpd-2&amp;query_format=specific&amp;order=changeddate%20DESC%2Cpriority%2Cbug_severity&amp;component=mod_so">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&amp;component=mod_so">Report a bug</a></li></ul><h3>参照</h3>
<ul class="seealso">
<li><a href="#comments_section">コメント</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2>Windows 用のロード可能なモジュールを作成する</h2>

    <div class="note"><h3>注</h3>
    <p>Windows において動的にロードされるモジュールの拡張子は普通 <code>.dll</code>
    ですが、Apache httpd のモジュールは <code>mod_whatever.so</code>
    といった名前を持ちます。これは、他のプラットフォームでの通常の形式に
    あわせたものです。しかしながら、サードパーティ製モジュール、例えばPHPなど、
    は今でも <code>.dll</code> の拡張子を使っています。</p>

    <p>まだ <code>mod_so</code> で <code>ApacheModuleFoo.dll</code> という名前の
    モジュールもロードされますが、新しい名前の付け方を使う方が好まれます。
    モジュールを 2.0 用に移植しているのであれば、2.0 の習慣に合うように名前を
    修正してください。</p></div>

    <p>Apache httpd のモジュール API は UNIX と Windows 間では変更されていません。
    多くのモジュールは全く変更なし、もしくは簡単な変更により Windows 
    で実行できるようになります。ただし、それ以外の Windows には無い Unix
    アーキテクチャーの機能に依存したモジュールは動作しません。</p>

    <p>モジュールが実際に動作するときは、
    二つの方法のどちらかでサーバに追加することができます。まず、Unix
    と同様にサーバにコンパイルして組み込むことができます。Windows
    用の Apache httpd は Unix 用の Apache にある <code>Configure</code>
    プログラムがありませんので、モジュールのソースファイルを
    ApacheCore プロジェクトファイルに追加し、シンボルを
    <code>os\win32\modules.c</code> ファイルに追加する必要があります。</p>

    <p>二つ目はモジュールを DLL としてコンパイルする方法です。
    DLL は共有ライブラリで、実行時に
    <code><code class="directive">LoadModule</code></code>
    ディレクティブによりサーバに読み込むことができます。これらのモジュール
    DLL はそのまま配布することが可能で、サーバを再コンパイルすることなく、Windows
    用の Apache httpd のすべてのインストールで実行することができます。</p>

    <p>モジュール DLL を作成するためには、
    モジュールの作成に小さな変更を行なう必要があります。
    つまり、モジュールのレコード (これは後で作成されます。
    以下を参照してください) が DLL からエクスポートされなければなりません。
    これを行なうには、<code>AP_MODULE_DECLARE_DATA</code> (Apache httpd
    のヘッダファイルで定義されています) をモジュールのモジュールレコード
    定義の部分に追加してください。たとえば、モジュールに</p>
<div class="example"><p><code>
    module foo_module;
</code></p></div>

    <p>があるとすると、それを次のもので置き換えてください。</p>
<div class="example"><p><code>
    module AP_MODULE_DECLARE_DATA foo_module;
</code></p></div>

    <p>Unix 上でもこのモジュールを
    変更無しで使い続けられるように、このマクロは Windows
    上でのみ効力を持ちます。<code>.DEF</code>
    ファイルの方を良く知っているという場合は、
    代わりにそれを使ってモジュールレコードを
    エクスポートすることもできます。</p>
    <p>さあ、あなたのモジュールの DLL を作成しましょう。これを、
    libhttpd.lib 共有ライブラリがコンパイルされたときに作成された
    ibhttpd.lib エクスポートライブラリとリンクしてください。この時に、
    Apache httpd のヘッダファイルが正しい位置にあるように、
    コンパイラの設定を変える必要があるかもしれません。
    このライブラリはサーバルートの modules ディレクトリにあります。
    ビルド環境が正しく設定されるように、既存のモジュール用の .dsp を
    取ってくるのが一番良いでしょう。もしくは、あなたの .dsp と
    コンパイラとリンクのオプションを比較する、というものでも良いです。</p>

    <p>これで DLL 版のモジュールが作成されているはずです。
    サーバルートの <code>modules</code>
    ディレクトリにモジュールを置いて、
    <code><code class="directive">LoadModule</code></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="LoadFile" id="LoadFile">LoadFile</a> <a name="loadfile" id="loadfile">ディレクティブ</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>LoadFile <em>filename</em> [<em>filename</em>] ...</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>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_so</td></tr>
</table>

    <p>LoadFile ディレクティブは、サーバが起動されたときや再起動されたときに、
    指定されたオブジェクトファイルやライブラリをリンクします。
    これはモジュールが動作するために必要になるかもしれない追加の
    コードを読み込むために使用されます。<em>Filename</em> は絶対パスか、<a href="core.html#serverroot">ServerRoot</a> からの相対パスです。</p>

    <p>例:</p>

    <pre class="prettyprint lang-config">LoadFile libexec/libxmlparse.so</pre>



</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LoadModule" id="LoadModule">LoadModule</a> <a name="loadmodule" id="loadmodule">ディレクティブ</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>LoadModule <em>module filename</em></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>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_so</td></tr>
</table>

    <p>LoadModule ディレクティブは <em>filename</em>
    というオブジェクトファイルおよびライブラリをリンクし、<em>module</em>
    という名前のモジュールの構造をアクティブなモジュールのリストに追加します。
    <em>Module</em> はファイル中の <code>module</code>
    型の外部変数の名前で、モジュールのドキュメントに
    <a href="module-dict.html#moduleidentifier">モジュール識別子</a>として書かれているものです。例 :</p>

   <pre class="prettyprint lang-config">LoadModule status_module modules/mod_status.so</pre>


    <p>これは ServerRoot の modules サブディレクトリから指定された名前の
    モジュールをロードします。</p>

</div>
</div>
<div class="bottomlang">
<p><span>翻訳済み言語: </span><a href="../en/mod/mod_so.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/mod/mod_so.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
<a href="../ja/mod/mod_so.html" title="Japanese">&nbsp;ja&nbsp;</a> |
<a href="../ko/mod/mod_so.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/mod/mod_so.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';
var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_so.html';
(function(w, d) {
    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
        d.write('<div id="comments_thread"><\/div>');
        var s = d.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
    }
    else { 
        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
    }
})(window, document);
//--><!]]></script></div><div id="footer">
<p class="apache">Copyright 2023 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="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
    prettyPrint();
}
//--><!]]></script>
</body></html>